Skip to content

Commit

Permalink
Remove class parameter encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
BelenSantamaria committed Jan 28, 2022
1 parent e770f6c commit 443ebec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rasa_nlu_examples/extractors/flashtext_entity_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ def __init__(
self.keyword_processor = KeywordProcessor(
case_sensitive=config["case_sensitive"]
)
self.encoding = config.get("encoding")
for non_word_boundary in config["non_word_boundaries"]:
self.keyword_processor.add_non_word_boundary(non_word_boundary)
words = pathlib.Path(self.path).read_text(encoding=self.encoding).split("\n")
words = pathlib.Path(self.path).read_text(encoding=config["encoding"]).split("\n")
if len(words) == 0:
rasa.shared.utils.io.raise_warning(
f"No words found in the {pathlib.Path(self.path)} file."
Expand Down

0 comments on commit 443ebec

Please sign in to comment.