What steps will reproduce the problem?
1. load a Document through JWPL-IO
2. create a StanfordNamedEntityRecognizer, using language=en (JWPL sets this to
english instead of en)
3. process the document
What is the expected output? What do you see instead?
it should load the default model for english. Instead It fails:
java.lang.IllegalStateException: Unable to resolve the model location [classpath:/de/tudarmstadt/ukp/dkpro/core/stanfordnlp/lib/ner-${language}-${variant}.ser.gz]: Could not resolve placeholder 'variant'. Possibly there is no default model configured for the specified language [en] or the language is set incorrectly.
at de.tudarmstadt.ukp.dkpro.core.api.resources.ResourceObjectProviderBase.configure(ResourceObjectProviderBase.java:221)
at de.tudarmstadt.ukp.dkpro.core.api.resources.CasConfigurableProviderBase.configure(CasConfigurableProviderBase.java:34)
What version of the product are you using? On what operating system?
1.4.0
Please provide any additional information below.
The problem is caused by ResourceObjectProviderBase.getAggregatedProperties().
There, the variant is set BEFORE the overrides and imports are applied. This
obviously makes it impossible to override the language but still use the
default variant for that language.
On the other hand, if that behavior is intended, StanfordNamedEntityRecognizer
could set the language (if existant) as a default instead of overwrite.
A third way to fix this would be to change JWPL-IO constants such that the
documents will have "en" instead of "english" as set language. This third may
is prone to side-effects though, in my opinion.
Original issue reported on code.google.com by kutschke...@googlemail.com on 20 Jul 2012 at 10:07
Original issue reported on code.google.com by
kutschke...@googlemail.com
on 20 Jul 2012 at 10:07