Skip to content

Commit

Permalink
tune regexp to match complex words
Browse files Browse the repository at this point in the history
  • Loading branch information
Илья Лебедев committed Jul 29, 2019
1 parent 112165e commit d408d73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rozental_as_a_service/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.8'
__version__ = '0.0.9'
2 changes: 1 addition & 1 deletion rozental_as_a_service/rozental.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def extract_words(raw_constants: List[str], min_word_length: int = 3, only_russi
processed_words: List[str] = []
for constant in raw_constants:
processed_words += list({
w.strip().lower() for w in re.findall(r'\w+', constant)
w.strip().lower() for w in re.findall(r'[\w-]+', constant)
if len(w.strip()) >= min_word_length
})
processed_words = list(set(processed_words))
Expand Down

0 comments on commit d408d73

Please sign in to comment.