Skip to content

Commit

Permalink
made picklable (first draft)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislit committed Jan 28, 2019
1 parent ebfe38d commit 7b9f978
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion abydos/corpus/_unigram_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
__all__ = ['UnigramCorpus']


def _dd_default(*args):
return 0, 0

class UnigramCorpus(object):
"""Unigram corpus class.
Expand Down Expand Up @@ -82,7 +85,7 @@ def __init__(
.. versionadded:: 0.4.0
"""
self.corpus = defaultdict(lambda: (0,0))
self.corpus = defaultdict(_dd_default)
self.transform = word_transform
self.tokenizer = word_tokenizer
self.doc_count = documents
Expand Down

0 comments on commit 7b9f978

Please sign in to comment.