o19s / skipchunk

Extracts a latent knowledge graph from text and index/query it in elasticsearch or solr
MIT License
19 stars 2 forks source link

Graph query is not returning expected results #1

Closed binarymax closed 4 years ago

binarymax commented 4 years ago

Given a noun phrase (subject) and a verb (predicate), the sq.graph method should return the resulting concepts and their weights that appear as direct objects in the same sentences as the given subject and predicate.

This is likely due to how solr is being queried, and the available metadata for filtering. It is currently a two-step process: 1) get all the sentence_ids that have preflabel matching the noun phrase and are the subjectof the verb 2) get all the preflabels in those sentence_ids that are objectof the same verb

This should work in theory but is not returning all the expected concepts. This needs to be formally tested against manually annotated sentences.

binarymax commented 4 years ago

Works OK for now. Some improvements can be made but for now this fills its purpose.