Class: Myaso::Mystem::Lemma

Inherits:
Struct
  • Object
show all
Defined in:
lib/myaso/mystem.rb

Overview

Lemma is a canonical form of the word.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#flex_grammemesObject

Returns the value of attribute flex_grammemes

Returns:

  • (Object)

    the current value of flex_grammemes


7
8
9
# File 'lib/myaso/mystem.rb', line 7

def flex_grammemes
  @flex_grammemes
end

#flex_lengthObject

Returns the value of attribute flex_length

Returns:

  • (Object)

    the current value of flex_length


7
8
9
# File 'lib/myaso/mystem.rb', line 7

def flex_length
  @flex_length
end

#formObject

Returns the value of attribute form

Returns:

  • (Object)

    the current value of form


7
8
9
# File 'lib/myaso/mystem.rb', line 7

def form
  @form
end

#lemmaObject

Returns the value of attribute lemma

Returns:

  • (Object)

    the current value of lemma


7
8
9
# File 'lib/myaso/mystem.rb', line 7

def lemma
  @lemma
end

#msdObject

Returns the value of attribute msd

Returns:

  • (Object)

    the current value of msd


7
8
9
# File 'lib/myaso/mystem.rb', line 7

def msd
  @msd
end

#qualityObject

Returns the value of attribute quality

Returns:

  • (Object)

    the current value of quality


7
8
9
# File 'lib/myaso/mystem.rb', line 7

def quality
  @quality
end

#rule_idObject

Returns the value of attribute rule_id

Returns:

  • (Object)

    the current value of rule_id


7
8
9
# File 'lib/myaso/mystem.rb', line 7

def rule_id
  @rule_id
end

#stem_grammemesObject

Returns the value of attribute stem_grammemes

Returns:

  • (Object)

    the current value of stem_grammemes


7
8
9
# File 'lib/myaso/mystem.rb', line 7

def stem_grammemes
  @stem_grammemes
end

Instance Method Details

#formsObject

A shortcut to Myaso::Mystem.forms.


29
30
31
# File 'lib/myaso/mystem.rb', line 29

def forms
  Myaso::Mystem.forms(lemma, rule_id)
end

#inflect(grammemes) ⇒ Object

A shortcut to Myaso::Mystem.inflect.

:call-seq:

inflect(Hash)

37
38
39
# File 'lib/myaso/mystem.rb', line 37

def inflect(grammemes)
  Myaso::Mystem.inflect(forms, grammemes)
end

#inspectObject

:nodoc:


41
42
43
# File 'lib/myaso/mystem.rb', line 41

def inspect #:nodoc:
  '#<%s lemma=%s msd="%s">' % [self.class.name, to_s.inspect, msd]
end

#to_sObject

:nodoc:


45
46
47
# File 'lib/myaso/mystem.rb', line 45

def to_s #:nodoc:
  lemma
end