Class: PROIEL::Lemma
- Inherits:
-
TreebankObject
- Object
- TreebankObject
- PROIEL::Lemma
- Defined in:
- lib/proiel/lemma.rb
Instance Attribute Summary collapse
-
#dictionary ⇒ Dictionary
readonly
Source that the lemma belongs to.
-
#distribution ⇒ Hash{String, Integer}
readonly
keys are IDs of sources, the values give the frequency of the lemma per source.
-
#glosses ⇒ Hash{Symbol, String}
readonly
are language tags and the values the glosses.
-
#homographs ⇒ Array<[String, String]> identified homographs of this lemma. The
readonly
array contains pairs of lemma form (which will be homographs of this lemma form under the orthographic conventions of the language) and parts of speech.
-
#n ⇒ Object
readonly
Returns the value of attribute n.
-
#paradigm ⇒ Object
readonly
Returns the value of attribute paradigm.
-
#valency ⇒ Object
readonly
Returns the value of attribute valency.
Instance Method Summary collapse
-
#initialize(parent, xml = nil) ⇒ Lemma
constructor
Creates a new lemma object.
Methods inherited from TreebankObject
Constructor Details
#initialize(parent, xml = nil) ⇒ Lemma
Creates a new lemma object.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/proiel/lemma.rb', line 31 def initialize(parent, xml = nil) @dictionary = parent @n = nil @distribution = {} @homographs = [] @glosses = {} @paradigm = {} @valency = [] from_xml(xml) if xml end |
Instance Attribute Details
#dictionary ⇒ Dictionary (readonly)
Returns source that the lemma belongs to.
9 10 11 |
# File 'lib/proiel/lemma.rb', line 9 def dictionary @dictionary end |
#distribution ⇒ Hash{String, Integer} (readonly)
keys are IDs of sources, the values give the frequency of the lemma per source.
16 17 18 |
# File 'lib/proiel/lemma.rb', line 16 def distribution @distribution end |
#glosses ⇒ Hash{Symbol, String} (readonly)
are language tags and the values the glosses.
26 27 28 |
# File 'lib/proiel/lemma.rb', line 26 def glosses @glosses end |
#homographs ⇒ Array<[String, String]> identified homographs of this lemma. The (readonly)
array contains pairs of lemma form (which will be homographs of this lemma form under the orthographic conventions of the language) and parts of speech.
22 23 24 |
# File 'lib/proiel/lemma.rb', line 22 def homographs @homographs end |
#n ⇒ Object (readonly)
Returns the value of attribute n.
11 12 13 |
# File 'lib/proiel/lemma.rb', line 11 def n @n end |
#paradigm ⇒ Object (readonly)
Returns the value of attribute paradigm.
27 28 29 |
# File 'lib/proiel/lemma.rb', line 27 def paradigm @paradigm end |
#valency ⇒ Object (readonly)
Returns the value of attribute valency.
28 29 30 |
# File 'lib/proiel/lemma.rb', line 28 def valency @valency end |