pub struct LanguageModelFilesWriter;
Expand description

This struct creates language model files and writes them to a directory.

Implementations

Creates language model files for accuracy report generation and writes them to a directory.

input_file_path: The path to a txt file used for language model creation. The assumed encoding of the txt file is UTF-8.

output_directory_path: The path to an existing directory where the language model files are to be written.

language: The language for which to create language models.

char_class: A regex character class such as \\p{L} to restrict the set of characters that the language models are built from.

⚠ Panics if:

  • the input file path is not absolute or does not point to an existing txt file
  • the input file’s encoding is not UTF-8
  • the output directory path is not absolute or does not point to an existing directory
  • the character class cannot be compiled to a valid regular expression

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 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.