Skip to content

Commit

Permalink
Removal of debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
I8dNLo committed Sep 19, 2024
1 parent 400ffb1 commit 1905163
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions fastembed/sparse/bm25.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
]


def append_to_file(file_path, token):
with open(file_path, "a") as file:
file.write(token + "\n")


def remove_non_alphanumeric(text):
return re.sub(r"[^\w\s]", " ", text, flags=re.UNICODE)

Expand Down Expand Up @@ -237,11 +232,9 @@ def _stem(self, tokens: List[str]) -> List[str]:
if len(token) > 40:
continue

append_to_file("tokens", token.lower())
stemmed_token = self.stemmer.stemWord(token.lower())

if stemmed_token:
append_to_file("stemmed_tokens", stemmed_token)
stemmed_tokens.append(stemmed_token)
return stemmed_tokens

Expand Down

0 comments on commit 1905163

Please sign in to comment.