Editing
Corpus/Graph
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Graph schema (draft) == <syntaxhighlight lang="sql"> CREATE SCHEMA IF NOT EXISTS graph; CREATE TABLE graph.concepts ( id text PRIMARY KEY, -- thematic path: fr.civil.contrat.formation.consentement.vice.dol jurisdiction text NOT NULL, parent_id text, -- parent concept (extends) title text NOT NULL, concept_type text NOT NULL, -- qualifiable, standard_ouvert, principe_directeur, procedural, bareme defining_articles jsonb, -- references to corpus documents metadata jsonb DEFAULT '{}', created_at timestamptz DEFAULT now() ); CREATE TABLE graph.annotations ( id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, doc_id text NOT NULL, -- references corpus.documents.id annotation_type text NOT NULL, -- structure, defines, illustrates, condition, qualify, framework... concept_id text, -- references graph.concepts.id version int NOT NULL, parent_version int, method text NOT NULL, -- stub, llm, human, jurist confidence text NOT NULL, -- stub, memory_only, source_checked, cross_validated, disputed author text, prompt_hash text, content jsonb NOT NULL, created_at timestamptz DEFAULT now() ); -- PostgreSQL does not allow function calls in table-level UNIQUE constraints. -- Use a unique index instead: CREATE UNIQUE INDEX idx_ann_unique ON graph.annotations (doc_id, annotation_type, coalesce(concept_id, ''), version); CREATE TABLE graph.edges ( id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, source_id text NOT NULL, target_id text NOT NULL, kind text NOT NULL, properties jsonb DEFAULT '{}', UNIQUE (source_id, target_id, kind) ); CREATE TABLE graph.compilations ( id text PRIMARY KEY, version int NOT NULL, compiled_at timestamptz NOT NULL, source_commit text, quality jsonb, dependencies jsonb, artifact_path text ); </syntaxhighlight>
Summary:
Please note that all contributions to Dura Lex Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
Dura Lex Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Tools
What links here
Related changes
Page information