Skip to content
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

Arabic output garbled from dictionary creation #28

Closed
mzeidhassan opened this issue Feb 13, 2019 · 2 comments
Closed

Arabic output garbled from dictionary creation #28

mzeidhassan opened this issue Feb 13, 2019 · 2 comments

Comments

@mzeidhassan
Copy link

Hi @mammothb,

I am using your code to create a frequency dictionary in Arabic.
My corpus file is in utf-8 format.

Here is the output I am getting:

طµظپطھظٹظ 2
515 1
ظٹط²ظٹظٹظ 4
طھظˆط³ظٹظ 12
ظپظƒطœ 2
ظٹظˆظƒظٹطھط 14
ط³ظٹط³ظˆط 5

This looks like corrupt characters, so I am not sure what is causing this.

I even tried to print out to file and used 'encoing='utf-8', but again I am getting the same result as you can see in the attached screen shot.
image

Any idea how can I fix this or what is causing this issue? I am using Anaconda with Python 3..5.2 by the way.

Thanks

@mzeidhassan
Copy link
Author

mzeidhassan commented Feb 13, 2019

I created a pull request that fixed this issue for me. I am not so familiar with pr submission, so I hope I did it right. Here is the link to the pr.
#29

Maybe, it's just easier to make the change at your end directly.

@mzeidhassan
Copy link
Author

The newly created frequency dictionary looks fine now.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant