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

Issue in finding Synonyms of words using PyDictinary API #16

Open
frenky13 opened this issue Apr 17, 2018 · 8 comments
Open

Issue in finding Synonyms of words using PyDictinary API #16

frenky13 opened this issue Apr 17, 2018 · 8 comments

Comments

@frenky13
Copy link

I have been working on a project for documents analysis and developing it in Python. For analysis, I have been using Pydictionary for finding the synonyms of adverbs and adjective words. Earlier the API was working good and gives good results and I appreciate the developer for developing such an optimized and fast API. But from past couple of days, the API is not working properly. It gives me unexpected errors like "word has no Synonyms in the API". Sometimes it finds synonyms and but sometimes not. Can you please suggest me some solution for the same. I have been using PyDictionary version 1.5.2 in my project.
Attaching snippet.

screenshot_20180417_133411

Thanks!!

@ShwetaNagdev
Copy link

Yes I am facing the same issue. Sometimes it gives synonyms sometimes it doesn't. Is the API under maintenance or there is some other problem?. Please let us know as soon as possible about what is the problem and when it will be solved. Thank You

@geekpradd
Copy link
Owner

@above,
Will get back to you soon.

@Chmits
Copy link

Chmits commented Jun 6, 2018

I'm facing the same issue !! what's wrong !!

@Deepakdubey90
Copy link

Deepakdubey90 commented Jun 11, 2018

@geekpradd , I was looking into it, found some index related error in both case antonyms/synonyms both, due to that exception its getting outside from try-block and return the result as None.

terms = data.select("section.antonyms")[1].findAll("li")
IndexError: list index out of range

@BillBrazerZhang
Copy link

@geekpradd
I come with the same problem. I found that in function synonym(term):

terms = data.select("div#filters-0")[0].findAll("li")
just return an empty list, i.e. len(terms) = 0

I don't know much about searching text in website and what "div#filters-0" means, so can anyone know what's wrong with this instruction?

@WittmannF
Copy link

Same here:

from PyDictionary import PyDictionary as P
d = P()
d.synonym("Life")

gives:

Life has no Synonyms in the API

@cratervale
Copy link

Same Error

@Bhamil07734
Copy link

Bhamil07734 commented Oct 12, 2018

I'm a bit new to python and html, but through stumbling around a bit I was able to alter the original code to this point:

SynAntDictionary.txt

Before I was getting no results. I assume that thesaurus.com must have changed their code significantly enough to throw off the original selection/filter method. With this code I get results for every word that i've been able to access while browsing thesaurus.com manually during my limited testing. Of course It will still give the same error if theasurus.com does not return results. I would appreciate any further improvements/debugging. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants