-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
You might want to consider the fixes and enhancements present in my own version. |
Could you give a quick tl;dr of the changes? |
I took a deeper look myself, so only fuzzy searching, right? There's one thing that I don't understand though, what is this |
Major bug fix : the headwords aren't unique, hence the structure holding the headwords can't be an hash map. Additions:
|
I'm also dealing with the |
I've also added a fix (cf. the normalize function) for bad dictionaries, not generated by dictfmt, where the entries in the index don't honor the lowercased/non-alphanumeric transformation rules. Another useful addition : I'm handling the optional fourth column (cf. |
Useful changes, thanks, I'll incorporate the changes into the PR |
I'm a bit confused about the freedict format @baskerville, |
1 similar comment
I'm a bit confused about the freedict format @baskerville, |
I think you must be referring to the examples in |
It's not only in |
The aforementioned dictionary is fine because the definitions don't repeat the headword literally:
|
If you're looking for good dictd dictionaries, you might want to checkout my own version of WordNet 3.1. |
It might be worth mentioning that I've also wrote sdunpack. |
Still not really sure what's the difference between the two dicts besides one having additional information alongside the headword and the example one doesn't. Parsing both works as expected I guess. |
Also, do you think it would be a good idea to introduce a search where diacritics and special characters don't matter? There's a crate |
To put it simply: the The rest is just a matter of style. |
If you're looking for good dictd dictionaries, you might want to checkout [my own version of WordNet 3.1](https://www.mobileread.com/forums/showpost.php?p=4006583&postcount=772).
Actually, the largest collection is FreeDict -- https://freedict.org . Guess
why this crate is within this organisation :-).
|
Thanks for your work.
I am still on your other PR and haven't found enough time to summarise my
review.
A short meta comment: would you please try to isolate changes into separate
commits and make the commit descriptions more helpful? More than a one-liner
and explanations on what was changed why would be great.
Thanks again.
|
I think it might be problematic because the format itself dictates the transformation that should be applied to the search terms (the one used on the headwords):
|
Could I just make a changelog, the commits were already made and pushed so resetting isn't exactly a possibility. I could reset and open a new branch if you really need it to be in commit format. |
My understanding of the |
|
Yeah, that's what I was trying to say. Do you think we should add it? |
We could, but I'm not sure how to implement it efficiently: using binary search would require the anyascii transformation to be already applied to all the headwords. |
We could I guess it doesn't matter though, it would be opt-in. What do you think? |
Relaxed queries are queries in which diacritics and other special characters are checked by their transliterated representation.
Changelog:Added
Changed
Many thanks to @baskerville for his input and his implementation over at plato, most of it is just his code reworked a tad bit. You can copy the changelog if you merge-squash this PR into the commit message, @humenda. |
@humenda Can you merge the squash merge the PR with the above changelog? |
Thanks for your work. Just to let you know, I am not able to use the review functionality of GitHub and am hence using plain text comments. Great that you picked up the refactoring. I have merged the changes to Two general comments (probably said before):
I would like you to ask to rework the following things:
Would you be willing to make a PR with the requested changes to |
Thanks, I'll review the changes today. Could you do me a favour and rebase and
squash the changes yourself?
|
Hi, I stumbled upon this gem of a library when I had the idea of creating a personal cli dictionary for myself. Decided to pitch in somehow so that it gets released to crates.io finally.
Also made the interface of the previously named
DictReaderDz
not depend onBufRead
, but rather have it universallyRead + Seek
.