Sha256: 49b18428371431329322b28d3225b516119a5494b0dd8898c6d21cef5f4dab10
Contents?: true
Size: 463 Bytes
Versions: 1
Compression:
Stored size: 463 Bytes
Contents
# frozen_string_literal: true module Roseflow module Text class Splitter def initialize(chunk_size:, chunk_overlap:) raise ArgumentError, "chunk overlap cannot exceed chunk size" if chunk_overlap > chunk_size @chunk_size = chunk_size @chunk_overlap = chunk_overlap end def split(text) raise NotImplementedError, "this class must be extended and the #split method implemented" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roseflow-0.1.0 | lib/roseflow/text/splitter.rb |