cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Testing Neo4j for natural language study.... suggestions?

Hi,

For my own personal study, I started to put together a neo4j graph that networks word definitions and phrases and proverbs.  This is for the Jula language widely known in West Africa, (Ivory Coast, Burkina Faso, Mali).

I have the neodash up and running in a pod configuration under Fedora Coreos and GCP.   I did document a sort of howto as my notes along the way:  https://coastsystems.net/blog/en/2022-11-15-neo-pod/

I also managed to get a #neovis graph to appear on my blog home page: https://coastsystems.net/blog/en/

But I did run into a couple of hurdles with neovis.   (Please be aware that I am just a self taught hacker and regulary go to stack exchange for help!)

You can see on my home page there is a Proverb displayed in an html details/summar element.  This has been there since before neo4j.  It is populated from a tsv file and a random proverb is extracted.  I was wanting to pull the 'proverb' variable in my javascript and use this in neovis/neo4j to pull up that proverb and its word connections. 

Something like:

var proverb = sessionStorage.getItem('dyu')

initialCypter: "MATCH (d:Proverb) WHERE d.text = proverb OPTIONAL MATCH p=()-[:MEANS]-(a:Headword)-[:USED_IN]-(d)-[:MEANING]-() RETURN * LIMIT 10"

But after spending some hours trying various configurations and after a few Google searches I realize that neovis can't read a javascript variable into the InitialCypher command.  I did think for a minute that I could forgo the tsv file even if it would be way slower to get the random proverb from neo4j, but neovis also can't return that data back to the calling script either.   Yuck.

So for the time being there is just a random proverb displayed using:``

initialCypher: "MATCH (d:Proverb) WHERE d.lang = 'dyu' WITH d, rand() as r ORDER BY r LIMIT 1 OPTIONAL MATCH p=()-[:MEANS]-(a:Headword)-[:USED_IN]-(d)-[:MEANING]-() RETURN * LIMIT 10"```

But this is just a placeholder for now.  If I keep that I will have to remove the details/summary elements and I also won't be able to apply the proverb to a link over to neo4j. 

Any thoughts on how to overcome this?   Or maybe some other tool that might work?

Just reflecting it would be super nice if you could display one of those #neodash 'blocks' as an iframe in another web page

On the graph side of things I still have some work to do to make some relationships with synonyms, antonyms, related phrases etc.  

This is just for educational fun so any suggestions on what I might/could do with this would be appreciated.

 

 

 

 

 

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online