Got Null pointer exception while using nlp annoate

Using 3.5.14 Neo4J and using all 3.5.14 Jars for plugins
I am getting the NullPointerException when I call ga.nlp.annotate. I followed the instructions from https://github.com/graphaware/neo4j-nlp

MATCH (n:News)
CALL ga.nlp.annotate({text: n.text, id: id(n)})
YIELD result
MERGE (n)-[:HAS_ANNOTATED_TEXT]->(result)
RETURN result

Error:Failed to invoke procedure ga.nlp.annotate : Caused by: java.lang.RuntimeException: No pipeline null

security.log
neo4j.log
debug.log
image

Hi!

Have you set a default pipeline?

CALL ga.nlp.processor.pipeline.default("my_pipeline")

Otherwise, I think you need to add an extra parameter in ga.nlp.annotate:

MATCH (n:News)
CALL ga.nlp.annotate({
     text: n.text, 
     id: id(n), 
     //checkLanguage: false, 
     pipeline : "my_pipeline"
}) YIELD result
MERGE (n)-[:HAS_ANNOTATED_TEXT]->(result)

In both cases, the pipeline "my_pipeline" was added using the ga.nlp.processor.addPipeline procedure.

I have tried adding a default pipeline,

Neo.ClientError.Procedure.ProcedureCallFailed

Failed to invoke procedure ga.nlp.processor.pipeline.default: Caused by: java.lang.NullPointerException

Alright, you can check that there is a pipeline named "my_pipeline" with

CALL ga.nlp.processor.getPipelines()

Otherwise, I don't have other ideas to explain this error for now :frowning:

My pipleline was "customStopWords" :stuck_out_tongue:

1 Like