elasticlunr::lang

Trait Language

Source
pub trait Language {
    // Required methods
    fn name(&self) -> String;
    fn code(&self) -> String;
    fn tokenize(&self, text: &str) -> Vec<String>;
    fn make_pipeline(&self) -> Pipeline;
}

Required Methods§

Source

fn name(&self) -> String

The name of the language in English

Source

fn code(&self) -> String

The ISO 639-1 language code of the language

Source

fn tokenize(&self, text: &str) -> Vec<String>

Separates the input text into individual tokens. In most languages a token is a word, separated by whitespace.

Source

fn make_pipeline(&self) -> Pipeline

Returns the Pipeline to process the tokens with

Implementors§