pub struct MorphemeList<T> { /* private fields */ }
Implementations§
source§impl<T: DictionaryAccess> MorphemeList<T>
impl<T: DictionaryAccess> MorphemeList<T>
sourcepub fn from_components(
dict: T,
input: InputBuffer,
path: Vec<ResultNode>,
subset: InfoSubset,
) -> Self
pub fn from_components( dict: T, input: InputBuffer, path: Vec<ResultNode>, subset: InfoSubset, ) -> Self
Creates MorphemeList from components
pub fn collect_results<U: DictionaryAccess>( &mut self, analyzer: &mut StatefulTokenizer<U>, ) -> SudachiResult<()>
sourcepub fn split_into(
&self,
mode: Mode,
index: usize,
out: &mut Self,
) -> SudachiResult<bool>
pub fn split_into( &self, mode: Mode, index: usize, out: &mut Self, ) -> SudachiResult<bool>
Splits morphemes and writes them into the resulting list The resulting list is not cleared before that Returns true if split produced more than two elements
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, idx: usize) -> Morpheme<'_, T>
pub fn surface(&self) -> Ref<'_, str>
pub fn iter(&self) -> MorphemeIter<'_, T> ⓘ
sourcepub fn get_internal_cost(&self) -> i32
pub fn get_internal_cost(&self) -> i32
Gets the whole cost of the path
pub fn dict(&self) -> &T
pub fn subset(&self) -> InfoSubset
pub fn copy_slice(&self, start: usize, end: usize, out: &mut Self)
pub fn lookup( &mut self, query: &str, subset: InfoSubset, ) -> SudachiResult<usize>
source§impl<T: DictionaryAccess + Clone> MorphemeList<T>
impl<T: DictionaryAccess + Clone> MorphemeList<T>
pub fn empty_clone(&self) -> Self
sourcepub fn split(&self, mode: Mode, index: usize) -> SudachiResult<MorphemeList<T>>
👎Deprecated since 0.6.1: use split_into
pub fn split(&self, mode: Mode, index: usize) -> SudachiResult<MorphemeList<T>>
Returns a new morpheme list splitting the morpheme with a given mode. Returns an empty list if there was no splits
Auto Trait Implementations§
impl<T> Freeze for MorphemeList<T>where
T: Freeze,
impl<T> !RefUnwindSafe for MorphemeList<T>
impl<T> !Send for MorphemeList<T>
impl<T> !Sync for MorphemeList<T>
impl<T> Unpin for MorphemeList<T>where
T: Unpin,
impl<T> !UnwindSafe for MorphemeList<T>
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> 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