abdnh / abdnh/anki-wiktionary

remove articles during lookup

Offen
#8 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Python
Sterne
27
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi!

I'm currently using this addon to learn (modern) Greek. In principle this addon is a godsend (θεωδόρος) and it prevents me writing something very similar. But there are still some bugs.

In modern Greek, as in other languages like German, nouns are usually memorized including an article (cause that determines grammatical gender).
Unfortunately, the automatic lookup then doesn't work anymore. An example:

A card would state "η πλαζ" (the beach), but if one uses the wiktionary plugin to search for "η πλαζ" it would fail, while the search for "πλαζ" would be succesfull.

A similar thing can be observed when notes (for a good reason) are memorized together with some particle (like as/for/...) - the search than fails.

I guess these kinds of words are usually referred to as "stop words": https://en.wikipedia.org/wiki/Stop_word and luckily, there are high-quality lists available for basically every language.

On the other hand, we can't just blindly remove them, in case the note contains *only* the stopword.

So my proposition would be: For the lookup, we
1. look for exactly that term
2. if that fails, we remove stopwords and look again.

This will probably not catch every case out there, but for the time being it might be reasonable improvement.

Would you be willing to merge this kind of change?
It would probably involve
- adding the functionality of finding/downloading a stopword list (can likely be fully automated) or loading a user-specified one,
- modifying the lookup as described above.

I think I could get to it withing the next two weeks, then.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.