Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wikipedia/wiki-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ image:https://github.com/jbarrasa/datasets/raw/master/wikipedia/img/category-gra
[source,cypher]
----
UNWIND range(0,3) as level
CALL apoc.cypher.doit("
CALL apoc.cypher.doIt("
MATCH (c:Category { subcatsFetched: false, level: $level})
CALL apoc.load.json('https://en.wikipedia.org/w/api.php?format=json&action=query&list=categorymembers&cmtype=subcat&cmtitle=Category:' + apoc.text.urlencode(c.catName) + '&cmprop=ids%7Ctitle&cmlimit=500')
YIELD value as results
Expand Down Expand Up @@ -93,7 +93,7 @@ image:https://github.com/jbarrasa/datasets/raw/master/wikipedia/img/page-graph.p
[source,cypher]
----
UNWIND range(0,4) as level
CALL apoc.cypher.doit("
CALL apoc.cypher.doIt("
MATCH (c:Category { pagesFetched: false, level: $level })
CALL apoc.load.json('https://en.wikipedia.org/w/api.php?format=json&action=query&list=categorymembers&cmtype=page&cmtitle=Category:' + apoc.text.urlencode(c.catName) + '&cmprop=ids%7Ctitle&cmlimit=500')
YIELD value as results
Expand Down Expand Up @@ -138,7 +138,7 @@ WITH "SELECT ?label
FILTER(LANG(?label) = '' || LANGMATCHES(LANG(?label), 'en')) } LIMIT 1
" AS sparqlPattern
UNWIND range(0,3) as level
CALL apoc.cypher.doit("
CALL apoc.cypher.doIt("
MATCH (c:Category { level: $level })<-[:IN_CATEGORY]-(p:Page)
WHERE NOT exists(p.abstract)
WITH DISTINCT p, apoc.text.replace(sparqlPattern,'@wikiurl@',p.pageUrl) as runnableSparql LIMIT 100
Expand Down