Skip to content
Snippets Groups Projects
Commit 3ce7377e authored by Matic Perovšek's avatar Matic Perovšek
Browse files

pos tagging fix

pickling of nltk corpuses in subprocesses fixed
parent 09438969
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment