Class: FreelingClient::Token
- Inherits:
-
Object
- Object
- FreelingClient::Token
- Defined in:
- lib/freeling_client/token.rb
Instance Attribute Summary collapse
-
#form ⇒ Object
Returns the value of attribute form.
-
#lemma ⇒ Object
Returns the value of attribute lemma.
-
#pos ⇒ Object
Returns the value of attribute pos.
-
#prob ⇒ Object
Returns the value of attribute prob.
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(opt = {}) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(opt = {}) ⇒ Token
Returns a new instance of Token.
6 7 8 9 10 11 |
# File 'lib/freeling_client/token.rb', line 6 def initialize(opt = {}) @form = opt[:form] @lemma = opt[:lemma] @tag = opt[:tag] @prob = opt[:tag] end |
Instance Attribute Details
#form ⇒ Object
Returns the value of attribute form.
4 5 6 |
# File 'lib/freeling_client/token.rb', line 4 def form @form end |
#lemma ⇒ Object
Returns the value of attribute lemma.
4 5 6 |
# File 'lib/freeling_client/token.rb', line 4 def lemma @lemma end |
#pos ⇒ Object
Returns the value of attribute pos.
4 5 6 |
# File 'lib/freeling_client/token.rb', line 4 def pos @pos end |
#prob ⇒ Object
Returns the value of attribute prob.
4 5 6 |
# File 'lib/freeling_client/token.rb', line 4 def prob @prob end |
#tag ⇒ Object
Returns the value of attribute tag.
4 5 6 |
# File 'lib/freeling_client/token.rb', line 4 def tag @tag end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 16 |
# File 'lib/freeling_client/token.rb', line 13 def [](key) key = key.to_sym if key.is_a? String self.send(key) end |