diff --git a/src/morphodict/phrase_translate/types.py b/src/morphodict/phrase_translate/types.py index f0f345eb4..fa039b432 100644 --- a/src/morphodict/phrase_translate/types.py +++ b/src/morphodict/phrase_translate/types.py @@ -29,7 +29,7 @@ class PhraseAnalyzedQuery: def __init__(self, query: str, add_verbose_message=None): self.query = query self.has_tags = False - self.filtered_query = None + self.filtered_query: str | None = None self.tags = None phrase_analyses: list[str] = source_phrase_analyses(query) diff --git a/src/morphodict/search/runner.py b/src/morphodict/search/runner.py index 7dbf86bf9..b92dcd947 100644 --- a/src/morphodict/search/runner.py +++ b/src/morphodict/search/runner.py @@ -167,6 +167,10 @@ def wordnet_search(query: Query) -> list[tuple[WordnetEntry, SearchResults]] | N espt_search.convert_search_query_to_espt() espt_search.inflect_search_results() find_pos_matches(espt_search, wn_results) + if wordnet_search.analyzed_query.filtered_query: + wn_entry.original_str = str( + wordnet_search.analyzed_query.filtered_query + ) results.append((wn_entry, wn_results)) return results