Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
punctuator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nlpworkers
punctuator
Commits
a0549781
Commit
a0549781
authored
Oct 13, 2021
by
Michał Pogoda
Browse files
Options
Downloads
Patches
Plain Diff
Pep8 fixes
parent
a590b5ff
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!16
S3 synchronization and CI
Pipeline
#3888
passed
Oct 13, 2021
Stage: check_style
Stage: testing
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.dockerignore
+2
-1
2 additions, 1 deletion
.dockerignore
punctuator/punctuator.py
+4
-11
4 additions, 11 deletions
punctuator/punctuator.py
worker.py
+1
-7
1 addition, 7 deletions
worker.py
with
7 additions
and
19 deletions
.dockerignore
+
2
−
1
View file @
a0549781
models
example_texts
.tox
\ No newline at end of file
This diff is collapsed.
Click to expand it.
punctuator/punctuator.py
+
4
−
11
View file @
a0549781
"""
Implementation of punctuator service
"""
import
configparser
import
json
import
string
import
os
import
string
import
nlp_ws
from
transformers
import
AutoModelForTokenClassification
,
AutoTokenizer
import
language_tool_python
from
transformers
import
AutoModelForTokenClassification
,
AutoTokenizer
from
punctuator.utils
import
(
combine_masks
,
decode
,
decode_labels
,
inference_masks
,
)
from
punctuator.utils
import
(
combine_masks
,
decode
,
decode_labels
,
inference_masks
)
def
_preprocess_input
(
text
:
str
):
...
...
This diff is collapsed.
Click to expand it.
worker.py
+
1
−
7
View file @
a0549781
"""
Implementation of punctuator service
"""
import
argparse
import
configparser
import
json
import
string
import
os
import
nlp_ws
from
transformers
import
AutoModelForTokenClassification
,
AutoTokenizer
import
language_tool_python
import
argparse
from
punctuator.punctuator
import
Punctuator
...
...
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