pub struct AugmentationDetectLanguage { /* private fields */ }
Expand description
Will run language and script detection using whatlang.
This is recommended to be run on whole sentences before splitting them into words.
It is unlikely to yield desireable results on the word level as words are usually valid in more than one language.
Implementations§
Source§impl AugmentationDetectLanguage
impl AugmentationDetectLanguage
Sourcepub fn new_with_detector(detector: Detector) -> Self
pub fn new_with_detector(detector: Detector) -> Self
Create a new AugmentationDetectLanguage instance with a custom whatlang Detector.
Trait Implementations§
Source§impl Augmenter for AugmentationDetectLanguage
impl Augmenter for AugmentationDetectLanguage
Source§fn augment<'a>(&self, token: SegmentedToken<'a>) -> SegmentedToken<'a>
fn augment<'a>(&self, token: SegmentedToken<'a>) -> SegmentedToken<'a>
Apply augmentation function to the given token and return it.
Source§impl Clone for AugmentationDetectLanguage
impl Clone for AugmentationDetectLanguage
Source§fn clone(&self) -> AugmentationDetectLanguage
fn clone(&self) -> AugmentationDetectLanguage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AugmentationDetectLanguage
impl Debug for AugmentationDetectLanguage
Source§impl Default for AugmentationDetectLanguage
impl Default for AugmentationDetectLanguage
Source§fn default() -> AugmentationDetectLanguage
fn default() -> AugmentationDetectLanguage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AugmentationDetectLanguage
impl RefUnwindSafe for AugmentationDetectLanguage
impl Send for AugmentationDetectLanguage
impl Sync for AugmentationDetectLanguage
impl Unpin for AugmentationDetectLanguage
impl UnwindSafe for AugmentationDetectLanguage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Segmenter for Twhere
T: Augmenter,
impl<T> Segmenter for Twhere
T: Augmenter,
Source§type SubdivisionIter<'a> = IntoIter<SegmentedToken<'a>>
type SubdivisionIter<'a> = IntoIter<SegmentedToken<'a>>
The iterator type returned by the
subdivide
function if it has multiple results. Read moreSource§fn subdivide<'a>(
&self,
token: SegmentedToken<'a>,
) -> UseOrSubdivide<SegmentedToken<'a>, <T as Segmenter>::SubdivisionIter<'a>> ⓘ
fn subdivide<'a>( &self, token: SegmentedToken<'a>, ) -> UseOrSubdivide<SegmentedToken<'a>, <T as Segmenter>::SubdivisionIter<'a>> ⓘ
A method that should split the given
token
into zero, one or more subtokens. Read more