I have two files both at the same directory:
http://nlp.lsi.upc.edu/awn/AWNDatabaseManagement.py.gz
the xml database of Arabic WordNet (http://nlp.lsi.upc.edu/awn/get_bd.php) upc_db.xml
When i try to run the .py file to give me the error in the image i am trying to check the .py file is working so i can import it as WordNet for arabic words
Can you help me through it?
Thanks
image for error
To read any binary file/db use the encoding="utf-8"
while opening the file/db.
UTF-8 is capable of encoding all 1,112,064 valid character code points in Unicode using one to four one-byte code units.
So, simple is the best.
To read the above binary file, use
ent = open(ent, 'rb')
instead of,
ent = open(ent)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With