Class: Roseflow::Text::WordSplitter

Inherits:
RecursiveCharacterSplitter show all
Defined in:
lib/roseflow/text/word_splitter.rb

Constant Summary

Constants inherited from RecursiveCharacterSplitter

RecursiveCharacterSplitter::SEPARATORS

Instance Attribute Summary

Attributes inherited from RecursiveCharacterSplitter

#chunk_overlap, #chunk_size

Instance Method Summary collapse

Methods inherited from RecursiveCharacterSplitter

#split

Methods inherited from Splitter

#split

Constructor Details

#initialize(separators = [" "], **kwargs) ⇒ WordSplitter

Returns a new instance of WordSplitter.



8
9
10
11
# File 'lib/roseflow/text/word_splitter.rb', line 8

def initialize(separators = [" "], **kwargs)
  super(**kwargs)
  @separators = separators
end