Akarata is a JavaScript library to retrieve the root / syllable root (stem) from word stem that does have a prefix in front of the word or suffix at the end of the word in Indonesian. Akarata is derived from the word "akar kata" in indonesian, for easier pronouncing.
Akarata inspired by stem of word in Indonesian based on Porter Stemmer, using algorithm published in paper A Study of Stemming Effects on Information Retrieval in Bahasa Indonesia, by Fadillah Z Tala.
Akarata created universally, can be run on the server using Node.js
or in the modern browser even inreact-native
. But it should be noted that the compatibility of the platform. Check on Compatibility function
tslib >= 1.9.0
npm:
npm install --save tslib akarata
yarn:
yarn add tslib akarata
Because akarata uses Array.includes. So if you use akarata on Node.js
version 4, browser Edge < v14, IE, Chrome < v47, Firefox < 43, Safari < v9, etc(see table) you need polyfill
. You can jump to this section to include it Include polyfill
Skip this step if platform is supported.
use npm
:
npm i ts-polyfill
use yarn
:
yarn add ts-polyfill
Import this before you import akarata, usually put it on top.
on node.js:
require('ts-polyfill/lib/es2016-array-include');
on ES2015+ / Babel / TypeScript:
import 'ts-polyfill/lib/es2016-array-include';
If you do not want to install ts-polyfill
. Then copy the code in the documentation polyfill
<script type="javascript">
ES2015+ / Babel / TypeScript:
// import library
import * as akarata from 'akarata';
// or
import akarata from 'akarata';
CommonJS/ UMD / NodeJS:
// import library
var akarata = require('akarata');
Michael Jackson script/ MJS / NodeJS experimental-modules
:
// import library
import * as akarata from 'akarata';
// or
import akarata from 'akarata';
unpkg.com
:
// since akarata version > 0.1.5
// unpkg.com/:package@:version/:file
// `.min` means compressed version
// for instance
import * as akarata from 'https://unpkg.com/akarata@0.2.0/bundles/index.esm.js';
// or
import akarata from 'https://unpkg.com/akarata@0.2.0/bundles/index.esm.min.js';
// or with absolute url, fallback to bundles/index.umd.js
import akarata from 'https://unpkg.com/akarata';
// call the stem method
akarata.stem('menikah'); // nikah
Or you can directly try it on this web: akarata.netlify.com.
By cause of this module is still in its development process, submit a ticket if you are facing an issue.
This module is intended to be a Javascript implementation of Apache Lucene's Bahasa Indonesia word stemmer.
git checkout -b my-new-feature
)__tests__
directory and run npm test
git add .
)git commit -m 'Added some new feature'
)git push origin my-new-feature
)First and foremost, I would like to thank to Allah Subhanahu Wa Ta'ala, that without his blessings this project could not be made. I would like to also thank:
Version | Tag | Published |
---|---|---|
0.2.1 | latest | 4yrs ago |