Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with electron? #412

Open
lagartoverde opened this issue Mar 9, 2018 · 3 comments
Open

Not compatible with electron? #412

lagartoverde opened this issue Mar 9, 2018 · 3 comments
Labels
Browser Using natural in the browser Help/Questions

Comments

@lagartoverde
Copy link

Hi, I get this error using the library, I'm trying to use the natural Porter stemmer and the sentence tokeniser and in both of them I get the same error

Uncaught Error: ENOENT: no such file or directory, open '//../../../../data/kata-dasar.txt'
    at Object.fs.openSync (fs.js:652:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:172:20)
    at Object.fs.readFileSync (fs.js:553:33)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:508:29)

Thank you.

@Hugo-ter-Doest
Copy link
Collaborator

Are you using the Indonesian stemmer? It seems so because it needs kata-dasar.txt. Could you elaborate a bit more about what you did? And how you required the stemmer? Some code would help to solve this.

Hugo

@wandonye
Copy link

wandonye commented May 11, 2018

I can confirm this error with either

import {SentenceAnalyzer, PorterStemmer} from 'natural';
const analyzer = new SentenceAnalyzer("English", PorterStemmer, "afinn");

or the same codes as in README.md

I don't really need the Indonesian stemmer

@Hugo-ter-Doest
Copy link
Collaborator

I think you mean SentimentAnalyzer, and not SentenceAnalyzer...

Anyway, the path to the file kata-dasar.txt is wrong, because it has two leading //. Is it possible that electron handles this path wrong? Maybe because it is in a strange place above the folder of the indonesian stemmer?

Hugo

@Hugo-ter-Doest Hugo-ter-Doest added the Browser Using natural in the browser label Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Using natural in the browser Help/Questions
Projects
None yet
Development

No branches or pull requests

3 participants