Text Index Parameter in concept insights gives only one instance of concept occurance -
i have multiple mentions of concept (e.g. "gold") in document. concept insights' conceptual search return gold concept , 1 text index concept (usually first occurrence, not always). there specific reason why concept insights' conceptual search ignores other mentions of "gold" in document? interested in pulling snippets of text around occurrences of concept. have been great if got text index mentions of concept. there way it, other doing string match @ end.
thanks in advance help!
the conceptual search concept insights not ignore several mentions of same (or related) concept within document. in fact, service uses information reinforce system's understanding of concept areas covered in each document.
however, true in "explanation" of why document related document, /conceptual_search
endpoint returns select set of concepts. because system trying show diversity of concepts justify connection between query , document, can omit repeated concepts part of "explanation" (you can think "explanation" akin snippet of text traditional search engine may suggest user why document may relevant; not complete story of associations found within document).
that being said, can concepts extracted within document using /annotations endpoint: get /v2/corpora/{account_id}/{corpus}/documents/{document}/annotations
.
(documentation: https://watson-api-explorer.mybluemix.net/apis/concept-insights-v2#!/corpora/getdocumentannotations)
for every annotation in document, concept id along positions in text occurrence of document. so, example above, can:
1) call /conceptual_search
endpoint retrieve documents relevant query, along number of explanation concepts (concepts tie document query); found concept question gold
.
2) call /{document}/annotations
returned document, looking additional occurrences of "explanation concepts" (gold
) within selected document. should able build list of gold
occurrences (along lists of other explanation concepts), cover entire document.
Comments
Post a Comment