Hi Valentina,
Thank you for your interest in KIM. We will be happy to help.
The easiest way to observe the semantic annotation results is through
the graphical interface of KIM. Just find the file and show all of its
annotations. If you really don't want to use it, then there are
alternatives. You can use a Jape rule or write a component with your
custom code and add it to the pipeline.
The document, together with the annotations, is stored in the document
repository. You will first need to acquire a KIMDocument instance. You
can do that using the method getDocuments(DocumentQuery query) from the
DocumentRepositoryAPI. Then you can see the annotations using
KIMDocument's getAnnotations() method. The KIM API javadoc could be
found at http://nmwiki.semanticannotation.com/kim-javadoc/index.html .
This is an example retrieving documents containing "Itally" :
DocumentRepositoryAPI docRep =
GetService.from().getDocumentRepositoryAPI();
DocumentQuery query = new DocumentQuery();
query.setKeywordRestriction("Itally");
DocumentQueryResult res = docRep.getDocuments(query);
for (int ix = 0; ix < res.size(); ix++) {
KIMAnnotationSet as =
res.get(ix).getDocument().getAnnotations();
}
About your second question. Generally, if you have extended only the
class structure of the ontology, you only need to restart KIM so that
OWLIM reads its new classes and relations. If you have enriched the
knowledgebase however, you should annotate the documents again, because
KIM needs to analyze the content to recognize the new entities. Some
information on extending the ontology that you may find useful is
http://ontotext.com/kim/doc/sys-doc/DesigningOntology.html .
Best wishes,
Philip
Valentina De Vivo wrote:
Hi,
my name is Valentina, and I'm an Italian student in Computer Science.
KIM website says:
"As a base line, KIM analyzes texts and recognizes references to entities
(like persons, organizations, locations, dates). Then it tries to match the
reference with a known entity, having a unique URI and description.
Alternatively, a new URI and description are automatically generated. Finally,
the reference in the document gets annotated with the URI of the entity. We
call this process (as well as the result) semantic annotation. This sort of
meta-data can be used for indexing, retrieval, visualization and automatic
hyper-linking of documents."
Now, I would like to know:
where and how can I read the output of the KIM semantic annotation for a
given file (without graphic user interface)? Maybe I have to use the KIM API,
but I need some advice...
If I increase KIM knowledge base with my files .nt and .owl, then where and
how will KIM annotate a file (html or rdf) that contain those entities and
those words that I have provided (with alias) in the knowledge base? Please
help me to clarify my ideas…
Thanks and regards,
Valentina
_______________________________________________
Kim-discussion mailing list
Kim-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/kim-discussion
_______________________________________________
Kim-discussion mailing list
Kim-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/kim-discussion