Elamur Research⌕
☰
home / papers / 2017 / A Web-Based Tool for Analysing Normative Documents in English

A Web-Based Tool for Analysing Normative Documents in English

Paper · 2017 · John J. Camilleri, Mohammad Reza Haghshenas and Gerardo Schneider

Summary

Contracts, privacy policies, licences and service-level agreements are long, and their clauses refer to each other, so a reader cannot easily answer questions such as whether their data may be shared or what they are committing to. Keyword search handles exceptions and cross-references poorly. The authors combine several components from their earlier work into one web application, the Contract Verifier.

The pipeline works as follows:

  • The ConPar extractor reads Stanford Parser dependency trees and fills an editable table of clauses.
  • The user corrects that table.
  • A script turns the table into a formal model based on C-O Diagrams, stored in an XML format.
  • The model is shown back to the user in a controlled English and in a compact formal notation.
  • The user picks questions from English templates. Some are answered by walking the model's structure. Others are answered by model checking after translation to UPPAAL timed automata.

A university-course rulebook serves as the running example. The tool is a proof of concept and has had no full user study. Its value is showing a complete, explainable path from text to verifiable norms.

Key points

  • ConPar extracts four kinds of information per clause: agent (subject), action (verb plus object), modality (obligation, permission, prohibition) and temporal or other conditions. It also splits a sentence into sub-clauses joined by conjunction, choice or sequence, and outputs TSV.
  • Earlier evaluation of extraction on a test set of 4 documents gave F1 between 0.49 and 0.86. Parsing plus extraction takes roughly half a second per sentence.
  • Models are stored as COML, an XML format based on C-O Diagrams. They are displayed three ways:
    • as the post-edited text,
    • as a CNL built in Grammatical Framework (GF), using a lexicon of over 64,000 entries,
    • as the CODSH shorthand.
  • Every clause has its own identifier and a clock that restarts when the clause becomes active. Users can reference these to state relative deadlines.
  • Structural queries take time linear in the model size. Semantic queries run in UPPAAL and suffer from state-space explosion, so they are realistic only for contracts with tens of clauses.

Interesting ideas

  • I1. The tool places a plain editable table between automatic extraction and the formal model, so people fix errors in rows rather than in the formalism. This makes imperfect extraction usable.
  • I2. The finished model is verbalised back into a restricted English, letting the user check what the system actually understood. If a word is missing from the lexicon, only this view fails and the rest of the tool keeps working.
  • I3. Deontic modality is modelled as a first-class property of a clause. Sentences are refined into sub-clauses linked by and, or, or then, and a clause can carry a penalty for violation.
  • I4. When a query gives an unexpected answer, the system treats it as evidence of one of two problems: a mistake in the model, or a genuine flaw in the source text, such as an obligation with no deadline.
  • I5. Questions are split into a cheap tier answered by traversing the model and an expensive tier answered by temporal model checking. Per-clause clocks that restart on activation express relative time.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (frames): Dump extracted frames (agent, action, modality, conditions) as one row each, so annotators can correct them quickly and the corrections can be compared against parser output.
  • I2 (back): Generate a controlled-English rendering of the meaning graph as an explainability check, and treat lexicon gaps as a local, reported failure rather than a crash.
  • I3 (frames): Add obligation, permission and prohibition, plus reparation links, to the frame layer so rule-like texts (school rules, fable morals) yield structured norms instead of plain events.
  • I4 (answer): When a reader's answer looks wrong, classify it as either a misreading or an under-specified source text, and report which one it is.
  • I5 (world): Answer most questions by direct graph lookup and reserve costly temporal reasoning for event-order questions, anchoring relative deadlines to when each state or event begins.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as John J. Camilleri, Mohammad Reza Haghshenas and Gerardo Schneider. 2017. A Web-Based Tool for Analysing Normative Documents in English. arXiv:1707.03997.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1707.03997 · arXiv 1707.03997

@misc{camilleri2017web,
  title = {{A Web-Based Tool for Analysing Normative Documents in English}},
  author = {John J. Camilleri, Mohammad Reza Haghshenas and Gerardo Schneider},
  year = {2017},
  doi = {10.48550/arxiv.1707.03997},
  eprint = {1707.03997},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1707.03997}
}

References

23 references, 1 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Alur, R., Dill, D.L.: A Theory of Timed Automata. Theoretical Computer Science 126(2), 183–235 (1994) find
  2. Angelov, K., Camilleri, J.J., Schneider, G.: A Framework for Conflict Analysis of Normative Texts Written in Controlled Natural Language. JLAP 82(5-7), 216–240 (2013) find
  3. Athan, T., Governatori, G., Palmirani, M., Paschke, A., Wyner, A.: LegalRuleML: Design principles and foundations. In: RW 2015. pp. 1–37. Berlin (2015) Tests carried out on a dual-core MacBook Air from 2013. find
  4. Azzopardi, S., Gatt, A., Pace, G.J.: Integrating natural language and formal analysis for legal documents. In: Conference on Language Technologies and Digital Humanities 2016 (2016) find
  5. Azzopardi, S., Gatt, A., Pace, G.J.: Reasoning about partial contracts. In: JURIX 2016. pp. 23–32 (2016) find
  6. Behrmann, G., David, A., Larsen, K.G.: A Tutorial on UPPAAL 4.0. Tech. rep., Department of Computer Science, Aalborg University (2006) find
  7. Boer, A., Winkels, R., Vitali, F.: MetaLex XML and the Legal Knowledge Interchange Format. In: Computable Models of the Law, pp. 21–41. Springer (2008) find
  8. Camilleri, J.J., Grūzı̄tis, N., Schneider, G.: Extracting Formal Models from Normative Texts. In: NLDB 2016, LNCS, vol. 9612. Springer (2016) find
  9. Camilleri, J.J., Paganelli, G., Schneider, G.: A CNL for Contract-Oriented Diagrams. In: CNL 2014, LNCS, vol. 8625, pp. 135–146. Springer (2014) find
  10. Camilleri, J.J., Schneider, G.: Modelling and Analysis of Normative Documents. JLAMP 87 (2017), (To appear). Preprint available at http://www.cse.chalmers.se/~cajohn/papers/jlamp-nwpt2015.pdf ↗
  11. Cheng, T.T., Cua, J., Tan, M., Yao, K., Roxas, R.: Information extraction from legal documents. In: SNLP 2009. pp. 157–162 (2009) find
  12. Dı́az, G., Cambronero, M.E., Martı́nez, E., Schneider, G.: Specification and Verification of Normative Texts using C-O Diagrams. IEEE Transactions on Software Engineering 40(8), 795–817 (2014) find
  13. Fenech, S., Pace, G.J., Schneider, G.: CLAN: A Tool for Contract Analysis and Conflict Discovery. In: ATVA 2009. LNCS, vol. 5799, pp. 90–96. Springer (2009) find
  14. Klein, D., Manning, C.D.: Accurate Unlexicalized Parsing. In: ACL 2003. pp. 423– 430 (2003)
  15. Larsen, K.G., Pettersson, P., Yi, W.: UPPAAL in a Nutshell. STTT 1(1-2), 134– 152 (1997) find
  16. Martı́nez, E., Cambronero, E., Dı́az, G., Schneider, G.: A Model for Visual Specification of e-Contracts. In: SCC 2010. pp. 1–8. IEEE Computer Society (2010) find
  17. Mercatali, P., Romano, F., Boschi, L., Spinicci, E.: Automatic Translation from Textual Representations of Laws to Formal Models through UML. In: JURIX 2005. pp. 71–80. IOS Press (2005) find
  18. Object Management Group (OMG): Semantics of business vocabulary and business rules (SBVR). Tech. Rep. formal/2015-05-07 (2015), http://www.omg.org/spec/SBVR/1.3/PDF ↗
  19. Prisacariu, C., Schneider, G.: A formal language for electronic contracts. In: FMOODS 2007. LNCS, vol. 4468, pp. 174–189. Springer (2007) find
  20. Prisacariu, C., Schneider, G.: A dynamic deontic logic for complex contracts. JLAP 81(4), 458–490 (2012) find
  21. Ranta, A.: Grammatical Framework: Programming with Multilingual Grammars. CSLI Publications, Stanford (2011) find
  22. Wyner, A., Peters, W.: On rule extraction from regulations. In: Atkinson, K. (ed.) JURIX 2011, pp. 113–122. IOS Press, Amsterdam (2011) find
  23. Wyner, A.Z., Angelov, K., Barzdins, G., Damljanovic, D., Davis, B., Fuchs, N.E., Höfler, S., Jones, K., Kaljurand, K., Kuhn, T.: On controlled natural languages: Properties and prospects. In: CNL 2009. pp. 281–289 (2009) find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/camilleri-2017-web-based-tool-analysing-normative/