QubitPi commited on
Commit
c3511c2
1 Parent(s): 0e282f1

Add recursive query to expand a node (#5)

Browse files
Files changed (3) hide show
  1. README.md +12 -4
  2. german-greek-latin.png +0 -0
  3. german.yaml +2 -1
README.md CHANGED
@@ -139,12 +139,20 @@ More details TBA.
139
 
140
  #### Interesting Queries
141
 
142
- - Search for a vocabulary with all its links:
143
-
144
- ```text
145
- MATCH (term:Term)-[r]-(x) WHERE r.name = "gerund of" RETURN term, r, x
 
 
 
 
146
  ```
147
 
 
 
 
 
148
  Languages
149
  ---------
150
 
 
139
 
140
  #### Interesting Queries
141
 
142
+ - Expanding German "nämlich":
143
+
144
+ ```cypher
145
+ MATCH (term:Term{name:'nämlich'})
146
+ CALL apoc.path.expand(term, "RELATED|DEFINITION", null, 1, -1)
147
+ YIELD path
148
+ RETURN path, length(path) AS hops
149
+ ORDER BY hops;
150
  ```
151
 
152
+ ![Expanding "nämlich"](./german-greek-latin.png "Error loading german-greek-latin.png")
153
+
154
+ - Search for all gerunds: `MATCH (term:Term)-[r]-(x) WHERE r.name = "gerund of" RETURN term, r, x`
155
+
156
  Languages
157
  ---------
158
 
german-greek-latin.png ADDED
german.yaml CHANGED
@@ -1590,7 +1590,8 @@ vocabulary:
1590
  definition: welcome
1591
  - term: denn
1592
  definition:
1593
- - (adv.) then, thus
 
1594
  - (conj.) because
1595
  - term: der Mann
1596
  definition:
 
1590
  definition: welcome
1591
  - term: denn
1592
  definition:
1593
+ - (adv.) then
1594
+ - (adv.) thus
1595
  - (conj.) because
1596
  - term: der Mann
1597
  definition: