pub struct DNMParameters {
    pub special_tag_name_options: HashMap<String, SpecialTagsOption>,
    pub special_tag_class_options: HashMap<String, SpecialTagsOption>,
    pub normalize_white_spaces: bool,
    pub wrap_tokens: bool,
    pub normalize_unicode: bool,
    pub stem_words_once: bool,
    pub stem_words_full: bool,
    pub convert_to_lowercase: bool,
    pub support_back_mapping: bool,
}
Expand description

Parameters for the DNM generation

Fields

special_tag_name_options: HashMap<String, SpecialTagsOption>

How to deal with special tags (e.g. <math> tags)

special_tag_class_options: HashMap<String, SpecialTagsOption>

How to deal with tags with special class names (e.g. ltx_note_mark) Remark: If both a tag name and a tag class match, the tag name rule will be applied.

normalize_white_spaces: bool

merge sequences of whitespaces into a single ’ ’. Doesn’t affect tokens

wrap_tokens: bool

put spaces before and after tokens

normalize_unicode: bool

Replace unicode characters by the ascii code representation

stem_words_once: bool

Apply the morpha stemmer once to the text nodes

stem_words_full: bool

Apply the morpha stemmer to the text nodes as often as it changes something

convert_to_lowercase: bool

Move to lowercase (remark: The stemmer does this automatically)

support_back_mapping: bool

Support back mapping, i.e. mapping plaintext offsets back to the DOM

Implementations

Normalize in a reasonable way for our math documents

Prints warnings, if the parameter settings don’t make sense. Doesn’t check for every possible stupidity

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Don’t do anything fancy and specific by default

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.