-
Notifications
You must be signed in to change notification settings - Fork 15
wip: import analysis result #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
| AnalysisSession s = getCachedSession(analysisId); | ||
| if (s == null) throw new IllegalArgumentException("No cached session for id: " + analysisId); | ||
|
|
||
| java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); // Convert JCas -> XMI bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be duplicated, please reuse the function from above
| if (documentId != null && !documentId.isBlank()) fields.put("documentId", documentId); | ||
| if (casView != null && !casView.isBlank()) fields.put("casView", casView); | ||
|
|
||
| String corpusConfigJson = System.getenv("UCE_CORPUS_CONFIG_JSON"); // Include corpusConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not need the corpus config here, please check
| RunDUUIPipeline.AnalysisResponse resp = | ||
| pipeline.getModelResourcesWithHandle(selectedModels, inputText, inputClaim, | ||
| inputCoherence, inputStance, inputLLM); | ||
| DUUIInformation DataRequest = pipeline.getModelResources(selectedModels, inputText, inputClaim, inputCoherence, inputStance, inputLLM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cant you use the result from "resp" here?
| // send to importer | ||
| long corpusId = Long.parseLong(ctx.queryParam("corpusId")); // from ?corpusId=... | ||
| RunDUUIPipeline.sendToImporterViaHttp( | ||
| "http://localhost:4567/api/ie/upload/uima", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if we can use only "/api/ie/..." here as above, we should not hard-code this
Analysis results are cached for 45 minutes.
When the user clicks “Save CAS”, the analysis result as an XMI file is sent to the importer.
More details will follow