START n=node({root})
MATCH n -[r]-> w
WITH w, replace(r.url?, "http://lively-kernel.org/repository/webwerkstatt","") as path
// ORDER BY path LIMIT 50 // for testing
MATCH w --> root
WITH w, root, path
MATCH root -[r:submorph*0..10]-> submorph
WITH distinct path, w, root, count(submorph) - 1 as morphs
RETURN distinct id(w) as id, path, morphs
ORDER BY morphs DESC
LIMIT 100