Module nlprule::types[][src]

Fundamental types used by this crate.

Re-exports

pub use crate::tokenizer::tag::PosId;
pub use crate::tokenizer::tag::WordId;

Modules

owned

Owned versions of the types for use in longer-living structures not bound to the 't lifetime e.g. rule tests.

Structs

IncompleteSentence

A incomplete sentence containing partially set information about the tokens. Can be converted to a complete sentence with into_sentence.

IncompleteToken

A token where varying levels of information are set.

Position

A position in a text. Determined by a byte and char index. Can be an absolute position (offset relative to zero) or a position delta (offset relative to some other position).

Sentence

A Sentence. As opposed to IncompleteSentence, all information is set and frozen. Always contains at least one token.

Span

A span in a text determined by start (inclusive) and end (exclusive) position. The start must always be greater than or equal to the end.

Suggestion

Suggestion for change in a text.

Token

A finished token with all information set. The main difference to IncompleteToken is that all the information is frozen.

Word

Contains all the local information about a token i. e. the text itself and the WordDatas associated with the word.

WordData

Lemma and part-of-speech tag associated with a word.