cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Modeling legal texts, regulations, or specifications

pingelsan
Node Clone

For a KM project, we want to model "formal texts" that describe legal or other formal requirements so that we can demonstrate how certain requirements are being met by our processes. Are there any best practices regarding modeling (this kind of) texts?
My first and perhaps naive take is to have a node for every paragraph with the properties number, title, and full text; all of these paragraph nodes (apart from the last one in a chapter) have a [:next] relationship to determine sequence while being embedded in a hierarchy like (b:Book)-[:HAS_PART]->(c:chapter)-[:HAS_PART]->(p:Paragraph). We are not a publishing house, so this kind of granularity is sufficient for our purposes. Nevertheless, I'd be interested if anyone has found (and found ways to avoid) any stumbling blocks along some similar way.

best regards and TIA,
Christoph

1 REPLY 1

MuddyBootsCode
Graph Steward

I've got kind of a similar project where I'm tracking clauses in a lease document. My checks on the document look something like this, with lease requirements being a parameter:

MATCH (l:Lease)-[:HAS]->(c:Clause)
UNWIND $leaseRequirements as requirement, l as lease, c as clause
RETURN l where c.requirements is null return lease

This checks each lease for the required named clauses and returns the ones that don't have them. That's kind of the bare bones break down.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online