Created
May 16, 2019 17:34
-
-
Save vladbatushkov/8b6a9edb2883db221367ebc4bcf763e9 to your computer and use it in GitHub Desktop.
Set keywords from movie review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (m:Movie) | |
CALL apoc.load.html(m.url, { reviews: "div.article__body p" }) YIELD value | |
WITH split(value.reviews[0].text + " " + value.reviews[1].text, " ") as keywords, m | |
WITH [x IN keywords | apoc.text.replace(x, "[\\.\\,\\(\\)\\']", "")] as keywords, m | |
SET m.keywords = filter(x IN keywords WHERE size(x) > 4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment