Skip to content

Instantly share code, notes, and snippets.

@paulozullu
Last active September 28, 2016 12:58
Show Gist options
  • Save paulozullu/a3e5049d0d1f42acdf37da0c3c1a20bd to your computer and use it in GitHub Desktop.
Save paulozullu/a3e5049d0d1f42acdf37da0c3c1a20bd to your computer and use it in GitHub Desktop.
Cypher to calculate subjects
MATCH ()-[n2:NEXT]-(w:Word)
WITH w, COUNT(n2) AS DEGREE, SUM(n2.count) AS STRENGTH
ORDER BY w.name
RETURN w, DEGREE, STRENGTH, toFloat(STRENGTH)/toFloat(DEGREE) AS SELECTIVITY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment