LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
train_params_segmentation.h
Go to the documentation of this file.
1//
2// Created by tderouet on 09/08/22.
3//
4
5#ifndef LIMA_TRAIN_PARAMS_SEGMENTATION_H
6#define LIMA_TRAIN_PARAMS_SEGMENTATION_H
7#include <string>
8
10
11namespace deeplima
12{
13 namespace segmentation
14 {
15 namespace train
16 {
17
19 {
20
24 bool train_mwt; // also predict multiword-token surfaces (implies train_ss)
25 // Word list of the lexicon feature (segmentation/impl/segm_lexicon.h),
26 // copied beside the model as <model>.pt.lex; empty: no lexicon
27 std::string m_lexicon_fn;
28 // Embedding size of the character unigrams, bigrams and trigrams
29 // (0: 2, 3 and 4, the sizes before this option)
30 size_t m_char_embd_dim = 0;
31 // Character n-grams seen at most this many times per million
32 // training characters are unknown
33 uint32_t m_min_ipm = 100;
34 // Loss weight of the end-of-sentence tags (1: none)
35 float m_eos_weight = 1.0;
36 // Keep the epoch with the best mean of dev character accuracy and
37 // sentence-end F1 instead of the best accuracy
38 bool m_select_eos = false;
39 // Learning rate factor after an epoch without improvement
40 double m_lr_decay = 0.9;
41
48 };
49
50 } // namespace train
51 } // namespace tagging
52} // namespace deeplima
53#endif //LIMA_TRAIN_PARAMS_SEGMENTATION_H
Edit rules for lemmatizing words absent from the lemma dictionary.
train_params_t(std::string device_string="cpu", float learning_rate=0.001, float weight_decay=0.00001, float beta_one=0.9, float beta_two=0.999, size_t max_epochs=100, size_t max_epochs_without_improvement=10, size_t batch_size=4, float input_dropout=0.3)