public class PorterStemmer extends Object implements Lemmatiser
Porter stemmer
Copyright: Copyright (c) 2005
Company: IST, Drexel University
FIRSTPOS, LASTPOS| Constructor and Description |
|---|
PorterStemmer() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(char ch)
Add a character to the word being stemmed.
|
void |
add(char[] w,
int wLen)
Adds wLen characters to the word being stemmed contained in a portion
of a char[] array.
|
char[] |
getResultBuffer()
Returns a reference to a character buffer containing the results of
the stemming process.
|
int |
getResultLength()
Returns the length of the word resulting from the stemming process.
|
String |
lemmatize(String word)
Gets the base form of the word.
|
String |
lemmatize(String word,
int POS)
Gets the base form of the word
|
static void |
main(String[] args)
Test program for demonstrating the Lemmatiser.
|
void |
stem()
Stem the word placed into the Lemmatiser buffer through calls to add().
|
String |
stem(String word)
Gets the stem of the word.
|
String |
toString()
After a word has been stemmed, it can be retrieved by toString(),
or a reference to the internal buffer can be retrieved by getResultBuffer
and getResultLength (which is generally more efficient.)
|
public String stem(String word)
Lemmatiserstem in interface Lemmatiserword - the word for processingpublic String lemmatize(String word)
Lemmatiserlemmatize in interface Lemmatiserword - the word for lemmatisingpublic String lemmatize(String word, int POS)
Lemmatiserlemmatize in interface Lemmatiserword - the word for lemmatisingPOS - the part of speech of the wordpublic void add(char ch)
public void add(char[] w,
int wLen)
public String toString()
public int getResultLength()
public char[] getResultBuffer()
public void stem()
public static void main(String[] args)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.