natural
natural copied to clipboard
Not compatible with electron?
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.
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
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
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