Buonasera Marco e lista,

perdonatemi per la spataffiata...

Innanzi tutto un _caveat_ deve sempre rimanare valido: semmai fosse
tecnicamente possibile, le leggi NON DEVONO essere MAI automaticamente
applicate da un computer.

"M. Fioretti" <mfiore...@nexaima.net> writes:

> On Mon, Oct 16, 2023 11:08:14 AM +0200, 380° wrote:
>
>> Ho già accennato altre volte a cosa potrebbe essere il corpora
>> legislativo, dal livello Costituzione fino alle ordinanze dei sindaci,
>> se le informazioni fossero descritte in una forma sintattica comoda di
>> RDF, immagazzinate in uno store adeguato e interrogate via
>> SPARQL... ovviamente un "summarizer" o on "topic analist" automatici
>> farebbero comodo ma il contesto sarebbe un'altro mondo.
>
> Stai parlando anche tu di quello che recentemente ho chiamato:
>
> "I want AI to do to law and tax codes what..."
>
> https://mfioretti.substack.com/p/how-to-tell-good-ai-from-bad-or-pointless

(salvato su Wayback Machine e archive.is)

> o di altro?

tu scrivi:

--8<---------------cut here---------------start------------->8---

On another, much more critical front, I want AI to do to law and tax
codes what Seldon Hardin did to Lord Dorwin in the Foundation novels,
that is call out all the cruft, and throw it away (do read that quote,
it's important). That is, I want AI to parse whole codes, in order to:

1 write the shortest and simplest versions of the same codes that
  produce exactly all the same effects

2 point out all the parts, and the resulting procedures, that are
 ambiguous, uselessly complex, impossible to apply or mutually
 contradictory ....

so that all the humans with the right skills (i.e. all lawyers, judges,
law students...) can parse and clean the results, possibly with rewards
for every bug they find, until human lawmakers and ministers can safely,
officially decree that those simpler codes are the new law of the land.

EDIT, added 2023/10/09 15:07 CEST: as proof of the need for such checks,
look at this case where one ambiguous “and” in one US law may have major
impact on thousands of federal prison sentences. Stuff like this must be
catched BEFORE sentences.

--8<---------------cut here---------------end--------------->8---

Io però mi riferisco a qualcosa d'altro, anche se oggettivamente
l'analisi dei testi per mezzo di sistemi (nano)LLM potrebbe aiutare
molto nell'opera di RDFizzazione delle leggi.

ATTENZIONE che nel passo che ho riportato sopra fai riferimento a
questo:

--8<---------------cut here---------------start------------->8---

two societies entered into a long agreement (thousands of pages) and it
ended up not meaning anything at all. This was determined by encoding
the agreement in symbolic logic and then feeding it into a computer.

--8<---------------cut here---------------end--------------->8---
(https://www.sffworld.com/forum/threads/asimov-foundation-a-long-agreement-that-meant-nothing.24426/)

L'accordo, quindi, NON /fu/ analizzato in forma di linguaggio naturale
ma fu codificato con un linguaggio di logica simbolica [1] poi
/interpretato/ da un computer che evidenziò che l'accordo non
significava nulla.

Ora, ammesso e /non concesso/ che quelli descritti nelle leggi
(regolamenti, ecc.) siano problemi risolvibili algoritmicamente [2], non
è quello a cui mi riferisco... anche se confesso sarebbe un percorso che
mi affascina tantissimo... il fascino del male probabilmente :-)

Quello a cui mi riferisco è un sistema di formalizzazione delle
proposizioni legislative un po' meno farragginoso dei voli pindarici che
possiamo facilmente osservare e _molto_ meno rigido di sistemi
"schematici" come l'XML [3]; un sistema (probabilmente) descritto in
papers come questi (che non ho ancora letto):

1. «Towards Legal Knowledge Representation System Leveraging RDF»

https://www.researchgate.net/publication/331305619_Towards_Legal_Knowledge_Representation_System_Leveraging_RDF

/This paper presents a model usable for a legal system knowledge
representation and an implementation of the German Civil Law System as
RDF ontology. In this work, different laws are determined in an
interconnected structure in order to bridge the gap between computer and
social sciences. This model will be created out of natural text, for
instance law texts or court decisions, by using a parsing algorithm to
build the model, information retrieval tools to extract information and
a reasoning algorithm to search and create connections between the
particular rules. The focus of this work is to develop the design of the
presented model, for an automated reusable entity generation extended by
third party knowledgebases./

2. https://link.springer.com/article/10.1007/s10506-023-09364-9
(maledizione è paywalled)!

A RDF-based graph to representing and searching parts of legal documents
Francisco de Oliveira & Jose Maria Parente de Oliveira 
(2023)

/Despite the public availability of legal documents, there is a need for
finding specific information contained in them, such as paragraphs,
clauses, items and so on. With such support, users could find more
specific information than only finding whole legal documents. Some
research efforts have been made in this area, but there is still a lot
to be done to have legal information available more easily to be
found. Thus, due to the large number of published legal documents and
the high degree of connectivity, simple access to the document is not
enough. It is necessary to recover the related legal framework for a
specific need. In other words, the retrieval of the set of legal
documents and their parts related to a specific subject is
necessary. Therefore, in this work, we present a proposal of a RDF-based
graph to represent and search parts of legal documents, as the output of
a set of terms that represents the pursued legal information. Such a
proposal is well-grounded on an ontological view, which makes possible
to describe the general structure of a legal system and the structure of
legal documents, providing this way the grounds for the implementation
of the proposed RDF graph in terms of the meaning of their parts and
relationships. We posed several queries to retrieve parts of legal
documents related to sets of words and the results were significant./

3. https://ceur-ws.org/Vol-321/paper2.pdf

The Legal-RDF Ontology. A Generic Model for Legal

/Legal-RDF.org1 publishes a practical ontology that models both the
layout and content of a document and metadata about the document; these
have been built using data models implicit within the HTML, XSL, and
Dublin Core dialects. Directed Acyclic Graphs (DAGs) form the foundation
of all models within the ontology, that is, DAGNode and DAGModel are the
base classes for all other ontology classes, which include a restatement
of RDF and OWL classes and properties as well as basic Kellog
parts-of-speech. The ontology also represents an explicit semantic model
used during its classifications: concrete classes are categorized as
some element of a dramatic production, that is, as a subclass of Actor,
Role, Scene, Prop, Theme, or Drama; this can be helpful during analyses
of semantic perspective and context associated with resource definitions
and attribute values. The LegalRDF ontology distinguishes between
predicate verbs and predicate nouns in its models of a Statement to
yield an intuitively appealing vocabulary that segregates attributes as
past, present, future, or conditional, information. To facilitate
development of generic tools, all data and object properties defined in
the ontology’s models are categorized as a subproperty of one of the 15
Dublin Core properties; provenance data, with emphasis on an asOf
timestamp, may be recorded for any attribute of a resource. Legal-RDF’s
numeric properties derive from the ISO Systeme Internationale
measurement systems; algebraic properties derive from XML Schema
datatypes; language and currency designations are based upon relevant
ISO standards; and time-zone designations are based on a review of local
and regional standards (with some modifications necessary to eliminate
collisions between the names of these properties and ISO standards). In
addition to classes that represent quantities, classes are included that
represent qualities that may be used to subtype or otherwise
characterize instances./

In parole povere, una versione "on-steroids" di leggi scritte con
l'ipertesto, per semplificare un po'.

>> Per non parlare di cosa si potrebbe fare se i codici fossero davvero
>> trattati come... programmi (SORGENTI) B-)
>
> verissimo, a partire dal sapere sempre chi e' che inserisce o cambia
> paragrafi per motivi piu' o meno discutibili:
>
> https://stop.zona-m.net/it/2015/09/e-ora-di-scrivere-le-leggi-come-il-software/

--8<---------------cut here---------------start------------->8---

Per computer e software, trattare leggi o il codice sorgente di tutti i
programmi software che usiamo è praticamente la stessa cosa. Entrambi i
tipi di “documenti”, infatti, sono semplice testo: magari formattato in
modi diversissimi, ma semplice testo. Ma i gruppi di programmatori di
tutto il mondo è da decenni che non devono mangiarsi il fegato per
capire CHI di loro ha modificato una certa riga di codice, o
quando. Perché loro usano sistemi di controllo delle versioni,

[...] Parliamoci chiaro: l’unico vero ostacolo di una soluzione del
genere sarebbe lo sforzo mentale, in chi dovrebbe usarlo, causato dal
dover imparare a scrivere testi con un nuovo programma. Sarà per questo
che in questo momento ho una morsa allo stomaco e le lacrime agli
occhi. Meglio rinunciarci, dai, non possiamo causare tanta sofferenza.

--8<---------------cut here---------------end--------------->8---

Sono completamente d'accordo con te.

Già solo usare un sistema di controllo versioni per leggi scritte in
qualche "markup" sano (già, perché i documenti scritti in ODT col cavolo
che si "versionano" bene) sarebbe un inizio...

...poi, piano piano, cominciare a trattare le leggi (e molti altri
codici) *esattamente* come "codice sorgente" (perché lo sono), con
*tutto* quello che comporta: uso di migliori formalizzazioni (RDF è un
valido esempio), gestione delle dipendenze/link... creazione di
/librerie/ legislative, del tutto _analoghe_ alle librerie software.

Poi un giorno chissà, nel 2256 cominceremo a scrivere le leggi in una
versione avanzata del Prolog :-O

C'è così tanto lavoro da fare!



Ciao e grazie, 380°


[1] https://en.wikipedia.org/wiki/Mathematical_logic#Symbolic_logic

[2] molto probabilmente non lo sono:
https://en.wikipedia.org/wiki/Undecidable_problem#Relationship_with_G%C3%B6del's_incompleteness_theorem

[3] https://en.wikipedia.org/wiki/Legal_XML
https://en.wikipedia.org/wiki/Akoma_Ntoso

-- 
380° (Giovanni Biscuolo public alter ego)

«Noi, incompetenti come siamo,
 non abbiamo alcun titolo per suggerire alcunché»

Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
nexa mailing list
nexa@server-nexa.polito.it
https://server-nexa.polito.it/cgi-bin/mailman/listinfo/nexa

Reply via email to