From 7152459ec752f456c09d8e759409fd839c406fc0 Mon Sep 17 00:00:00 2001
From: PrimozGodec
Date: Fri, 17 Nov 2023 14:26:32 +0100
Subject: [PATCH] Keywords - Temporary solution for supported languages
---
orangecontrib/text/keywords/__init__.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/orangecontrib/text/keywords/__init__.py b/orangecontrib/text/keywords/__init__.py
index 16a9527dd..783ecad13 100644
--- a/orangecontrib/text/keywords/__init__.py
+++ b/orangecontrib/text/keywords/__init__.py
@@ -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",