Skip to content

Commit

Permalink
Made the Japanese stemmer consistent with the other stemmers (#585)
Browse files Browse the repository at this point in the history
* Made the Japanese stemmer consistent with the other stemmers

* Add stemmer.js (removed it by accident, stemmers.js had to be removed)
  • Loading branch information
Hugo-ter-Doest authored Feb 17, 2021
1 parent 583924b commit 57cb5f0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 45 deletions.
2 changes: 1 addition & 1 deletion lib/natural/stemmers/stemmer_ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ StemmerJa.prototype.attach = function () {
}
*/

module.exports = StemmerJa
module.exports = new StemmerJa()
42 changes: 0 additions & 42 deletions lib/natural/stemmers/stemmers.js

This file was deleted.

3 changes: 1 addition & 2 deletions spec/stemmer_ja_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ THE SOFTWARE.

'use strict'

const StemmerJa = require('../lib/natural/stemmers/stemmer_ja')
const stemmer = new StemmerJa()
const stemmer = require('../lib/natural/stemmers/stemmer_ja')

const test = ['コピー', 'コーヒー', 'タクシー', 'パーティー', 'パーティ', 'ヘルプ・センター']
const testResult = ['コピー', 'コーヒ', 'タクシ', 'パーティ', 'パーティ', 'ヘルプ・センタ']
Expand Down

0 comments on commit 57cb5f0

Please sign in to comment.