Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-20-2022 01:11 PM
Hi,
is there a way I can do fuzzy matching on node propertiesI? I have 2 kind of nodes a and b, and the description-property could be similar.
I need a way to match a.description with b.description possibly with a ranking of similarity
and if the similarity is high enough create a relationship (a)-:[:SAME_AS]->(b)
Thanks,
Bent
Solved! Go to Solution.
03-22-2022 03:10 AM
If you can use the Apoc Procedures,
you could use one of these function to get the score.
For example, with 2 nodes like: (:First {description: "Test"}), (:Second {description: "T&st"})
,
I could do:
MATCH (n:First) match (m:Second)
WHERE apoc.text.levenshteinSimilarity(n.description, m.description) > 0.7 // if similarity score is greater than 0.7
CREATE (n)-[:SAME_AS]->(m)
03-22-2022 03:10 AM
If you can use the Apoc Procedures,
you could use one of these function to get the score.
For example, with 2 nodes like: (:First {description: "Test"}), (:Second {description: "T&st"})
,
I could do:
MATCH (n:First) match (m:Second)
WHERE apoc.text.levenshteinSimilarity(n.description, m.description) > 0.7 // if similarity score is greater than 0.7
CREATE (n)-[:SAME_AS]->(m)
All the sessions of the conference are now available online