-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
I encountered an issue when using the VnCoreNLP
wrapper in the py_vncorenlp
package. The error occurs specifically when the annotators list contains "wseg"
. The initialization fails with a java.lang.ArrayIndexOutOfBoundsException
.
Steps to Reproduce:
- Initialize a
VnCoreNLP
object with the annotators list containing"wseg"
:annotators = ["wseg"] model = VnCoreNLP(annotators=annotators)
- The error occurs during the instantiation:
Resulting in the following error:
self.model = javaclass_vncorenlp(annotators)
jnius.JavaException: JVM exception occurred: 1 java.lang.ArrayIndexOutOfBoundsException
Expected Behavior:
The VnCoreNLP
object should initialize without errors, regardless of whether "wseg"
is in the annotators list.
Actual Behavior:
When "wseg"
is included in the annotators list, the following exception is raised:
jnius.JavaException: JVM exception occurred: 1 java.lang.ArrayIndexOutOfBoundsException
Environment:
- OS: macOS Sequoia 15.1.1
- JDK Version: 1.8.0
Additional Context:
- The issue only occurs when
"wseg"
is included in the annotators list. - Other annotators like
"pos"
,"ner"
, and"parse"
work as expected without throwing an error. - I’ve tried initializing the class with different configurations, and the error only happens with
"wseg"
. - The main jar file and models folder size are the same as described in README.md
It seems like there might be an issue with how the wseg
annotator is being handled internally within the Java code.
Possible Solutions:
- Investigate the handling of the
"wseg"
annotator in the Java classvn.pipeline.VnCoreNLP
and ensure the correct indexing or initialization logic. - Check if there are any known issues related to this annotator in the library.
Related Issues/PRs:
Metadata
Metadata
Assignees
Labels
No labels