Arabic text does not appear in R-

Just started working with R in Arabic as I plan on doing text analysis and predictive text processing with Hadith corpus. I've read the threads related to my question, but still can't get my hands on the REAL basics (sorry, absolute newbie).

So I entered: textarabic.v <scan ("data / arabic-text.txt", encoding = "UTF-8", which = "character", sep = "\ n")

And what comes textarabic.v

out is, of course, symbols (fig.). Before that, I saved my text in utf-8 when I read in the stream, but nothing is displayed in Arabic yet.

I can type Arabic R, but scanning brings the text into characters.

enter image description here

Also read and try to implement another user is the codes to make the Arabic text function, but I don't even know how or where to implement them. I added R, tm and NLP to the packages.

What do you suggest I do next? Thanks in advance,

+3


source to share


1 answer


I just posted an answer that said you must definitely use R on Windows before I see your comment that you are on OSX. On OSX, the situation isn't all that bad. The problem is that you are using a too old version of R. If I remember correctly, anything before 3.2 does not handle Unicode correctly. Try installing 3.3.3 from https://cran.r-project.org/bin/macosx/ and reinstall the packages you need if necessary. Then everything will be fine. بالتوفيق!



0


source







All Articles