Skip to content

Commit

Permalink
Keywords - Temporary solution for supported languages
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed Nov 17, 2023
1 parent d4588b3 commit 7152459
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion orangecontrib/text/keywords/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
from orangecontrib.text import Corpus
from orangecontrib.text.keywords.mbert import mbert_keywords
from orangecontrib.text.keywords.rake import Rake
from orangecontrib.text.language import ISO2LANG
from orangecontrib.text.preprocess import StopwordsFilter

# all available languages for RAKE
from orangecontrib.text.vectorization import BowVectorizer

RAKE_LANGUAGES = StopwordsFilter.supported_languages()

# todo: refactor when refactoring language for keywords module
# this is a temporary solution since supported_languages now returns lang ISO codes
RAKE_LANGUAGES = [ISO2LANG[la] for la in StopwordsFilter.supported_languages()]
# all available languages for YAKE!
YAKE_LANGUAGE_MAPPING = {
"Arabic": "ar",
Expand Down

0 comments on commit 7152459

Please sign in to comment.