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



48
49
50
51
52
53
54
# File 'lib/nhkore/splitter.rb', line 48

def initialize(*)
  require 'tiny_segmenter'

  super

  @tiny = TinySegmenter.new
end

Instance Attribute Details

#tinyObject

Returns the value of attribute tiny.



46
47
48
# File 'lib/nhkore/splitter.rb', line 46

def tiny
  @tiny
end

Instance Method Details

#end_split(str) ⇒ Object



56
57
58
# File 'lib/nhkore/splitter.rb', line 56

def end_split(str)
  return @tiny.segment(str,ignore_punctuation: true)
end