Struct filecount::unicode::UnicodeRules
source · [−]pub struct UnicodeRules;
Expand description
As a standard default segmentation ruleset Filecount uses the rust unicode implementation of Unicode Standard Annex #29. For more information see the unicode-segmentation crate
Trait Implementations
sourceimpl SegmentationRules for UnicodeRules
impl SegmentationRules for UnicodeRules
The Segmentation rules implementation for UnicodeRules
sourcefn segment<'a>(&self, section: &'a str) -> Vec<&'a str>
fn segment<'a>(&self, section: &'a str) -> Vec<&'a str>
Given a section of text, most likely containing multiple sentences, segment the text into translatable units.
sourcefn count_words(&self, segment: &str) -> usize
fn count_words(&self, segment: &str) -> usize
The amount of words in a particular segment
sourcefn count_characters(&self, segment: &str) -> usize
fn count_characters(&self, segment: &str) -> usize
The amount of non-whitespace characters in a particular segment
Auto Trait Implementations
impl RefUnwindSafe for UnicodeRules
impl Send for UnicodeRules
impl Sync for UnicodeRules
impl Unpin for UnicodeRules
impl UnwindSafe for UnicodeRules
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more