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§
Source§impl SegmentationRules for UnicodeRules
The Segmentation rules implementation for UnicodeRules
impl SegmentationRules for UnicodeRules
The Segmentation rules implementation for UnicodeRules
Source§fn 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.
Source§fn count_words(&self, segment: &str) -> usize
fn count_words(&self, segment: &str) -> usize
The amount of words in a particular segment
Source§fn 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 Freeze for UnicodeRules
impl RefUnwindSafe for UnicodeRules
impl Send for UnicodeRules
impl Sync for UnicodeRules
impl Unpin for UnicodeRules
impl UnwindSafe for UnicodeRules
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