Class: YaCan::Dependency::Morphem
- Inherits:
-
Object
- Object
- YaCan::Dependency::Morphem
- Defined in:
- lib/yacan/dependency.rb
Instance Attribute Summary collapse
-
#baseform ⇒ Object
readonly
Returns the value of attribute baseform.
-
#feature ⇒ Object
readonly
Returns the value of attribute feature.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#reading ⇒ Object
readonly
Returns the value of attribute reading.
-
#surface ⇒ Object
readonly
Returns the value of attribute surface.
Instance Method Summary collapse
-
#initialize(xml) ⇒ Morphem
constructor
A new instance of Morphem.
- #to_s ⇒ Object
Constructor Details
#initialize(xml) ⇒ Morphem
Returns a new instance of Morphem.
53 54 55 56 57 58 59 |
# File 'lib/yacan/dependency.rb', line 53 def initialize(xml) @surface = xml.at('Surface').text @reading = xml.at('Reading').text @baseform = xml.at('Baseform').text @pos = xml.at('POS').text @feature = xml.at('Feature').text.split(',') end |
Instance Attribute Details
#baseform ⇒ Object (readonly)
Returns the value of attribute baseform.
65 66 67 |
# File 'lib/yacan/dependency.rb', line 65 def baseform @baseform end |
#feature ⇒ Object (readonly)
Returns the value of attribute feature.
65 66 67 |
# File 'lib/yacan/dependency.rb', line 65 def feature @feature end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
65 66 67 |
# File 'lib/yacan/dependency.rb', line 65 def pos @pos end |
#reading ⇒ Object (readonly)
Returns the value of attribute reading.
65 66 67 |
# File 'lib/yacan/dependency.rb', line 65 def reading @reading end |
#surface ⇒ Object (readonly)
Returns the value of attribute surface.
65 66 67 |
# File 'lib/yacan/dependency.rb', line 65 def surface @surface end |
Instance Method Details
#to_s ⇒ Object
61 62 63 |
# File 'lib/yacan/dependency.rb', line 61 def to_s "#{@surface}: #{@feature.join(',')}" end |