Skip to content

Commit

Permalink
Merge pull request #962 from VesnaT/schema_only_fix
Browse files Browse the repository at this point in the history
Document embedding: Fix schema_only typo
  • Loading branch information
PrimozGodec authored Apr 11, 2023
2 parents 07b0cbf + 9be1a75 commit 23da347
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions orangecontrib/text/widgets/owdocumentembedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Warning(OWWidget.Warning):
unsuccessful_embeddings = Msg("Some embeddings were unsuccessful.")

method: int = Setting(default=0)
language: str = Setting(default=DEFAULT_LANGUAGE, shema_only=True)
language: str = Setting(default=DEFAULT_LANGUAGE, schema_only=True)
aggregator: str = Setting(default="Mean")

def __init__(self):
Expand Down Expand Up @@ -165,8 +165,10 @@ def migrate_settings(cls, settings: Dict[str, Any], version: Optional[int]):
if version is None or version < 2:
# before version 2 settings were indexes now they are strings
# with language name and selected aggregator name
settings["language"] = LANGUAGES[settings["language"]]
settings["aggregator"] = AGGREGATORS[settings["aggregator"]]
if "language" in settings:
settings["language"] = LANGUAGES[settings["language"]]
if "aggregator" in settings:
settings["aggregator"] = AGGREGATORS[settings["aggregator"]]


if __name__ == "__main__":
Expand Down

0 comments on commit 23da347

Please sign in to comment.