Hi everybody, I have problems at running the
inspectDocumentFilteredAnnotations method example.
This is the source:
public static void inspectDocumentFilteredAnnotations(KIMDocument kdoc)
throws Exception {
// show annotations of types given in a set
KIMAnnotationSet kimASet = kdoc.getAnnotations();
HashSet typesNewSet = new HashSet();
typesNewSet.add("Education");
typesNewSet.add("Organization");
KIMAnnotationSet kimFilteredASet = kimASet.get(typesNewSet);
Iterator annIterator = kimFilteredASet.iterator();
spit("[ Document's Filtered by Type Annotations (begin) ]");
spit(" = Annotations of type [ Person and Organization ] :");
while (annIterator.hasNext()) {
spit(" -- " + annIterator.next());
}
spit("[ Document's Filtered by Type Annotations (end) ]");
}
This the error:
java.lang.NullPointerException
at
com.ontotext.kim.corpora.KIMAnnotationSetImpl$1.<init>(KIMAnnotationSetImpl.java:23)
at
com.ontotext.kim.corpora.KIMAnnotationSetImpl.iterator(KIMAnnotationSetImpl.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Thank you,
Alvaro
---------------------------------
Got a little couch potato?
Check out fun summer activities for kids._______________________________________________
NOTE: Please REPLY TO ALL to ensure that your reply reaches all members of this
mailing list.
KIM-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion_ontotext.com