perfidia / andip

Dictionary for natural language generator. It contains data about declension, conjugation, etc. (mainly for Polish and English language).
MIT License
4 stars 1 forks source link

DatabaseProvider: get_conf returns incorrect data #5

Closed perfidia closed 11 years ago

perfidia commented 11 years ago

Please check what does FileProvider returns.

ghost commented 11 years ago

done

perfidia commented 11 years ago

still not working

for the following code

ad1 = PlWikiProvider()
ad3 = FileProvider("../data/polish")

print ad3.get_conf("występuje")

ad1.get_word(("czasownik", "występować", {'aspekt': 'niedokonane', 'forma': 'czas terazniejszy', 'liczba': 'mnoga', 'osoba': 'trzecia'}))

print ad1.get_conf("występuje")

get_conf returns different results:

# FileProvider
[('czasownik', 'wyst\xc4\x99powa\xc4\x87', {'forma': 'czas tera\xc5\xbaniejszy',
 'osoba': 'pierwsza', 'aspekt': 'dokonane', 'liczba': 'pojedyncza'}), ('czasowni
k', 'wyst\xc4\x99powa\xc4\x87', {'forma': 'czas tera\xc5\xbaniejszy', 'osoba': '
trzecia', 'aspekt': 'dokonane', 'liczba': 'pojedyncza'})]
# PlWikiProvider
{'forma': 'czas terazniejszy', 'osoba': 'trzecia', 'type': 'czasownik', 'aspekt'
: 'niedokonane', 'liczba': 'pojedyncza'}