Imene KOLLI
Imene KOLLI

Reputation: 117

How to install Farasa stemmer?

I tried to install FarasaStemmer and it was successful but when I tried:

from farasa.stemmer import FarasaStemmer
Stemmer = FarasaStemmer()

I got this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\moni kolli\anaconda3\lib\site-packages\farasa\__base.py", line 41, in __init__
    self._check_java_version()
  File "C:\Users\moni kolli\anaconda3\lib\site-packages\farasa\__base.py", line 144, in _check_java_version
    version_proc_output = subprocess.check_output(
  File "C:\Users\moni kolli\anaconda3\lib\subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\moni kolli\anaconda3\lib\subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\moni kolli\anaconda3\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\moni kolli\anaconda3\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

Upvotes: 0

Views: 1295

Answers (1)

Thulfiqar
Thulfiqar

Reputation: 392

you need to install Java on your machine.

from their official page

AN IMPORTANT REMARK The library, as it is a warpper for Java jars, requires that Java is installed in your system and is in your PATH. It is, also, not recommended to have a version below Java 1.7.

I had followed these instructions and installed Java and confirm the error is solved afterward

Upvotes: 1

Related Questions