Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

FileNotFoundError: [Errno 2] No such file or directory: 'data/bbc-arabic-wordlist.csv' #13

Open
MMamdouh96 opened this issue May 23, 2019 · 7 comments

Comments

@MMamdouh96
Copy link

No description provided.

@Sue-Fwl
Copy link

Sue-Fwl commented Oct 28, 2020

... The error is still visible when calling TextCorrection:

from textblob_ar import TextBlob
from textblob_ar.correction import TextCorrection
text = 'الاذدهاز'
TextCorrection().correct(text)
{'الاذهان', 'الازدهار', 'الادهان', 'الاندهاش'}
TextCorrection().correct(text, top=True)
 wl1 = Counter(self.words(open('data/bbc-arabic-wordlist.csv').read()))

FileNotFoundError: [Errno 2] No such file or directory: 'data/bbc-arabic-wordlist.csv'

@enssaf
Copy link

enssaf commented Oct 31, 2020

Please, add these files to the repository to run the code
bbc-arabic-wordlist.csv
OSAc-wordlist.csv

@enssaf
Copy link

enssaf commented Nov 1, 2020

Thank you
it works with little modification to the code
from textblob_ar import TextBlob
from textblob_ar.correction import TextCorrection
text = 'الاذدهاز'
TextCorrection().correction(text)
TextCorrection().correction(text, top=True)

@Sue-Fwl
Copy link

Sue-Fwl commented Nov 4, 2020

Thank you
it works with little modification to the code
from textblob_ar import TextBlob
from textblob_ar.correction import TextCorrection
text = 'الاذدهاز'
TextCorrection().correction(text)
TextCorrection().correction(text, top=True)

It needed a little more modification for me, I had to add the encoding type of the files in the correction.py script

wl1 = Counter(self.words(open('bbc-arabic-wordlist.csv', encoding='utf-8').read()))

@mennatallah644
Copy link

The function still doesn't work for me

@heba-alnouri
Copy link

try write the path as:
The Issue is with the file location, to make sure you took it correctly click on the file and click on Copy Relative Path
or try this:
wl1 = Counter(self.words(open('textblob_ar/data/bbc-arabic-wordlist.csv',encoding="utf-8").read()))

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

No branches or pull requests

5 participants