Class: NHKore::TinySplitter
Instance Attribute Summary collapse
-
#tiny ⇒ Object
Returns the value of attribute tiny.
Instance Method Summary collapse
- #end_split(str) ⇒ Object
-
#initialize ⇒ TinySplitter
constructor
A new instance of TinySplitter.
Methods inherited from Splitter
Constructor Details
#initialize ⇒ TinySplitter
Returns a new instance of TinySplitter.
50 51 52 53 54 55 56 |
# File 'lib/nhkore/splitter.rb', line 50 def initialize(*) require 'tiny_segmenter' super @tiny = TinySegmenter.new end |
Instance Attribute Details
#tiny ⇒ Object
Returns the value of attribute tiny.
48 49 50 |
# File 'lib/nhkore/splitter.rb', line 48 def tiny @tiny end |
Instance Method Details
#end_split(str) ⇒ Object
58 59 60 |
# File 'lib/nhkore/splitter.rb', line 58 def end_split(str) return @tiny.segment(str,ignore_punctuation: true) end |