## generate some text in Arabic
x <- "\u628\u633\u645 \u0627\u0644\u0644\u0647
\u0627\u0644\u0631\u062D\u0645\u0646
\u0627\u0644\u0631\u062D\u064A\u0645"
## inspect
print(x)
## stem and transliterate
stemArabic(x)
## stem while not stemming certain words
stem(x, dontStemTheseWords = c("alr7mn"))
## stem and return the stemlist
out <- stemArabic(x,returnStemList=TRUE)
out$text
out$stemlist
Run the code above in your browser using DataLab