Giter VIP home page Giter VIP logo

Comments (5)

1over137 avatar 1over137 commented on June 14, 2024

Hi,
Thanks for testing the tool!

This is actually the intended behavior. When lemmatize is set to true, it will follow the first link to the original form of the word, which will result in it omitting all other entries. In this case, it went to "livrer" because it finds a span.form_of tag in the definition.

The intended way to avoid this is the other button, "Define (direct)" that appears when you set "lemmatize" to true, which will temporarily set it to false.

from vocabsieve.

williamjr avatar williamjr commented on June 14, 2024

In this case, that doesn't quite make sense - since livre is the lemma for the noun forms of the word as well, which have an entirely different meaning than that of the verb form returned by the function. So it is not the case that the function is returning "the original form of the word" for livre in the sense of "book."

from vocabsieve.

1over137 avatar 1over137 commented on June 14, 2024

Well, unfortunately the library used to do the lemmatization is a simple database of words (think of a giant dict) and can't really handle homonyms reliably. From the wiktionary() function there's also no way to tell which sense is the intended one.

Though, the use of following links in wiktionary function is a historical thing, now that we have a dedicated library for that purpose. I might as well remove it because of these unintended effects. Btw, does this still happen if you choose another dictionary option (they don't follow links).

from vocabsieve.

williamjr avatar williamjr commented on June 14, 2024

Tbh I have only played with this Python function, not the GUI yet : )

Another option might be adjusting the implementation of the wikipedia lookup so that it doesn't exit too early. That is, if it finds a word is a form_of another word, rather than returning the recursive call to itself on the link it finds for the lemma word, it could just add the result to a list of definitions being collected. It may need to maintain a set of lemmas already looked up in order to avoid duplicates in the output list, though.

from vocabsieve.

1over137 avatar 1over137 commented on June 14, 2024

The commit 7060465 should remove the recursive lookup behavior. In addition while investigating this I found another important bug in the fmt_result function which causes the output to be repetitions of the first entry rather than display all entries in a sequence. Thanks for this issue! Now the wiktionary function will no longer act differently depending on lemmatize option, since that task has been delegated to the preprocessing part.

from vocabsieve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.