Skip to content

Commit

Permalink
Merge pull request #61 from fergiemcdowall/hifiaz-add-id
Browse files Browse the repository at this point in the history
Adding test and updating README.md
  • Loading branch information
eklem authored Apr 8, 2019
2 parents ae13257 + acf9595 commit d51c89a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const newString = sw.removeStopwords(oldString, [ 'even', 'a', 'custom', 'stopwo
### <language code>
Arrays of stopwords for the following 31 languages are supplied:
Arrays of stopwords for the following 32 languages are supplied:
* `af` - Afrikaans
* `ar` - Modern Standard Arabic
Expand All @@ -65,6 +65,7 @@ Arrays of stopwords for the following 31 languages are supplied:
* `ha` - Hausa
* `he` - Hebrew
* `hi` - Hindi
* `id` - Indonesian
* `it` - Italian
* `ja` - Japanese
* `lgg` - Lugbara (without diacritics)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stopword",
"version": "0.2.3",
"description": "A module for node.js that takes in text and returns text that is stripped of stopwords. Has pre-defined stopword lists for 31 languages and also takes lists with custom stopwords as input.",
"version": "0.2.4",
"description": "A module for node.js that takes in text and returns text that is stripped of stopwords. Has pre-defined stopword lists for 32 languages and also takes lists with custom stopwords as input.",
"main": "lib/stopword.js",
"scripts": {
"test": "mocha"
Expand Down
6 changes: 6 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ describe('general stopwordiness:', function () {
newString.should.eql(['alhoewel', 'oop', 'see', 'sowat', 'uur', 'per', 'motor', 'Bremen', 'af', 'lê', 'getye', 'Weserrivier', 'twee', 'keer', 'per', 'dag', 'duidelik', 'waarneembaar'])
})

it('should remove indonesian stopwords', function () {
const oldString = 'seorang anak perempuan di Bantul Yogyakarta sedang memasak nasi dengan bantuan tungku'.split(' ')
const newString = sw.removeStopwords(oldString, sw.id)
newString.should.eql(['anak', 'perempuan', 'Bantul', 'Yogyakarta', 'memasak', 'nasi', 'bantuan', 'tungku'])
})


// Right to Left languages
it('should remove arabic stopwords', function () {
Expand Down

0 comments on commit d51c89a

Please sign in to comment.