Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DAN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
DAN
Commits
cfc54b7a
Commit
cfc54b7a
authored
1 year ago
by
Solene Tarride
Committed by
Mélodie Boillet
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Update doc with `--discount_fallback` option for LM
parent
82d7946e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!304
Update doc with `--discount_fallback` option for LM
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/usage/train/language_model.md
+13
-4
13 additions, 4 deletions
docs/usage/train/language_model.md
with
13 additions
and
4 deletions
docs/usage/train/language_model.md
+
13
−
4
View file @
cfc54b7a
...
...
@@ -20,9 +20,12 @@ At character-level, we recommend building a 6-gram model. Use the following comm
```
sh
bin/lmplz
--order
6
\
--text
my_dataset/language_model/corpus_characters.txt
\
--arpa
my_dataset/language_model/model_characters.arpa
--arpa
my_dataset/language_model/model_characters.arpa
\
--discount_fallback
```
Note that the
`--discount_fallback`
option can be removed if your corpus is very large.
The following message should be displayed if the language model was built successfully:
```
sh
...
...
@@ -62,16 +65,19 @@ Chain sizes: 1:1308 2:27744 3:159140 4:412536 5:717920 6:1028896
Name:lmplz VmPeak:12643224 kB VmRSS:6344 kB RSSMax:1969316 kB user:0.196445 sys:0.514686 CPU:0.711161 real:0.682693
```
### Subord-level
### Sub
w
ord-level
At subword-level, we recommend building a 6-gram model. Use the following command:
```
sh
bin/lmplz
--order
6
\
--text
my_dataset/language_model/corpus_subwords.txt
\
--arpa
my_dataset/language_model/model_subwords.arpa
--arpa
my_dataset/language_model/model_subwords.arpa
\
--discount_fallback
```
Note that the
`--discount_fallback`
option can be removed if your corpus is very large.
### Word-level
At word-level, we recommend building a 3-gram model. Use the following command:
...
...
@@ -79,9 +85,12 @@ At word-level, we recommend building a 3-gram model. Use the following command:
```
sh
bin/lmplz
--order
3
\
--text
my_dataset/language_model/corpus_words.txt
\
--arpa
my_dataset/language_model/model_words.arpa
--arpa
my_dataset/language_model/model_words.arpa
\
--discount_fallback
```
Note that the
`--discount_fallback`
option can be removed if your corpus is very large.
## Predict with a language model
See the
[
dedicated example
](
../predict/index.md#predict-with-an-external-n-gram-language-model
)
.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment