Skip to content

Instantly share code, notes, and snippets.

@mzsima
Created May 18, 2020 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzsima/749ae0b27605759d948bedfc51c2f398 to your computer and use it in GitHub Desktop.
Save mzsima/749ae0b27605759d948bedfc51c2f398 to your computer and use it in GitHub Desktop.
働くという漢字のつくり

image

snapshot

code gremlin

schema.vertexLabel("Kanji").
       ifNotExists().
       partitionBy("name", Text).
       create();

schema.edgeLabel('joint').
  ifNotExists().
  from('Kanji').to('Kanji').
  create()
  
people = g.addV("Kanji").
        property("name", "人").
        next();

heavy = g.addV("Kanji").
        property("name", "重").
        next();
        
power = g.addV("Kanji").
        property("name", "力").
        next();
        
move = g.addV("Kanji").
        property("name", "動").
        next();

work = g.addV("Kanji").
    property("name", "働").
    next();
        
g.addE("joint").
    from(heavy).
    to(move).
    next();
    
g.addE("joint").
    from(power).
    to(move).
    next();


g.addE("joint").
    from(people).
    to(work).
    next();
    
g.addE("joint").
    from(move).
    to(work).
    next();

dev.V()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment