Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
speller2
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
Container Registry
Operate
Environments
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
speller2
Commits
15cca73b
Commit
15cca73b
authored
3 years ago
by
Bartłomiej Bojanowski
Browse files
Options
Downloads
Patches
Plain Diff
Add en, ru, uk language.
parent
1a1bbf58
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
Add en, ru, uk language.
Pipeline
#2999
passed with stage
in 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/speller2_worker.py
+6
-3
6 additions, 3 deletions
src/speller2_worker.py
with
6 additions
and
3 deletions
src/speller2_worker.py
+
6
−
3
View file @
15cca73b
...
...
@@ -14,14 +14,17 @@ class Speller2Worker(nlp_ws.NLPWorker):
def
static_init
(
cls
,
config
):
"""
One time static initialisation.
"""
_log
.
log
(
logging
.
INFO
,
"
Worker started loading static models
"
)
cls
.
_model
=
Speller
(
'
pl
'
)
cls
.
_model
=
{
'
pl
'
:
Speller
(
'
pl
'
),
'
ru
'
:
Speller
(
'
ru
'
),
'
en
'
:
Speller
(
'
en
'
),
'
uk
'
:
Speller
(
'
uk
'
)}
_log
.
log
(
logging
.
INFO
,
"
Worker finished loading static models
"
)
def
process
(
self
,
input_file
,
task_options
,
output_file
):
"""
Starting nlp process.
"""
_log
.
info
(
"
Processing
"
)
model
=
self
.
_model
language
=
task_options
.
get
(
'
lang
'
,
'
pl
'
)
model
=
self
.
_model
.
get
(
language
)
data
=
self
.
_read_file
(
input_file
)
...
...
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