Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove articles during lookup #8

Open
flomlo opened this issue Feb 25, 2024 · 1 comment
Open

remove articles during lookup #8

flomlo opened this issue Feb 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@flomlo
Copy link

flomlo commented Feb 25, 2024

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.

@abdnh
Copy link
Owner

abdnh commented Mar 1, 2024

That's reasonabe. Will be happy to accept a PR that adds support for this.

@abdnh abdnh added the enhancement New feature or request label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants