Skip to main content

Marks

Struct Marks 

Source
pub struct Marks {
    pub part_of_speech: Vec<Vec<String>>,
    pub characters: String,
}
Expand description

What recognizes one kind of mark: parts of speech, and the characters its surface is made of.

A morpheme is of the kind when its part of speech starts with one of the lists of levels, or when its surface is not empty and every character of it is one of characters (or, with SurfaceRule::OneCharacter, when its surface is one of them). The surface is needed because a dictionary does not always give a mark the part of speech of a mark: IPADIC has no half-width symbols, so , is an unknown word and comes out as 名詞,サ変接続.

The surface is the one of the schema, normalized when the schema has a normalization. The schemas of this crate have none: their characters hold the full-width and the half-width forms side by side.

Fields§

§part_of_speech: Vec<Vec<String>>

The parts of speech of the kind: each one the first levels, from the coarsest, as 記号, 読点.

§characters: String

The characters a surface of the kind is made of.

Implementations§

Source§

impl Marks

Source

pub fn new(part_of_speech: &[&[&str]], characters: &str) -> Self

Makes the marks of a kind.

§Arguments
  • part_of_speech - The parts of speech of the kind, each one its first levels.
  • characters - The characters a surface of the kind is made of.
§Returns

The marks.

Trait Implementations§

Source§

impl Clone for Marks

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Marks

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Marks

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for Marks

Source§

impl PartialEq for Marks

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Marks

Auto Trait Implementations§

§

impl Forget for Marks

§

impl Freeze for Marks

§

impl Move for Marks

§

impl RefUnwindSafe for Marks

§

impl Send for Marks
where RawVecInner: Send,

§

impl Sync for Marks
where RawVecInner: Sync,

§

impl Unpin for Marks
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for Marks

§

impl UnwindSafe for Marks
where RawVecInner: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.