4 ms·
I wonder if some kind of compiler/linter is possible for legal text. Like, "Warning: this comma is subject to ambiguous interpretation." But natural languages a
by hirundo 5y ago
I wonder if some kind of compiler/linter is possible for legal text. Like, "Warning: this comma is subject to ambiguous interpretation." But natural languages are poor candidates to use for composing unambiguous text, and any artificial language that you have to learn would be a problem, since it's critical that law is comprehensible to those it governs. On the other hand, it may be possible to construct a legal DSL that is more clear to the layman than the predominant legal jargon, and can be parsed into an S-expression.
And if we can dream about unambiguous law, we can dream bigger, about a compiler or linter that could extract more conceptual flaws, like "Warning: this law would facially violate the First Amendment", or "this law creates an incentive structure that may cancel its intentions."
This is probably too sci-fi to happen in my lifetime, but if I'm lucky maybe I'll live to see computer generated Friend of the Court briefs. We may be on the road to that with computer assisted analysis of historical language corpora to help determine original meanings.
- vcdimension 5y agoDeontic modal logic is used by academics to try and formalize legal & moral statements. There's also this programming language for codfying legislature: https://catala-lang.org https://catala-lang.org and this startup working on computational law: https://legalese.com/ https://legalese.com/
- Kalium 5y agoI suspect legal jargon exists for the same reason programming languages exist: it is functionally impossible to be sufficiently precise in idiomatic vernacular. Too many things require precise and clear shared definitions. What is real property? What is a security? What is intent? What is a class? What is an object? What is memory? How do you even begin to function when you can't define these precisely? With this in mind, a person could make a reasonable case that legal language is already a DSL implemented in a natural language.
- kemitchell 5y agoI lead the Common Form project, which maintains https://www.npmjs.com/package/commonform-lint https://www.npmjs.com/package/commonform-lint among other tools. Mostly, this handles "linting" structural aspects of legal terms, such as making sure that every special term invoked gets defined, every section referenced actually exists, and so on. But we've also been able to include some very rote stylistic checks, such as alerts about archaisms, legalisms, and needlessly wordy phrases. Even just this has proved an amazing boon in day to day practice. Akin to having real-time syntax checking in a code editor. Computers excel at the rote and structural. They really suck at substantive analysis, even with all the recent ML work I've seen...except where the substance in or out is rote or structural. You can probably get a model to read back effective dates or share prices out of a bucket of PDFs. First Amendment analysis? Is it going to predict Supreme Court cases for us, too? The hard work in law is nearly always pattern matching---What law applies to this situation? Does the definition cover this case, given its language and purpose?---rather than calculating a bunch of deductive implications from neatly coded factual situations. A lot of the fights in law are about how to code the situation, because of how the law applies from there.
- igorkraw 5y agoThe French wrote a (actually two, with the latest one formalising the first hacked up one) compiler for their tax code https://www.microsoft.com/en-us/research/publication/a-modern-compiler-for-the-french-tax-code/ https://www.microsoft.com/en-us/research/publication/a-moder...
- rwmj 5y agoHere's another "computational law" project to add to the other replies: https://law.stanford.edu/codex-the-stanford-center-for-legal-informatics/ https://law.stanford.edu/codex-the-stanford-center-for-legal...