Members
stopwords
A very basic stemmer that performs the following steps:
* Stem katakana.
Inspired by:
http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/JapaneseKatakanaStemFilter.java
This script assumes input is normalized using normalizer_ja().
- Source:
- To Do:
-
- Use .bind() in StemmerJa.prototype.attach().
Methods
endsinArr(token, suffixes) → {String}
Return longest matching suffixes for a token or '' if no suffix match
Parameters:
Name | Type | Description |
---|---|---|
token |
String | Word to find matching suffix |
suffixes |
Array | Array of suffixes to test matching |
Returns:
Longest found matching suffix or ''
- Type
- String
prelude(token) → {String}
Pre-process/prepare words as required by french porter stemmer algorithm
Parameters:
Name | Type | Description |
---|---|---|
token |
String | Word to be prepared |
Returns:
Prepared word
- Type
- String
regions(token) → {Object}
Compute r1, r2, rv regions as required by french porter stemmer algorithm
Parameters:
Name | Type | Description |
---|---|---|
token |
String | Word to compute regions on |
Returns:
Regions r1, r2, rv as offsets from the begining of the word
- Type
- Object
stem(token) → {String}
Stem a word thanks to Porter Stemmer rules
Parameters:
Name | Type | Description |
---|---|---|
token |
String | Word to be stemmed |
Returns:
Stemmed word
- Type
- String