Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Linusp/kg-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knowledge Graph Examples

Douban Movie Graph

Neo4j

Build graph

python cli.py import-to-neo4j --url bolt://localhost:7687/ \
                              --auth "neo4j:myneo4j" \
                              --data-dir movie/ \
                              --batch-size 1000 \
                              --drop-all
  • Example 1:

    match (c:Country)-[]-(m:Movie)-[]-(p:Person) return * limit 100

    Output:

    douban_movie_example1

  • Example 2:

    MATCH (m:Movie)-[r:actor]->(p:Person) WHERE p.name="黄渤" RETURN *

    Output

    douban_movie_example2

  • Example 3:

    MATCH (a:Person), (b:Person), p=shortestpath((a)-[:actor*]-(b))
    WHERE a.name="黄渤" and b.name="汤姆·克鲁斯"
    RETURN p

    Output

    douban_movie_example3

About

Knowledge Graph Examples

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published