-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
[FR] Redirect conjuged verbs to their infinitive form #167
Comments
Can you explain what was wrong with variants ? |
There is nothing wrong with variants, I just can't get to make it work (and I have not really tried though). There may be something to do with the Trie also, but I am lacking of time to have a serious look at it. |
Ok. I might have a look tonight or tomorrow. |
Yes, it is an idea. Maybe a second JSON file is not needed, just keep all words into one file is OK. But you do as you prefer, we could iterate on it then :) |
I think that listing all the forms will certainly take a long time, but it seems to be the only solution, but it's really the last big step to make the dictionary complete and make it the most functional. |
The time is not an issue ;) |
I see, but then what's the expected behavior ?
|
Let's start the "easy" way and handle "pure" verbs like "pourraient" (when there is no ambiguity). It will be a great first move. We will handle more complex words later. Finally, you were right: using a separate JSON would help to manage those words. WDYF? |
Well, I believe it's not the easy way :) but let's see what can be done... |
The easy case is when the two first letters are not changing between the form and the infinitive. It should work with the PR. I tested the test dict on my kobo and searching for "colligeait" displays "colliger" definition. |
I built the full fr dictionary and it seems to work ok on my Kobo. The size increases is around 5MB and it's not noticeably slower. |
That's awesome! I will have some time tomorrow for the review, else it will be Monday (sorry for the delay). The first thing I saw and you should have a look, is when a word has several flexions. Try "suis", what will be the result? Small note: "pouvoir" and "pourraient" both start with the same letters, isn't it the easy case? |
Out of curiosity, how many words in total? |
|
I added a fix for 3rd group verbs. I will test further with my current book! |
Out of curiosity, which book? :D |
Nothing fancy but lot of verbs ;) "L'illusion" - Maxime Chattam And I found some issues I didn't fix yet...
|
Having 100% precision will be very very hard. If we can target 90% this is way better than any other dictionary ;)
Hm for such words we would lose the plural -> singular redirection 🤔 |
Yes, indeed... and I don't see how to fix it without another special case... looking for the a "{{S|nom|fr|flexion}}" and ignore the verb form in this case... |
I just checked and it works pretty well 👍 Of course, this is not perfect: "sembla" or "avais" for instance. Overall, his is quite a good feature! |
|
Yes, Kobo will display multiple words, for example "empire" will show "empire" but also "Empire". I never tested with 2 identic entries, that would be interesting :) I do not see the increase as an issue though.
We can start with the duplicated definition, WDYT? |
The only way to have 100% of success is to recover all the verbs in all their forms; you can't guess via an algorithm that "va" refer to"aller". But where can we find this list? the website "https://leconjugueur.lefigaro.fr/" has got it, so it exists somewhere... Another more complex solution, but which would reduce the list of words to write in a file, is to do as the "bescherelle" which is a conjugation dictionary; it does not have the complete list of verbs on all forms, he knows only the exceptions like "va" that comes from "aller" and for the rest of the verbs he only use patterns. Just a question : with the original dictionary of kobo reader, it's seems to me that it works with conjugated verbs, how does it work? Sorry for my bad english, I'm french. |
We already have this information in wiktionary. The problem is how to store it in the dict file so it works 100% on the time on kobo devices.
Aren't we all? ;) |
Yes I think we are all french ;) We are going to try to continue to speak in english... so what is the problem ? the search is to long or the dictionary to big for the storage? PS : |
Hm I am not sure I followed everything right, but there is no problem for now 🤔 We are just talking about how to handle corner cases like "je suis" that should return "être".
In this project, nothing is developped regarding the search algo. We just provide the dictionary and Kobo will work with it. The search algo used is the one from the Kobo (few details and other details). To be more comfortable with how the dictionary works, you should have a look at "Trie" and read resources I linked in the previous sentence. |
Nicolas, have a look at avais with its template:
It returns "'=oui" but "avoir" is expected. |
ok, I will try to have a look... the only solution to find "suis" is to use exceptions. Sometimes the word exist in a verb and a noun like "court" (verb : "courrir", and noun : "court" vs "long"). So you have to present the two définitions why not in two paragraph if we can do it, the first coming from the noun part of the dictionary and the second from the part of conjugated verbs. I will try too the last update of the dictionary too see the result. |
Done. See PR #204 |
I close this issue as the primary work has been merged. It will be easier to follow with specific issues (if needed). |
As requested it would be cool to have conjuged verbs redirecting to their infinitive form instead of nothing.
I already tried some things, but without success. I think we could make use of variants, but it is not clear yet how to do that.
The text was updated successfully, but these errors were encountered: