Skip to main content

Language

Enum Language 

Source
pub enum Language {
Show 30 variants Arabic, Azerbaijani, Basque, Bengali, Catalan, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hinglish, Hungarian, Indonesian, Italian, Japanese, Kazakh, Nepali, Norwegian, Portuguese, Romanian, Russian, Slovene, Spanish, Swedish, Tajik, Turkish,
}
Expand description

Text-processing language for BM25 tokenization. One variant per Qdrant Language; serializations match Qdrant’s snake_case names.

Variants§

§

Arabic

Arabic ("ar"). Snowball stemming + stopwords.

§

Azerbaijani

Azerbaijani ("az"). No default stemmer; stopwords only.

§

Basque

Basque ("eu"). No default stemmer; stopwords only.

§

Bengali

Bengali ("bn"). No default stemmer; stopwords only.

§

Catalan

Catalan ("ca"). No default stemmer; stopwords only.

§

Chinese

Chinese ("zh"). No default stemmer; stopwords only.

§

Danish

Danish ("da"). Snowball stemming + stopwords.

§

Dutch

Dutch ("nl"). Snowball stemming + stopwords.

§

English

English ("en"). Snowball stemming + stopwords.

§

Finnish

Finnish ("fi"). Snowball stemming + stopwords.

§

French

French ("fr"). Snowball stemming + stopwords.

§

German

German ("de"). Snowball stemming + stopwords.

§

Greek

Greek ("el"). Snowball stemming + stopwords.

§

Hebrew

Hebrew ("he"). No default stemmer; stopwords only.

§

Hinglish

Hinglish ("hi-en"). No default stemmer; stopwords only.

§

Hungarian

Hungarian ("hu"). Snowball stemming + stopwords.

§

Indonesian

Indonesian ("id"). No default stemmer; stopwords only.

§

Italian

Italian ("it"). Snowball stemming + stopwords.

§

Japanese

Japanese ("jp"). No default stemmer; stopwords only.

§

Kazakh

Kazakh ("kk"). No default stemmer; stopwords only.

§

Nepali

Nepali ("ne"). No default stemmer; stopwords only.

§

Norwegian

Norwegian ("no"). Snowball stemming + stopwords.

§

Portuguese

Portuguese ("pt"). Snowball stemming + stopwords.

§

Romanian

Romanian ("ro"). Snowball stemming + stopwords.

§

Russian

Russian ("ru"). Snowball stemming + stopwords.

§

Slovene

Slovene ("sl"). No default stemmer; stopwords only.

§

Spanish

Spanish ("es"). Snowball stemming + stopwords.

§

Swedish

Swedish ("sv"). Snowball stemming + stopwords.

§

Tajik

Tajik ("tg"). No default stemmer; stopwords only.

§

Turkish

Turkish ("tr"). Snowball stemming + stopwords.

Implementations§

Source§

impl Language

Source

pub fn name(self) -> &'static str

Canonical Qdrant spelling (snake_case, as Qdrant serializes it).

Source

pub fn parse(name: &str) -> Result<Self, QqlError>

Parse a language name or Qdrant two-letter alias ("es", "zh", "hi-en", …), ASCII-case-insensitively. The case-folding is a deliberate superset of Qdrant’s case-sensitive serde (same accepted set, friendlier spelling). Anything else fails closed.

Source

pub fn stem_algorithm(self) -> Option<Algorithm>

Snowball stemmer for this language, if Qdrant defines one.

Mirrors Qdrant’s Stemmer::try_default_from_language: exactly the 17 Snowball languages reachable via language stem (Armenian and Tamil exist in Qdrant’s SnowballLanguage but have no Language variant, so they are explicit-stemmer-only — see Stemmer). The rest (Chinese, Japanese, Hebrew, …) have no default stemmer and pass tokens through unstemmed. qdrant-rust-stemmers is the same crate family Qdrant uses, so the stems are identical.

Trait Implementations§

Source§

impl Clone for Language

Source§

fn clone(&self) -> Language

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 Copy for Language

Source§

impl Debug for Language

Source§

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

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

impl Default for Language

Source§

fn default() -> Self

Qdrant’s BM25 default: English stemming and stopwords.

Source§

impl Eq for Language

Source§

impl Hash for Language

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Language

Source§

fn eq(&self, other: &Language) -> 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 Language

Auto Trait Implementations§

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> EmbedderBound for T
where T: Send + Sync,

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.