[−][src]Struct lingua::LanguageModelFilesWriter
This struct creates language model files and writes them to a directory.
Implementations
impl LanguageModelFilesWriter
[src]
pub fn create_and_write_language_model_files(
input_file_path: &Path,
output_directory_path: &Path,
language: &Language,
char_class: &str
) -> Result<()>
[src]
input_file_path: &Path,
output_directory_path: &Path,
language: &Language,
char_class: &str
) -> Result<()>
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
impl RefUnwindSafe for LanguageModelFilesWriter
impl Send for LanguageModelFilesWriter
impl Sync for LanguageModelFilesWriter
impl Unpin for LanguageModelFilesWriter
impl UnwindSafe for LanguageModelFilesWriter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,