fixing bug with russian morphology
git-svn-id: https://russianmorphology.googlecode.com/svn/trunk@65 d817d54c-26ab-11de-abc9-2f7d1455ff7a
This commit is contained in:
parent
9ee47e2f99
commit
bd056ae6f5
@ -21,7 +21,9 @@ import java.io.IOException;
|
||||
|
||||
|
||||
public class EnglishAnalayzer extends MorphlogyAnalayzer {
|
||||
|
||||
public EnglishAnalayzer() throws IOException {
|
||||
super(EnglishAnalayzer.class.getResourceAsStream("/org/apache/lucene/morphology/english/morph.info"), new EnglishLetterDecoderEncoder());
|
||||
super(new EnglishLuceneMorphology());
|
||||
}
|
||||
|
||||
}
|
@ -31,6 +31,10 @@ import java.io.Reader;
|
||||
public class MorphlogyAnalayzer extends Analyzer {
|
||||
private LuceneMorphology luceneMorph;
|
||||
|
||||
public MorphlogyAnalayzer(LuceneMorphology luceneMorph) {
|
||||
this.luceneMorph = luceneMorph;
|
||||
}
|
||||
|
||||
public MorphlogyAnalayzer(String pathToMorph, LetterDecoderEncoder letterDecoderEncoder) throws IOException {
|
||||
luceneMorph = new LuceneMorphology(pathToMorph, letterDecoderEncoder);
|
||||
}
|
||||
|
@ -22,6 +22,6 @@ import java.io.IOException;
|
||||
|
||||
public class RussianAnalayzer extends MorphlogyAnalayzer {
|
||||
public RussianAnalayzer() throws IOException {
|
||||
super(RussianAnalayzer.class.getResourceAsStream("/org/apache/lucene/morphology/russian/morph.info"), new RussianLetterDecoderEncoder());
|
||||
super(new RussianLuceneMorphology());
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,6 @@ import java.io.IOException;
|
||||
public class RussianLuceneMorphology extends LuceneMorphology {
|
||||
|
||||
public RussianLuceneMorphology() throws IOException {
|
||||
super(RussianLuceneMorphology.class.getResourceAsStream("/org/apache/lucene/morphology/english/morph.info"), new RussianLetterDecoderEncoder());
|
||||
super(RussianLuceneMorphology.class.getResourceAsStream("/org/apache/lucene/morphology/russian/morph.info"), new RussianLetterDecoderEncoder());
|
||||
}
|
||||
}
|
@ -22,6 +22,6 @@ import java.io.IOException;
|
||||
public class RussianMorphology extends Morphology {
|
||||
|
||||
public RussianMorphology() throws IOException {
|
||||
super(RussianMorphology.class.getResourceAsStream("/org/apache/lucene/morphology/english/morph.info"), new RussianLetterDecoderEncoder());
|
||||
super(RussianMorphology.class.getResourceAsStream("/org/apache/lucene/morphology/russian/morph.info"), new RussianLetterDecoderEncoder());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user