Class: Poliqarp::Segment
- Inherits:
-
Object
- Object
- Poliqarp::Segment
- Defined in:
- lib/poliqarpr/segment.rb
Overview
- Author
-
Aleksander Pohl ([email protected])
- License
-
MIT LICENSE
The segment is the smallest meaningful part of the text.
It may contain many lemmata, since the segments are sometimes not disambiguated.
Instance Attribute Summary collapse
-
#lemmata ⇒ Object
readonly
Returns the value of attribute lemmata.
-
#literal ⇒ Object
readonly
Returns the value of attribute literal.
Instance Method Summary collapse
-
#initialize(literal) ⇒ Segment
constructor
Creates new segment.
-
#to_s ⇒ Object
Returns the segment literal.
Constructor Details
#initialize(literal) ⇒ Segment
Creates new segment. The specified argument is the literal (as found in the text) representation of the segment.
13 14 15 16 |
# File 'lib/poliqarpr/segment.rb', line 13 def initialize(literal) @literal = literal @lemmata = [] end |
Instance Attribute Details
#lemmata ⇒ Object (readonly)
Returns the value of attribute lemmata.
9 10 11 |
# File 'lib/poliqarpr/segment.rb', line 9 def lemmata @lemmata end |
#literal ⇒ Object (readonly)
Returns the value of attribute literal.
9 10 11 |
# File 'lib/poliqarpr/segment.rb', line 9 def literal @literal end |
Instance Method Details
#to_s ⇒ Object
Returns the segment literal
19 20 21 |
# File 'lib/poliqarpr/segment.rb', line 19 def to_s @literal end |