Hello,

I'm having trouble running the default clinical pipeline from code. It
keeps giving me the error message that I have an invalid UMLS License.
However, I know my license is valid and I have managed to get the default
pipeline to run using the PiperFileReader with the same credentials.

This is the code that doesn't work that I would like to get working:

System.setProperty(UmlsUserApprover.KEY_PARAM, "my-umls-key");
JCas jCas = JCasFactory.createJCas();
jCas.setDocumentText("My text");
AnalysisEngineDescription aed =
ClinicalPipelineFactory.getDefaultPipeline();
SimplePipeline.runPipeline(jCas, aed);

This is the code that I managed to get to work. This just demonstrates to
me that it isn't really a credential issue.
PiperFileReader piperReader = new PiperFileReader();
PipelineBuilder builder = piperReader.getBuilder();
builder.set( UmlsUserApprover.KEY_PARAM  , "the-same-umls-key");
piperReader.loadPipelineFile("path/to/default.piper");
builder.run("test text");

default.piper just loads the default pipeline:
load
./resources/org/apache/ctakes/clinical/pipeline/DefaultFastPipeline.piper

Does anyone know what the issue might be here?

Reply via email to