Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Temporary fix to #43
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlu1248 committed Jun 28, 2021
1 parent e00d632 commit 2ec1fc0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pyate/term_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def add_to_counter(matcher, doc, i, matches):
for end_index, (insert_order, original_value) in self.trie.iter(
document.lower()):
term_counter[original_value] += 1
return term_counter
return dict(term_counter)

def count_terms_from_documents(self,
seperate: bool = False,
Expand All @@ -260,6 +260,7 @@ def count_terms_from_documents(self,
"""
# TODO: further optimize
# TODO: add type annotations

if hasattr(self, "_TermExtraction__term_counts"):
return self.__term_counts

Expand Down Expand Up @@ -289,7 +290,7 @@ def callback(counter_dict):
term_counter[term] += frequency

def error_callback(e):
print("Error: " + e)
print("Error: " + str(e))

if doAsync:
P = Pool()
Expand Down

0 comments on commit 2ec1fc0

Please sign in to comment.