Class: TokenTrieNER::Code

Inherits:
Object
  • Object
show all
Defined in:
lib/rbbt/ner/token_trieNER.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, type = nil) ⇒ Code

Returns a new instance of Code.



99
100
101
102
# File 'lib/rbbt/ner/token_trieNER.rb', line 99

def initialize(code, type = nil)
  @code = code
  @type = type
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



98
99
100
# File 'lib/rbbt/ner/token_trieNER.rb', line 98

def code
  @code
end

#typeObject

Returns the value of attribute type.



98
99
100
# File 'lib/rbbt/ner/token_trieNER.rb', line 98

def type
  @type
end

Instance Method Details

#to_sObject



104
105
106
# File 'lib/rbbt/ner/token_trieNER.rb', line 104

def to_s
  [type, code] * ":"
end