Class: TM::SimpleEntry
- Inherits:
-
Object
- Object
- TM::SimpleEntry
- Defined in:
- lib/nysol/dictionary.rb
Overview
単純エントリクラス
Instance Attribute Summary collapse
-
#dPhrase ⇒ Object
readonly
用言句.
-
#iterNo ⇒ Object
辞書登録時のiterNo.
-
#polarity ⇒ Object
極性.
-
#scFlag ⇒ Object
readonly
0:SimpleEntry, 1:ComplexEntry.
Instance Method Summary collapse
-
#initialize(dPhrase, polarity, iterNo = -1)) ⇒ SimpleEntry
constructor
A new instance of SimpleEntry.
- #show(fp = STDERR) ⇒ Object
-
#to_s ⇒ Object
entryを文字列化する(ex. “回復する”) ====================================================.
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
#dPhrase ⇒ Object (readonly)
用言句
63 64 65 |
# File 'lib/nysol/dictionary.rb', line 63 def dPhrase @dPhrase end |
#iterNo ⇒ Object
辞書登録時のiterNo
65 66 67 |
# File 'lib/nysol/dictionary.rb', line 65 def iterNo @iterNo end |
#polarity ⇒ Object
極性
64 65 66 |
# File 'lib/nysol/dictionary.rb', line 64 def polarity @polarity end |
#scFlag ⇒ Object (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_s ⇒ Object
entryを文字列化する(ex. “回復する”)
79 80 81 |
# File 'lib/nysol/dictionary.rb', line 79 def to_s return @dPhrase.to_s end |