pub struct TextSplitter {
pub split_separator: Separator,
pub recursive: bool,
pub clean_text: bool,
}Fields§
§split_separator: Separator§recursive: bool§clean_text: boolImplementations§
Source§impl TextSplitter
impl TextSplitter
pub fn new() -> Self
pub fn split_text(&self, text: &str) -> Option<VecDeque<TextSplit>>
pub fn on_two_plus_newline(self) -> Self
pub fn on_single_newline(self) -> Self
pub fn on_sentences_rule_based(self) -> Self
pub fn on_sentences_unicode(self) -> Self
pub fn on_words_unicode(self) -> Self
pub fn on_graphemes_unicode(self) -> Self
pub fn on_separator(self, split_separator: &Separator) -> Self
pub fn recursive(self, recursive: bool) -> Self
pub fn clean_text(self, clean_text: bool) -> Self
pub fn split_split( self, base_text: &Arc<str>, split_indices: &Range<usize>, ) -> Option<VecDeque<TextSplit>>
pub fn splits_to_text( splits: &VecDeque<TextSplit>, with_seperator: bool, ) -> String
Trait Implementations§
Source§impl Default for TextSplitter
impl Default for TextSplitter
Source§fn default() -> TextSplitter
fn default() -> TextSplitter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextSplitter
impl RefUnwindSafe for TextSplitter
impl Send for TextSplitter
impl Sync for TextSplitter
impl Unpin for TextSplitter
impl UnsafeUnpin for TextSplitter
impl UnwindSafe for TextSplitter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more