Skip to content

Instantly share code, notes, and snippets.

@maiha
Created November 2, 2010 01:24
Show Gist options
  • Save maiha/659148 to your computer and use it in GitHub Desktop.
Save maiha/659148 to your computer and use it in GitHub Desktop.
import sc.ala.neo4j.Neo
new Neo("/tmp/neo1") { W{
N("中国") --> "牽制" --> N("日本") <-- "牽制" <-- N("ロシア")
N("アメリカ") --> "擁護" --> N("日本")
}}
% neo /tmp/neo1 edges
[1:中国] --(牽制)--> [2:日本]
[3:ロシア] --(牽制)--> [2:日本]
[4:アメリカ] --(擁護)--> [2:日本]
% neo /tmp/neo1 path 中国 ロシア 牽制
loading current nodes...done [0.0]
1:中国
2:日本
3:ロシア
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment