Use text-distance to compare a string with a list of string

I want to use string-distance method to compare given string with a list of string.
Below, each disease has a list of synonym, i want to revise these code that can use string-distance to compare the given disease to a list(d_synonym) then return.

MATCH (a:Disease)
WITH a.synonym as d_synonym
WHERE apoc.text.sorensenDiceSimilarity(, "trĩ") >=  0.8
RETURN as name , a as result, apoc.text.sorensenDiceSimilarity(, "trĩ") as score


Sorry, I did not understand what should be.
Anyway, if I got it, you have nodes like this:
CREATE (a:Disease {synonym: ["trĩ", "tri", "tre", "trĩ"]} ).

In this case, if you want to check similarity for each item of synonym list,
you could use, among other things, the UNWIND, that is:

MATCH (a:Disease) 
UNWIND a.synonym as d_synonym // unwind list
WITH apoc.text.sorensenDiceSimilarity(d_synonym, "trĩ") AS score, a AS result
WHERE score >= 0.8 // check score
RETURN result, score // return entity and score
1 Like