Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit 361e204

Browse files
author
Mark Needham
committed
fixing example
1 parent 13ce0f7 commit 361e204

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

doc/asciidoc/scripts/similarity-cosine.cypher

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@ RETURN nodes, similarityPairs, write, writeRelationshipType, writeProperty, min,
8181
// tag::query[]
8282
MATCH (p:Person {name: "Praveena"})-[:SIMILAR]->(other),
8383
(other)-[:LIKES]->(cuisine)
84+
WHERE not((p)-[:LIKES]->(cuisine))
8485
RETURN cuisine.name AS cuisine
8586
// end::query[]

doc/asciidoc/scripts/similarity-euclidean.cypher

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,6 @@ RETURN nodes, similarityPairs, write, writeRelationshipType, writeProperty, min,
8181
// tag::query[]
8282
MATCH (p:Person {name: "Praveena"})-[:SIMILAR]->(other),
8383
(other)-[:LIKES]->(cuisine)
84+
WHERE not((p)-[:LIKES]->(cuisine))
8485
RETURN cuisine.name AS cuisine
8586
// end::query[]

doc/asciidoc/scripts/similarity-jaccard.cypher

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,6 @@ RETURN nodes, similarityPairs, write, writeRelationshipType, writeProperty, min,
7777
// tag::query[]
7878
MATCH (p:Person {name: "Praveena"})-[:SIMILAR]->(other),
7979
(other)-[:LIKES]->(cuisine)
80+
WHERE not((p)-[:LIKES]->(cuisine))
8081
RETURN cuisine.name AS cuisine
8182
// end::query[]

doc/asciidoc/similarity-cosine.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ include::scripts/similarity-cosine.cypher[tag=write-back]
195195

196196
We might then write a query to find out what types of cuisine people similar to us like:
197197

198-
.The following will find the most similar user to `Praveena` and return their favourite cuisine
198+
.The following will find the most similar user to Praveena and return their favourite cuisines that Praveena doesn't (yet!) like
199199
[source, cypher]
200200
----
201201
include::scripts/similarity-cosine.cypher[tag=query]
@@ -205,7 +205,6 @@ include::scripts/similarity-cosine.cypher[tag=query]
205205
.Results
206206
[opts="header",cols="1"]
207207
|===
208-
| Indian
209208
| Italian
210209
| French
211210
|===

doc/asciidoc/similarity-euclidean.adoc

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ include::scripts/similarity-euclidean.cypher[tag=stream]
8181
[opts="header"]
8282
|===
8383
| from | to |similarity
84-
| Arya | Karin | 7.681145747868608
85-
| Zhen | Michael | 7.874007874011811
86-
| Zhen | Praveena | 12.569805089976535
87-
| Praveena | Michael | 12.727922061357855
88-
| Michael | Karin | 15.033296378372908
89-
| Praveena | Karin | 16.1245154965971
90-
| Zhen | Karin | 16.30950643030009
91-
| Praveena | Arya | 16.76305461424021
92-
| Michael | Arya | 17.406895185529212
93-
| Zhen | Arya | 19.621416870348583
84+
| Arya | Karin | 7.681145747868608
85+
| Zhen | Michael | 7.874007874011811
86+
| Zhen | Praveena | 12.569805089976535
87+
| Praveena | Michael | 12.727922061357855
88+
| Michael | Karin | 15.033296378372908
89+
| Praveena | Karin | 16.1245154965971
90+
| Zhen | Karin | 16.30950643030009
91+
| Praveena | Arya | 16.76305461424021
92+
| Michael | Arya | 17.406895185529212
93+
| Zhen | Arya | 19.621416870348583
9494

9595
|===
9696
// end::stream[]
@@ -138,11 +138,11 @@ include::scripts/similarity-euclidean.cypher[tag=stream-topk]
138138
[opts="header",cols="1,1,1"]
139139
|===
140140
| from | to | similarity
141-
| Arya | Karin | 7.681145747868608
142-
| Karin | Arya | 7.681145747868608
143-
| Michael | Zhen | 7.874007874011811
144-
| Praveena | Zhen | 12.569805089976535
145-
| Zhen | Michael | 7.874007874011811
141+
| Arya | Karin | 7.681145747868608
142+
| Karin | Arya | 7.681145747868608
143+
| Michael | Zhen | 7.874007874011811
144+
| Praveena | Zhen | 12.569805089976535
145+
| Zhen | Michael | 7.874007874011811
146146

147147
|===
148148
// end::stream-topk[]
@@ -191,7 +191,7 @@ include::scripts/similarity-euclidean.cypher[tag=write-back]
191191

192192
We might then write a query to find out what types of cuisine people similar to us like:
193193

194-
.The following will find the most similar user to `Praveena` and return their favourite cuisine
194+
.The following will find the most similar user to Praveena and return their favorite cuisines that Praveena doesn't (yet!) like
195195
[source, cypher]
196196
----
197197
include::scripts/similarity-euclidean.cypher[tag=query]
@@ -202,7 +202,6 @@ include::scripts/similarity-euclidean.cypher[tag=query]
202202
[opts="header",cols="1"]
203203
|===
204204
| cuisine
205-
| Indian
206205
| French
207206
|===
208207
// end::query[]

doc/asciidoc/similarity-jaccard.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ include::scripts/similarity-jaccard.cypher[tag=write-back]
192192

193193
We might then write a query to find out what types of cuisine people similar to us like:
194194

195-
.The following will find the most similar user to `Praveena` and return their favourite cuisine
195+
.The following will find the most similar user to Praveena and return their favorite cuisines that Praveena doesn't (yet!) like
196196
[source, cypher]
197197
----
198198
include::scripts/similarity-jaccard.cypher[tag=query]
@@ -203,7 +203,6 @@ include::scripts/similarity-jaccard.cypher[tag=query]
203203
[opts="header",cols="1"]
204204
|===
205205
| cuisine
206-
| Indian
207206
| French
208207
|===
209208
// end::query[]

0 commit comments

Comments
 (0)