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.



87
88
89
90
# File 'lib/rbbt/ner/token_trieNER.rb', line 87

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

Instance Attribute Details

#codeObject

Returns the value of attribute code.



86
87
88
# File 'lib/rbbt/ner/token_trieNER.rb', line 86

def code
  @code
end

#typeObject

Returns the value of attribute type.



86
87
88
# File 'lib/rbbt/ner/token_trieNER.rb', line 86

def type
  @type
end

Instance Method Details

#to_sObject



92
93
94
# File 'lib/rbbt/ner/token_trieNER.rb', line 92

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