Class: TM::SimpleEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/nysol/dictionary.rb

Overview

単純エントリクラス

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dPhrase, polarity, iterNo = -1)) ⇒ SimpleEntry

Returns a new instance of SimpleEntry.



67
68
69
70
71
72
73
74
# File 'lib/nysol/dictionary.rb', line 67

def initialize(dPhrase, polarity, iterNo=-1)
	@scFlag   = 0
	@dPhrase  = dPhrase
	@polarity = polarity
	@iterNo   = iterNo
#puts "se_reg=#{iterNo}"

end

Instance Attribute Details

#dPhraseObject (readonly)

用言句



63
64
65
# File 'lib/nysol/dictionary.rb', line 63

def dPhrase
  @dPhrase
end

#iterNoObject

辞書登録時のiterNo



65
66
67
# File 'lib/nysol/dictionary.rb', line 65

def iterNo
  @iterNo
end

#polarityObject

極性



64
65
66
# File 'lib/nysol/dictionary.rb', line 64

def polarity
  @polarity
end

#scFlagObject (readonly)

0:SimpleEntry, 1:ComplexEntry



62
63
64
# File 'lib/nysol/dictionary.rb', line 62

def scFlag
  @scFlag
end

Instance Method Details

#show(fp = STDERR) ⇒ Object



83
84
85
86
87
# File 'lib/nysol/dictionary.rb', line 83

def show(fp=STDERR)
	fp.print "SE:"
	@dPhrase.show(fp)
	fp.print "(pol=#{polarity})"
end

#to_sObject

entryを文字列化する(ex. “回復する”)



79
80
81
# File 'lib/nysol/dictionary.rb', line 79

def to_s
	return @dPhrase.to_s
end