Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
omwn
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lexworkers
omwn
Commits
60a1558a
Commit
60a1558a
authored
Jul 22, 2020
by
Mateusz Gniewkowski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-1' into 'master'
Bug fixing See merge request
!3
parents
e323a2f2
2aac16c1
Pipeline
#933
passed with stages
in 1 minute and 33 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
docker-compose.yml
docker-compose.yml
+1
-0
info.json
info.json
+0
-0
src/omwn_worker.py
src/omwn_worker.py
+5
-1
No files found.
docker-compose.yml
View file @
60a1558a
...
...
@@ -15,3 +15,4 @@ services:
-
'
./config.ini:/home/worker/config.ini'
-
'
./src:/home/worker/src'
-
'
./main.py:/home/worker/main.py'
-
'
./info.json:/home/worker/info.json'
src/
info.json
→
info.json
View file @
60a1558a
File moved
src/omwn_worker.py
View file @
60a1558a
"""Implementation of omwn_worker."""
"""Implementation of omwn_worker."""
import
logging
import
json
import
lex_ws
import
nltk
from
nltk.corpus
import
wordnet
as
wn
my_logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -17,6 +19,8 @@ class OMWNWorker(lex_ws.LexWorker):
@
classmethod
def
static_init
(
cls
,
config
):
"""Initialize worker."""
nltk
.
download
(
'wordnet'
)
nltk
.
download
(
'omw'
)
my_logger
.
info
(
"Loading models..."
)
for
lang
in
languages
:
wn
.
lemmas
(
"test"
,
lang
=
languages
[
lang
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment