You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the index for the variants of a word in not filled in the XMLLexicon, which is why the words in a lexicon cannot be resolved by their variants. I checked the source and the index is never being assigned to so I guess it was forgotten about. You can see it yourself when you compare the source with the english variant of simpleNLG.
Here is a test in written kotlin that should succeed:
@Test
fun`noun phrase resolves word from lexicon by variant`() {
val lexicon =Lexicon.getDefaultLexicon()
val factory =NLGFactory(lexicon)
val nounPhrase = factory.createNounPhrase("Menschen")
assertEquals("Mensch", (nounPhrase.noun asWordElement).baseForm)
}
The text was updated successfully, but these errors were encountered:
This will be fixed with the next commit, however, it should be used carefully. Because German is much richer in variants than English, there is often ambiguity between variants. Menschen, for example, can be the plural form of Mensch, but it can also be Genitiv Singular, as in "Der Name des Menschen ist Bob". SimpleNLG-DE will simply take whatever appears first in the lexicon.
Therefore, it is safer to use the base form and set the properties manually in order to make sure the right form is chosen.
Currently the index for the variants of a word in not filled in the XMLLexicon, which is why the words in a lexicon cannot be resolved by their variants. I checked the source and the index is never being assigned to so I guess it was forgotten about. You can see it yourself when you compare the source with the english variant of simpleNLG.
Here is a test in written kotlin that should succeed:
The text was updated successfully, but these errors were encountered: