get_synonym() returns different results for same query

Issue #4 new
Former user created an issue

Depending on the timing of the request, I get very different synonym lists. Sometimes it is an empty list. Sometimes it is the pos I requested (e.g. 'verb'). Sometimes it is only the noun.

import lxml
from py_thesaurus import Thesaurus

word = 'find'
pos = 'verb'

print(Thesaurus(word).get_synonym(pos=pos))
print(Thesaurus(word).get_synonym(pos=pos))
print(Thesaurus(word).get_synonym(pos=pos))

produces:

[]
['locate', 'unearth', 'notice', 'detect', 'spot', 'discover', 'turn up', 'identify', 'meet', 'strike', 'uncover', 'recover', 'encounter', 'sight', 'recognize', 'expose', 'perceive', 'corral', 'espy', 'observe', 'descry', 'distinguish', 'discern', 'collar', 'pinpoint', 'bring to light', 'bump into', 'come across', 'come up with', 'come upon', 'ferret out', 'make out', 'arrive at', 'chance upon', 'dig up', 'fall in with', 'happen upon', 'hit upon', 'lay fingers on', 'light upon', 'run across', 'run into', 'scare up', 'smoke out', 'stumble upon', 'track down', 'trip on']
['boast', 'treasure', 'jewel', 'bargain', 'bonanza', 'gem', 'catch', 'pride', 'acquisition', 'asset', 'treasure trove', 'good buy', 'one in a million']

Comments (3)

  1. Log in to comment