Hi Santiago,
I ran your code, replaced the restrictions:
seq1.addNameRestriction("PERS",
CompareStyleConstants.COMPARE_STYLE_CONTAINS, "Yuri Correa");
seq1.addNameRestriction("ORG",
CompareStyleConstants.COMPARE_STYLE_CONTAINS, "Tesis");
with restrictions that matched some documents in the default corpus and
successfully got results.
apiQuery.getDocumentIds (semQ).getReferringDocuments(); will return an
empty (not null) result if no documents match the restrictions that you
set. In this case, either Yuri Correa was not found as a person or Tesis
was not recognized as on organizations. Try using the Structure or
Facets web interface to look for those entities in the populated
document directly. Make sure that they are both correctly annotated in
the same documents. If this is the case, your code will return that
document(s).
Hope this helps,
Marin
P. S. Note that apiQuery.getEntities(semQ).getReferringDocuments();
always returns null by design. Calling the getEntities(semQ) indicates
that you are only interested in the entities that match the semantic
query, not the documents. I agree that part of the API is confusing and
we will address that in the future.
On 21.10.2010 11:02 ч., borislav popov wrote:
On Oct 21, 2010, at 12:41 AM, Santiago Suarez wrote:
HI,
I am trying to perform semantic searches. I get entities, but there
are problems to get the documents with the method
"DocumentQueryResult resDocuments = apiQuery.getDocumentIds (semQ).
GetReferringDocuments ();" I always get zero or null. And I do not
understand why, if I use the same code page kim
PD: I have installed RC4 kim 3 on Linux and Windows and 200 documents
in the repository Kim
attach my java code
I await your quick response
--
Santiago Fernando Suárez
Desarrollador FLash
<semantic_query2.java>
_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion
_______________________________________________
Kim-discussion mailing list
[email protected]
http://ontotext.com/mailman/listinfo/kim-discussion