Repository navigation
Expand ambiguous surfaces to every lemma they are a form of - #124
Merged
Merged
Conversation
lexical.db v0.5.0 lists the extra lemmas of ambiguous surfaces in surface_extra_base (פנינו: base פנה, also פנים). MagicDictionaryIndex now matches a token to each of its lemmas and counts it among the forms of each, so a search for פנינו also expands to the paradigm of פנים. The surface's variants stay with its primary lemma. Dictionaries without the table keep the previous query. Fixes kdroidFilter/SeforimMagicIndexer#3 Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes kdroidFilter/SeforimMagicIndexer#3 on the reader side.
Some surfaces are forms of several lemmas, but
lexical.dbtied each surface to onebase_idonly. Since #116/#117, a token expands to the entries it is truly a surface of, soפנינוexpanded to פנה only and never to פנים ("our face").The v0.5.0 dictionary adds
surface_extra_base(surface_id, base_id), with 26,670 extra lemmas judged in kdroidFilter/SeforimMagicIndexer#5.MagicDictionaryIndexnow reads it:inflections) of each of those lemmas, soexpansionFortreats them as its own entries.LOOKUP_SQL, so olderlexical.dbfiles work unchanged.Testing
:search:jvmTest --tests '*MagicDictionaryIndexTest*': 22/22, including a new test for theפנינו→ פנה + פנים case.פנינו→פנה,פני,פנים. Timing is unchanged (2–20 ms for frequent words likeכל,אמר).Note
DownloadLexicalDbonly picks a release asset named exactlylexical.db. v0.5.0 uses that name, and the v0.4.1 asset was renamed to match.