Termination status "KO"

Hi all,

Currently I am following along the tutorial in the link below

3X_3_b_3b1e4d6a0833cd84853036ad6d878607dfd32908.png Neo4j Graph Database Platform

Tutorial: Build a Knowledge Graph using NLP and Ontologies - Developer Guides

This guide shows how to build and query a Knowledge Graph of entities extracted using APOC NLP procedures and Ontologies extracted using neosemantics.

I am completely new to NLP applications for Neo4j so do help me out.

Whenever I try to import taxonomy using the code below

WITH "https://query.wikidata.org/sparql?query=prefix%20neo%3A%20%3Cneo4j%3A%2F%2Fvoc%23%3E%20%0A%23Cats%0A%23SELECT%20%3Fitem%20%3Flabel%20%0ACONSTRUCT%20%7B%0A%3Fitem%20a%20neo%3ACategory%20%3B%20neo%3AsubCatOf%20%3FparentItem%20.%20%20%0A%20%20%3Fitem%20neo%3Aname%20%3Flabel%20.%0A%20%20%3FparentItem%20a%20neo%3ACategory%3B%20neo%3Aname%20%3FparentLabel%20.%0A%20%20%3Farticle%20a%20neo%3AWikipediaPage%3B%20neo%3Aabout%20%3Fitem%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%0A%7D%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20(wdt%3AP31%7Cwdt%3AP279)*%20wd%3AQ2429814%20.%0A%20%20%3Fitem%20wdt%3AP31%7Cwdt%3AP279%20%3FparentItem%20.%0A%20%20%3Fitem%20rdfs%3Alabel%20%3Flabel%20.%0A%20%20filter(lang(%3Flabel)%20%3D%20%22en%22)%0A%20%20%3FparentItem%20rdfs%3Alabel%20%3FparentLabel%20.%0A%20%20filter(lang(%3FparentLabel)%20%3D%20%22en%22)%0A%20%20%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%20%20%3Farticle%20schema%3Aabout%20%3Fitem%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20schema%3AinLanguage%20%22en%22%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20schema%3AisPartOf%20%3Chttps%3A%2F%2Fen.wikipedia.org%2F%3E%20.%0A%20%20%20%20%7D%0A%20%20%0A%7D" AS softwareSystemsUri
CALL n10s.rdf.import.fetch(softwareSystemsUri, 'Turtle' , { headerParams: { Accept: "application/x-turtle" } })
YIELD terminationStatus, triplesLoaded, triplesParsed, namespaces, callParams
RETURN terminationStatus, triplesLoaded, triplesParsed, namespaces, callParams;

The result is as shown below

My current system is as below

Neo4j dekstop:1.4.11
Neosemantics,n10s:4.4.0.0.
Plugin: apoc-nlp-dependencies-4.4.0.3

Appreciate any advice given

If you put the url in your browser, the result does not look like RDF. It looks like a SPARQL query was run and an error resulted, so no data was returned.

Hi, I too got the same result as in the image. So, I executed the above query.


@jbarrasa wrote:

Hi @DMF194 ,
If you add extraInfo (see below) to the params returned by the n10s.rdf.import.* proc, you should get additional info on what's causing the error.
Also worth checking the logs?

Let us know what you find.

Cheers,

JB

WITH "https://query.wikidata.org/sparql?query=prefix..... rest of the query...." AS softwareSystemsUri
CALL n10s.rdf.import.fetch(softwareSystemsUri, 'Turtle' , { headerParams: { Accept: "application/x-turtle" } })
YIELD terminationStatus, triplesLoaded, triplesParsed, namespaces, callParams, extraInfo
RETURN terminationStatus, triplesLoaded, triplesParsed, namespaces, callParams, extraInfo;

I got the result this."PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

Can you help me here

I added 'extraInfo' to the output. At first the 'extraInfo" field told me I needed to create a unique constraint as below (this is in the manual too):

CREATE CONSTRAINT n10s_unique_uri ON (r:Resource) ASSERT r.uri IS UNIQUE

the next time I ran it, it told me I needed a configuration (also in the manual). I added a default one:

CALL n10s.graphconfig.init()

It worked for me after adding these two things.

Screen Shot 2023-01-18 at 8.59.51 AM.png

here is my environment:

Screen Shot 2023-01-18 at 9.02.09 AM.png

I am getting error like this can you help me here? Error is "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

CREATE CONSTRAINT n10s_unique_uri ON (r:Resource) ASSERT r.uri IS UNIQUE

For me for this line i am getting syntax error.. so i changed ON to FOR and ASSERT to REQUIRE.

Hi, I too got the same result as in the image. So, I executed the above query.


@jbarrasa wrote:

Hi @DMF194 ,
If you add extraInfo (see below) to the params returned by the n10s.rdf.import.* proc, you should get additional info on what's causing the error.
Also worth checking the logs?

Let us know what you find.

Cheers,

JB

WITH "https://query.wikidata.org/sparql?query=prefix..... rest of the query...." AS softwareSystemsUri
CALL n10s.rdf.import.fetch(softwareSystemsUri, 'Turtle' , { headerParams: { Accept: "application/x-turtle" } })
YIELD terminationStatus, triplesLoaded, triplesParsed, namespaces, callParams, extraInfo
RETURN terminationStatus, triplesLoaded, triplesParsed, namespaces, callParams, extraInfo;

I got the result this."PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".

Can you help me here

If you google that error message, A bunch of stuff comes up about 'not finding a certificate.' What happens when you put the url directly in your web browser:

https://query.wikidata.org/sparql?query=prefix%20neo%3A%20%3Cneo4j%3A%2F%2Fvoc%23%3E%20%0A%23Cats%0A%23SELECT%20%3Fitem%20%3Flabel%20%0ACONSTRUCT%20%7B%0A%3Fitem%20a%20neo%3ACategory%20%3B%20neo%3AsubCatOf%20%3FparentItem%20.%20%20%0A%20%20%3Fitem%20neo%3Aname%20%3Flabel%20.%0A%20%20%3FparentItem%20a%20neo%3ACategory%3B%20neo%3Aname%20%3FparentLabel%20.%0A%20%20%3Farticle%20a%20neo%3AWikipediaPage%3B%20neo%3Aabout%20%3Fitem%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%0A%7D%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20(wdt%3AP31%7Cwdt%3AP279)*%20wd%3AQ2429814%20.%0A%20%20%3Fitem%20wdt%3AP31%7Cwdt%3AP279%20%3FparentItem%20.%0A%20%20%3Fitem%20rdfs%3Alabel%20%3Flabel%20.%0A%20%20filter(lang(%3Flabel)%20%3D%20%22en%22)%0A%20%20%3FparentItem%20rdfs%3Alabel%20%3FparentLabel%20.%0A%20%20filter(lang(%3FparentLabel)%20%3D%20%22en%22)%0A%20%20%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%20%20%3Farticle%20schema%3Aabout%20%3Fitem%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20schema%3AinLanguage%20%22en%22%20%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20schema%3AisPartOf%20%3Chttps%3A%2F%2Fen.wikipedia.org%2F%3E%20.%0A%20%20%20%20%7D%0A%20%20%0A%7D

What version of neo4j are you using?