I tried to implement this code from NLP UPC research group to retrieve synonyms for some entered words. when I ran the testing method
def test():
"tests some functions"
a=wn.get_words(True)
print 'length of a: ', len(a)
print 'a[0]: ', a[0].tostring().decode('utf-8')
the output is unknowing encoding
length of a: 16043
a[0]: �����
in the same code the Unicode is already declared as
def _encode(data):
return data.encode('utf8')
and the platform that I used (net beans 7.2.1)is configured to support utf-8 encoding
how to solve this problem?