GithubHelp home page GithubHelp logo

Comments (7)

Sue-Fwl avatar Sue-Fwl commented on June 8, 2024

... 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'

from textblob-ar.

enssaf avatar enssaf commented on June 8, 2024

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

from textblob-ar.

Sue-Fwl avatar Sue-Fwl commented on June 8, 2024

I found the two lists, you can download them from sourceforge https://sourceforge.net/projects/ar-text-mining/files/Arabic-Corpora/
https://sourceforge.net/projects/ar-text-mining/files/Arabic-Corpora/OSAc-wordlist.7z/download
https://sourceforge.net/projects/ar-text-mining/files/Arabic-Corpora/bbc-arabic-wordlist.7z/download

But the function still didn't work for me.

from textblob-ar.

enssaf avatar enssaf commented on June 8, 2024

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)

from textblob-ar.

Sue-Fwl avatar Sue-Fwl commented on June 8, 2024

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()))

from textblob-ar.

mennatallah644 avatar mennatallah644 commented on June 8, 2024

The function still doesn't work for me

from textblob-ar.

heba-alnouri avatar heba-alnouri commented on June 8, 2024

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()))

from textblob-ar.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.