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

usage in nodejs #1

Open
fk-hb opened this issue Nov 7, 2013 · 7 comments
Open

usage in nodejs #1

fk-hb opened this issue Nov 7, 2013 · 7 comments

Comments

@fk-hb
Copy link

fk-hb commented Nov 7, 2013

Hi,
First, I want to thank you: having snowball stemmer in javascript world is great.
I have two questions:

  • how stable is this library. You just release it. is it stable enough?
  • I'd like to use it within nodejs and I had some issues:
  • first the package is not nodejs friendly we can't just require it after an npm install. i had to copy the js files from dest directory.
  • I had a bug in this.setCurrent$S(""); which is very strange since it is defined in the BaseStemmer.prototype.
    do you have a working sample in nodejs?
    Thanks,
@kaue
Copy link

kaue commented Mar 27, 2015

+1

@shibukawa
Copy link
Owner

Sorry, I missed this issue.

It is stable. Original Snowball stemmer contains more than 100 thousands test cases (pairs of original word and stemmed word), and this code (and Python codes I made with this code) returns 100% compatible result. I understand only English, I can't test more.

I don't like commit resulting files into repository. But I will add them on release pages.

The following code works for me.

var PorterStemmer = require('./porter-stemmer.common.js').PorterStemmer;

var stemmer = new PorterStemmer();
console.log(stemmer.stemWord("baby"));

@shibukawa
Copy link
Owner

@fairhat
Copy link

fairhat commented Aug 14, 2015

trying to load the module:

var Stemmer = require('porter-stemmer.common.js').PorterStemmer;
//or
var Stemmer = require('snowball-stemmer.jsx/porter-stemmer.common.js');
//or
var Stemmer = require('snowball-stemmer.jsx/dest/porter-stemmer.common.js');

Nothing seems to actually work.

@shibukawa
Copy link
Owner

The last one should work.

@shibukawa
Copy link
Owner

I fix README. Thank you for your feedback!

@fairhat
Copy link

fairhat commented Aug 18, 2015

Also: http://snowball.tartarus.org/license.php
The snowball license is not MIT. Is this project independent enough to have a different license?

Am 18.08.2015 um 19:11 schrieb Yoshiki Shibukawa notifications@github.com:

I fix README. Thank you for your feedback!


Reply to this email directly or view it on GitHub.

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

No branches or pull requests

4 participants