Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
symspell
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nlpworkers
symspell
Commits
131c9676
Commit
131c9676
authored
3 years ago
by
Michal Pogoda
Browse files
Options
Downloads
Patches
Plain Diff
Added script for pickling dictionaries
parent
6509dd4e
Branches
Branches containing commit
No related merge requests found
Pipeline
#3801
failed with stage
in 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pickle_dictionaries.py
+16
-0
16 additions, 0 deletions
pickle_dictionaries.py
with
16 additions
and
0 deletions
pickle_dictionaries.py
0 → 100644
+
16
−
0
View file @
131c9676
from
symspellpy.symspellpy
import
SymSpell
import
argparse
from
pathlib
import
Path
if
__name__
==
'
__main__
'
:
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'
--input_dir
'
,
type
=
Path
,
required
=
True
,
help
=
'
Path to folder with raw dictionaries
'
)
parser
.
add_argument
(
'
--output
'
,
type
=
Path
,
required
=
True
,
help
=
'
Path to folder with pickles
'
)
args
=
parser
.
parse_args
()
args
.
output
.
mkdir
(
exist_ok
=
True
)
for
path
in
args
.
input_dir
.
glob
(
"
*.txt
"
):
symspell
=
SymSpell
()
symspell
.
load_dictionary
(
path
,
0
,
1
)
symspell
.
save_pickle
(
args
.
output
/
path
.
name
)
This diff is collapsed.
Click to expand it.
Preview
0%
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