public abstract class SCStemmer
extends java.lang.Object
implements weka.core.stemmers.Stemmer
The basic abstract class for the functions common to all stemmers for Serbian and Croatian
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
SCStemmer() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getRevision() |
protected abstract void |
initRules()
Inicijalizuje pravila za stemovanje
|
static void |
main(java.lang.String[] args) |
private static void |
printCorrectUsage()
Ispisuje uputstvo za korišćenje SCStemmers paketa iz komandne linije
|
void |
replaceSpaceWithNewLine(java.lang.String fileInput,
java.lang.String fileOutput)
Olakšava poređenje stemovanih fajlova sa izlazom nekih izvornih implementacija tako što upisuje svaki token u poseban red izlaznog fajla
|
java.lang.String |
stem(java.lang.String word)
Implementira interfejs iz Weka paketa
|
void |
stemFile(java.lang.String fileInput,
java.lang.String fileOutput)
Stemuje sadržaj ulaznog fajla i upisuje stemovani sadržaj u izlazni fajl
|
abstract java.lang.String |
stemLine(java.lang.String line) |
java.lang.String |
stemText(java.lang.String text)
Stemuje string koji sadrži više linija teksta
|
abstract java.lang.String |
stemWord(java.lang.String word) |
private static final long serialVersionUID
public java.lang.String stem(java.lang.String word)
Implements the interface given by Weka
stem
in interface weka.core.stemmers.Stemmer
public java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
public void replaceSpaceWithNewLine(java.lang.String fileInput, java.lang.String fileOutput)
Makes it easier to compare stemmed files with the output of some of the original implementations by writing every token in a separate line of the output file
fileInput
- Ime ulaznog fajla u kome je tekst normalno napisan.
fileOutput
- Ime izlaznog fajla u kome tekst treba da bude napisan tako da svaka reč bude u posebnom redu.
public abstract java.lang.String stemWord(java.lang.String word)
public abstract java.lang.String stemLine(java.lang.String line)
public java.lang.String stemText(java.lang.String text)
Stems a string which contains multiple lines of text
text
- String koji sadrži više linija teksta
public void stemFile(java.lang.String fileInput, java.lang.String fileOutput) throws java.io.IOException
Stems the contents of the input file and writes them into the output file
fileInput
- Ime ulaznog fajla
fileOutput
- Ime izlaznog fajla
java.io.IOException
- Označava grešku pri radu sa fajlom
protected abstract void initRules()
Initializes the stemming rules
private static void printCorrectUsage()
Prints the instructions for using the SCStemmers package from the command line
public static void main(java.lang.String[] args)