Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TextFlows
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KT
TextFlows
Commits
3ce7377e
Commit
3ce7377e
authored
10 years ago
by
Matic Perovšek
Browse files
Options
Downloads
Patches
Plain Diff
pos tagging fix
pickling of nltk corpuses in subprocesses fixed
parent
09438969
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
workflows/nltoolkit/lib/tagging_common_parallel.py
+1
-1
1 addition, 1 deletion
workflows/nltoolkit/lib/tagging_common_parallel.py
workflows/textflows.py
+6
-0
6 additions, 0 deletions
workflows/textflows.py
with
7 additions
and
1 deletion
workflows/nltoolkit/lib/tagging_common_parallel.py
+
1
−
1
View file @
3ce7377e
...
...
@@ -95,7 +95,7 @@ def universal_sentence_tagger_hub(input_dict):
print
"
evo nas!!!
"
#parallel for document in adc.documents:
new_documents
=
pool
.
map
(
partial
(
tag_document
,
partial
(
sentance_
tag_
a_
document
,
tagger
=
tagger
,
tagger_function
=
tagger_function
,
args
=
args
,
...
...
This diff is collapsed.
Click to expand it.
workflows/textflows.py
+
6
−
0
View file @
3ce7377e
...
...
@@ -335,6 +335,12 @@ class NltkCorpus():
return
getattr
(
self
.
_corpus
(),
name
)()
return
method
def
__repr__
(
self
):
return
"
NltkCorpus wrapper for
"
+
self
.
corpus_name
+
"
dataset
"
def
__getstate__
(
self
):
return
{
'
corpus_name
'
:
self
.
corpus_name
,
'
_corpus_methods
'
:
self
.
_corpus_methods
}
class
NltkRegexpTokenizer
():
"""
Wrapper for Nltk RegexTokenizer. Python
'
s regular expressions are not picklable.
...
...
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