Closed orchestr7 closed 1 year ago
There are 1274956
examples of problematic words in the vocabulary :
val a = mutableSetOf<String>()
getDictionary().allFlexionStrings.asSequence().forEach {
try {
lookupForMeanings(it)[0].morphology
} catch (e: ArrayIndexOutOfBoundsException) {
a.add(it)
}
}
println(a.size)
@akuleshov7 Thank you for reporting this! I fix it.
@akuleshov7 I checked it in the relevant branch, here's what came up:
@Test
void testSomeRussianWords() throws IOException {
System.out.println(
lookupForMeanings("ежи").get(0).getMorphology()
);
}
Result:
[С, мр, им, мн]
@akuleshov7 Make sure you are using the latest version of the library.
dependencies {
implementation("com.github.demidko:aot:2022.08.06")
}
yeah, the bug comes from an older version, thx
In newer version there is even no method WordformMeaning.getDictionary()
to get all the words
@akuleshov7 I have added two new methods: WordformMeaning::getAllFlexions
and WordformMeaning::listAllWordforms
.
You need to include an even newer version of the library:
dependencies {
implementation("com.github.demidko:aot:2022.11.16")
}
causes:
happens because of invalid indexing: