"Constructing Knowledge Atlas Neo4j" _ Natural Language Processing

Source: Internet
Author: User
Tags unique id neo4j

neo4j download Download neo4j. Then access via http://localhost:7474

1, create the entity file CSV, you need to include a unique ID (in the way of UUID1)

2, create a relationship CSV, through the entity ID connected;

Import:

Entity 1:

LOAD CSV with HEADERS from "File:///new_entity1.csv" Asline

MERGE (Comp:company{name:line.name,code:line.code})

Entity 2:

LOAD CSV with HEADERS from "File:///new_entity2.csv" Asline

MERGE (Comp:company{name:line.name}) Relationship:

LOAD CSV with HEADERS from ' file:///gudong_relation2.csv ' as Line

Match (from:company{id:line.from_id}), (to:company{id:line.to_id})

Merge (from)-[r: main shareholder {shareholding:line.property}]-> (to)

Query all nodes and relationships:

Start n = node (*)

return n

Find:

MATCH (com:company{name: "Vanke a"})-[main shareholder]-(Com2:company) return com,com2


deleting nodes and relationships

MATCH (n)-[r]-()

DELETE N,r



Simply delete so node:

Match (N)

Delete N


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.