Class: Poliqarp::Segment

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#lemmataObject (readonly)

Returns the value of attribute lemmata.



9
10
11
# File 'lib/poliqarpr/segment.rb', line 9

def lemmata
  @lemmata
end

#literalObject (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_sObject

Returns the segment literal



19
20
21
# File 'lib/poliqarpr/segment.rb', line 19

def to_s
  @literal
end