I have done web scraping from a website in Arabic for the purpose of using the text as my training data for NER; Now I am trying to write each word with its associated tag (whether a named entity or not) into a CSV file, but in the CSV file the Arabic words are shown with these characters: وصلى How can I resolve this problem? I want the Arabic words to be shown in the Arabic script in my CSV file.
This is part of my code:
with open(filename, 'w', encoding='utf-8') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerow(fields)
csvwriter.writerows(rows)