summaryrefslogtreecommitdiff
path: root/src/morfologik/stemming/PolishStemmer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/morfologik/stemming/PolishStemmer.java')
-rw-r--r--src/morfologik/stemming/PolishStemmer.java51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/morfologik/stemming/PolishStemmer.java b/src/morfologik/stemming/PolishStemmer.java
index 5ab3a76..299f76a 100644
--- a/src/morfologik/stemming/PolishStemmer.java
+++ b/src/morfologik/stemming/PolishStemmer.java
@@ -3,7 +3,6 @@ package morfologik.stemming;
import java.util.Iterator;
import java.util.List;
-
/**
* A dictionary-based stemmer for the Polish language. This stemmer requires an
* FSA-compiled dictionary to be present in classpath resources.
@@ -13,32 +12,32 @@ import java.util.List;
* @see morfologik.stemming.DictionaryLookup
*/
public final class PolishStemmer implements IStemmer, Iterable<WordData> {
- /**
- * Dictionary lookup delegate.
- */
- private final DictionaryLookup delegate;
+ /**
+ * Dictionary lookup delegate.
+ */
+ private final DictionaryLookup delegate;
+
+ /**
+ * This constructor is initialized with a built-in dictionary or fails with
+ * a runtime exception if the dictionary is not available.
+ */
+ public PolishStemmer() {
+ final String languageCode = "pl";
- /**
- * This constructor is initialized with a built-in dictionary or fails with
- * a runtime exception if the dictionary is not available.
- */
- public PolishStemmer() {
- final String languageCode = "pl";
- this.delegate = new DictionaryLookup(
- Dictionary.getForLanguage(languageCode));
- }
+ this.delegate = new DictionaryLookup(Dictionary.getForLanguage(languageCode));
+ }
- /**
- * {@inheritDoc}
- */
- public List<WordData> lookup(CharSequence word) {
- return delegate.lookup(word);
- }
+ /**
+ * {@inheritDoc}
+ */
+ public List<WordData> lookup(CharSequence word) {
+ return delegate.lookup(word);
+ }
- /**
- * Iterates over all dictionary forms stored in this stemmer.
- */
- public Iterator<WordData> iterator() {
- return delegate.iterator();
- }
+ /**
+ * Iterates over all dictionary forms stored in this stemmer.
+ */
+ public Iterator<WordData> iterator() {
+ return delegate.iterator();
+ }
}