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
e24f36c5
Commit
e24f36c5
authored
1 year ago
by
Solene Tarride
Browse files
Options
Downloads
Patches
Plain Diff
Add unknown token to charset
parent
c23b608a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dan/datasets/extract/arkindex.py
+2
-0
2 additions, 0 deletions
dan/datasets/extract/arkindex.py
with
2 additions
and
0 deletions
dan/datasets/extract/arkindex.py
+
2
−
0
View file @
e24f36c5
...
...
@@ -355,6 +355,8 @@ class ArkindexExtractor:
Convert charset to a LM-compatible charset. Ensure that special LM tokens do not appear in the charset.
"""
logger
.
info
(
"
Preparing language resources
"
)
# Add unknown token to charset
self
.
charset
.
add
(
self
.
unknown_token
)
# Build LM tokens
for
token
in
sorted
(
list
(
self
.
charset
)):
...
...
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