"Failed Invocation of APOC NLP Procedure in Neo4j Community Edition"

36 Views Asked by At

I am encountering an issue while trying to use the APOC NLP GCP plugin with Neo4j Community Edition. Instead of using the Desktop UI, I am running Neo4j in a browser due to some UI-related problems. I have downloaded Neo4j Community Edition version 5.11.0 for Windows from this link: https://dist.neo4j.org/neo4j-community-5.11.0-windows.zip.

The problem I am facing is that I want to use the apoc.nlp.gcp.graph method for natural language processing (NLP) tasks, but it doesn't seem to be available in the APOC plugin. When I write my Cypher query, I do not get IntelliSense for 'gcp' under 'nlp'; only 'azure' is shown.

I have manually placed the following plugins in my Neo4j plugin folder:

  • apoc-5.11.0-core
  • apoc-5.11.0-extended
  • neosemantics-5.7.0.0

My Java Development Kit (JDK) version is microsoft-jdk-17.0.8.1-windows-x64. I'm trying to follow this tutorial to build a knowledge graph using NLP and ontologies: https://neo4j.com/developer/graph-data-science/build-knowledge-graph-nlp-ontologies/.

When I run the following Cypher query:

MATCH (a:Article {uri: "https://dev.to/lirantal/securing-a-nodejs--rethinkdb--tls-setup-on-docker-containers"})
CALL apoc.nlp.gcp.entities.stream(a, {
 nodeProperty: 'body',
 key: $key
})
YIELD node, value
SET node.processed = true
WITH node, value
UNWIND value.entities AS entity
RETURN entity
LIMIT 5;

I get the following error message:

Neo.ClientError.Procedure.ProcedureNotFound
There is no procedure with the name `apoc.nlp.gcp.entities.stream` registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.

How can I resolve this issue and make the apoc.nlp.gcp.graph method accessible in Neo4j Community Edition running in a browser environment?

1

There are 1 best solutions below

0
cybersam On

As documented, you also need to install the apoc-nlp-dependencies-<version number>-all.jar file (with the correct version number) in the plugins folder.

You can look here for that file.