GEGlobalResearch / DARPA-ASKE-TA1

ANSWER Project to demonstrate knowledge-driven extraction of scientific models from code and texts
Other
7 stars 5 forks source link

The dialog model processor does not attach the Jena model to the resource if the contents list is empty #108

Open kittaakos opened 4 years ago

kittaakos commented 4 years ago

https://github.com/GEGlobalResearch/DARPA-ASKE-TA1/blob/2907e5f63f759fd08cbab62a8766c6a0840bd020/com.ge.research.sadl.darpa.aske.dialog.parent/com.ge.research.sadl.darpa.aske.dialog/src/com/ge/research/sadl/darpa/aske/processing/JenaBasedDialogModelProcessor.java#L220-L222

Is there a chance to change this logic, @crapo? If I have an empty dialog model with the uri only, the ontology model is null.

kittaakos commented 4 years ago

Besides the empty contents list, we terminate the onValidate workflow when the AST is not valid:

https://github.com/GEGlobalResearch/DARPA-ASKE-TA1/blob/2907e5f63f759fd08cbab62a8766c6a0840bd020/com.ge.research.sadl.darpa.aske.dialog.parent/com.ge.research.sadl.darpa.aske.dialog/src/com/ge/research/sadl/darpa/aske/processing/JenaBasedDialogModelProcessor.java#L366-L368

And we do not attach the Jena model to the resource:

https://github.com/GEGlobalResearch/DARPA-ASKE-TA1/blob/2907e5f63f759fd08cbab62a8766c6a0840bd020/com.ge.research.sadl.darpa.aske.dialog.parent/com.ge.research.sadl.darpa.aske.dialog/src/com/ge/research/sadl/darpa/aske/processing/JenaBasedDialogModelProcessor.java#L430-L435

This is a problem, as the content assist works 90% on a broken AST. (Related #107)

crapo commented 4 years ago

Yes, this logic can be changed. I think the only thing that matters, I think, is that we don't call the AnswerCurationManager to process a conversation if there is an invalid AST. So rather than return on empty content or invalid AST, we just need to not do this on these conditions: // Do this **after** setting the resource information in the OntModelProvider try { getAnswerCurationManager(resource).processConversation(getCurrentResource(), getTheJenaModel(), getModelName()); } catch (IOException e2) { // TODO Auto-generated catch block e2.printStackTrace(); }

crapo commented 4 years ago

I have made these changes in branch GH-104 and pushed. As noted on issue [https://github.com/GEGlobalResearch/DARPA-ASKE-TA1/issues/104] it isn't possible to control calls to AnswerCurationManager processConversation based on validity of query or equation. Would need to know that a rename is in-progress and not make the call.