Last night I was trying to do something with Persian language (my mother tongue), and I found polyglot supports it. So, I installed libraries and dependencies and I also downloaded needed files (using polyglot downloader). When I do something like this :
a = Text("این یک جمله فارسی است.")
a.polarity
in python shell, it gives me the correct one. But when I do something like this (in python 2 & 3) :
farsi_text = ("این یک جمله خنثای فارسی است."
"این فیلم، فیلم خوبی نبود."
"اما روز، روز خوبی بود.")
sample_text = Text(farsi_text)
text_sentences = sample_text.sentences
it still works fine, but when I do this (in python 3) :
text_sentences.entities
It returns an empty list. and in Python 2, it returns an array of unicodes, so I can't use positive_sentiment or negative_sentiment methods.
Could anyone get a good result from an RTL language like Persian or Arabic?
P.S : I also asked this question on r/polyglot (link) but it seems I chose the wrong place to ask my question.
Greetings.
Last night I was trying to do something with Persian language (my mother tongue), and I found polyglot supports it. So, I installed libraries and dependencies and I also downloaded needed files (using polyglot downloader). When I do something like this :
in python shell, it gives me the correct one. But when I do something like this (in python 2 & 3) :
it still works fine, but when I do this (in python 3) :
It returns an empty list. and in Python 2, it returns an array of unicodes, so I can't use positive_sentiment or negative_sentiment methods.
Could anyone get a good result from an RTL language like Persian or Arabic?
P.S : I also asked this question on r/polyglot (link) but it seems I chose the wrong place to ask my question.