Class: RedactNer::Result
- Inherits:
-
Struct
- Object
- Struct
- RedactNer::Result
- Defined in:
- lib/redact_ner.rb
Overview
Lightweight value object returned by Recognizer#analyze. Avoids forcing callers to remember Hash keys and gives a nicer #inspect.
Instance Attribute Summary collapse
-
#end ⇒ Object
Returns the value of attribute end.
-
#entity_type ⇒ Object
(also: #type)
Returns the value of attribute entity_type.
-
#recognizer_name ⇒ Object
Returns the value of attribute recognizer_name.
-
#score ⇒ Object
Returns the value of attribute score.
-
#start ⇒ Object
Returns the value of attribute start.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
Instance Attribute Details
#end ⇒ Object
Returns the value of attribute end
15 16 17 |
# File 'lib/redact_ner.rb', line 15 def end @end end |
#entity_type ⇒ Object Also known as: type
Returns the value of attribute entity_type
15 16 17 |
# File 'lib/redact_ner.rb', line 15 def entity_type @entity_type end |
#recognizer_name ⇒ Object
Returns the value of attribute recognizer_name
15 16 17 |
# File 'lib/redact_ner.rb', line 15 def recognizer_name @recognizer_name end |
#score ⇒ Object
Returns the value of attribute score
15 16 17 |
# File 'lib/redact_ner.rb', line 15 def score @score end |
#start ⇒ Object
Returns the value of attribute start
15 16 17 |
# File 'lib/redact_ner.rb', line 15 def start @start end |
#text ⇒ Object
Returns the value of attribute text
15 16 17 |
# File 'lib/redact_ner.rb', line 15 def text @text end |
Instance Method Details
#length ⇒ Object
26 27 28 |
# File 'lib/redact_ner.rb', line 26 def length self.end - start end |
#to_h ⇒ Object
30 31 32 |
# File 'lib/redact_ner.rb', line 30 def to_h super end |