-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dealing with 'utf-8' encoding #15
Comments
I've managed to solve this issue myself by accessing to the liwc/liwc/dic.py file and changing the read_dic(filepath) method to read my file using the utf-8 encoding. |
Thank you for sharing your own solution. I would appreciate if you provided the details about it. By the way, I am trying to use this library not with a Spanish but with a German (from 2001) version. That is why I think your suggested solution might make this library work with the German 2001 .dic |
That's exactly what we did, I noticed that by applying that tiny change our code worked but I'm not sure If maybe it should also be changed somewhere else. Have you debuggered your code? |
Thank you very much for your quick reply. I actually haven't debugged the code. I don't find another solution for that, I will do that and post a reply. By the way, I faced exactly the same situation with another LIWC python library and open an issue there |
Hello there!
I'm dealing with a .dic file containing special characters such as "ñ" or "í", the problem lies whenever I do have to read such dictionary.
As an example: I do have the word "abadía" in my corpus and whenever I read it with liwc it appears as : "abadÃ\xada".
How could I deal with this?
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: