Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Tasdik Rahman
@tasdikrahman
Hey guys. Has anyone had an experience with Sphinx
Gareth Coles
@gdude2002
@prodicus Yes - Result
Tasdik Rahman
@tasdikrahman
The docs look great. So sphinx should be fine I guess. What do you think?
Gareth Coles
@gdude2002
Consdier whether you actually need it
If you're generating API docs, sphinx is not the way to go
You're better off using something like pydoctor
And wikis tend to be at least as efficient as sphynx docs - however, you'd have to host that
or use github's wiki
Sphinx is just very complicated and has some annyoing quirks
Tasdik Rahman
@tasdikrahman
Oh. Will have to ponder upon it then.
Gareth Coles
@gdude2002
If you do decide to use PyDoctor, just take note of twisted/pydoctor#98
Gareth Coles
@gdude2002
Tasdik Rahman
@tasdikrahman
Holy smokes. Did Vocabulary just get covered :grinning:
Gareth Coles
@gdude2002
That's how I found it, lol
Tasdik Rahman
@tasdikrahman
Haha. Thanks a lot @gdude2002 . Didn't know about that. Anyone else than pycoders? Just curious :smile:
Gareth Coles
@gdude2002
Haven't seen it elsewhere yet, but not all the newsletters were done this week so far
Anton Relin
@relisher
Hey guys - I added translation functionality with test cases
however, there are a few things that are failing with Travis-CI on code that I have not touched..
You can probably see my pull request on the page tho
Tasdik Rahman
@tasdikrahman

That's awesome @relisher . part_of_speech() raising False positives for a different order in the dictionary. Any ideas anybody on how to fix that?

Anyways, Merged them :smile:

Joydeep Bhattacharjee
@infinite-Joy
Hi the following happens when there is no internet or slow connection
from vocabulary import Vocabulary as vb
vb.synonym("car")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "vocabulary\vocabulary.py", line 193, in synonym
json_obj = Vocabulary.return_json(url)
File "vocabulary\vocabulary.py", line 82, in
return_json
response = requests.get(url)
File "C:\Python27\lib\site-packages\requests\api.py", line 69, in get
return request('get', url, params=params, kwargs)
File "C:\Python27\lib\site-packages\requests\api.py", line 50, in request
response = session.request(method=method, url=url,
kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 468, in reques
t
resp = self.send(prep, send_kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 576, in send
r = adapter.send(request,
kwargs)
File "C:\Python27\lib\site-packages\requests\adapters.py", line 423, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='glosbe.com', port
=443): Max retries exceeded with url: /gapi/translate?from=en&dest=en&format=jso
n&pretty=true&phrase=car (Caused by NewConnectionError('<requests.packages.urlli b3.connection.VerifiedHTTPSConnection object at 0x021158F0>: Failed to establish
a new connection: [Errno 11004] getaddrinfo failed',))
why is that scenario not covered ? Is this deliberate ?
Gareth Coles
@gdude2002
@infinite-Joy Well, it uses a web-service to get definitions and such
So naturally it's not going to work well offline
Joydeep Bhattacharjee
@infinite-Joy
Yes. But my question is should this be case be handled maybe through a try catch so that it gives a more meaningful output or should this be left to the developer who uses this package.
Tasdik Rahman
@tasdikrahman
Hey @infinite-Joy . Feel free to make a pull request.
Tasdik Rahman
@tasdikrahman
So someone has ported it go and it's no other than Karan :smile:
Here's a quick link
Tasdik Rahman
@tasdikrahman
Fixed the False positive error. If anybody is curious on it prodicus/vocabulary@19c9c44
Cheers!
Anton Relin
@relisher
eyyo nice work
Tasdik Rahman
@tasdikrahman
Thanks @relisher :smile:
byorxyz
@byorxyz
Hi @prodicus, I have a question- "seq": 0,1,2,3, - are they meaningful in synonym?
'seq' 0 is the best synonym for that word?
Tasdik Rahman
@tasdikrahman

Hey @yunazzang . Sorry for the late reply. Was too hung up with exams.
No the sequence number is not an indicator of the best possible synonym here.

Hope I answered your query.

Dave
@D4D3VD4V3
@prodicus: Small typo in the README.rst (Section 1.1) — "For a given word, using Vocabulary, you can get it's" should be "... its". Kinda ironic, right? ;)
Tasdik Rahman
@tasdikrahman
@D4D3VD4V3 Yeah. That should be fixed. Can you open a PR for it :smile: ?
Chizzy Alaedu
@tenorz007
@prodicus Appropriate for? PR #30 handles all fixes for #27
Tasdik Rahman
@tasdikrahman
@tenorz007 Code ooks good. Would be great if you could just paste some demo usage examples from the recent changes you made on the PR #30 thread. Would help me merge the PR faster.
Chizzy Alaedu
@tenorz007
@prodicus I did update the tests though, I felt that would reflect so!
Tasdik Rahman
@tasdikrahman

@tenorz007 Of course it does. But others on the thread can also get an abstract end point view of the changes that we are making here.

Coming back to that, we also need to update the docs for any breaking changes from the previous way our API worked.

Chizzy Alaedu
@tenorz007
@prodicus Have updated the PR to show it though
Tasdik Rahman
@tasdikrahman
@tenorz007 Yeah. Awesome. Saw that just now. See the comments on the thread.

For others, putting it verbatim from the PR

Before

>>> vb.pronunciation("hippopotamus")
[{"rawType": "ahd-legacy", "raw": "hip", "seq": 0}, {"rawType": "arpabet", "raw": "HH IH2 P AH0 P AA1 T AH0 M AH0 S", "seq": 0}]
>>> vb.part_of_speech("hello")
[{"text": "interjection", "example": "greeting", "seq": 0}]
>>> vb.antonym("hate")
{"text": ["hate"]}

After

>>> vb.pronunciation("hippopotamus")
[{"rawType": "ahd-legacy", "raw": "hip", "seq": 0}, {"rawType": "arpabet", "raw": "HH IH2 P AH0 P AA1 T AH0 M AH0 S", "seq": 1}]
>>> vb.part_of_speech("hello")
[{"text": "interjection", "example": "greeting", "seq": 0}, {"text": "verb-intransitive", "example": "To call.", "seq": 1}]
>>> vb.antonym("hate")
[{"text": "hate", "seq": 0}, {"text": "dislike", "seq": 1}, {"text": "hater", "seq": 2}]
Serene Kosaraju
@serenekosaraju_twitter
Unable to extract meanings from Vocabulary. For example:
vb.meaning("repudiate") returns a boolean value "False"
silviolorusso
@silviolorusso
same here