Class: NHKore::TinySplitter

Inherits:
Splitter show all
Defined in:
lib/nhkore/splitter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Splitter

#begin_split, #split

Constructor Details

#initializeTinySplitter

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

#tinyObject

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