fixing bug if rule not applicable for word
git-svn-id: https://russianmorphology.googlecode.com/svn/trunk@90 d817d54c-26ab-11de-abc9-2f7d1455ff7a
This commit is contained in:
parent
1df38d95be
commit
ce2e2daf7b
@ -40,6 +40,7 @@ public class Heuristic implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String transofrmWord(String w) {
|
public String transofrmWord(String w) {
|
||||||
|
if (w.length() - actualSuffixLengh < 0) return w;
|
||||||
return w.substring(0, w.length() - actualSuffixLengh) + actualNormalSuffix;
|
return w.substring(0, w.length() - actualSuffixLengh) + actualNormalSuffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user