Automatic Assignment of Section Structure to Texts of Dutch Court Judgments

Introduction

The Council for the Judiciary in the Netherlands (Raad voor de Rechtspraak) publishes an open data set of Dutch case law in XML and HTML on Rechtspraak.nl, with cases dating back to about . Most documents contain little semantic markup, such as element tags detailing the structure of (sub-)sections in a document.

It is useful to have such a section hierarchy, however. It is obviously useful for rendering documents to human users: a clear section hierarchy allows us to display a table of contents and to style section titles. Furthermore, because sections usually chunk similar kinds of information together, a good section hierarchy also allows search engines to better index texts by localizing semantic units, which in turn makes these documents better searchable for legal users. It is also a stepping stone to make the documents machine readable. A richly marked up document facilitates advanced text mining operations, such as automatically extracting the final judgment, extracting the judge's considerations, etcetera.

Recently, more richly marked up documents have been published on Rechtspraak.nl, as we can see in Figure 1. Still, there is an overwhelmingly large portion of documents which contain no or only sparse markup. To illustrate: at the time of writing, 78.7% of all judgment texts on Rechtspraak.nl do not contain any section tag, implying that a large number of documents are barely marked up. These documents are mostly from before . Older case law documents still produce legal knowledge, so it is desirable to have these older documents in good shape as well.

197619821985198819911994199720002003200620092012201505,00010,00015,00020,00025,00030,000Document countContains <*.info> tag and <section> tagContains only <section> tagContains <*.info> tagContains neither <*.info> tag nor <section> tagContains <*.info> tag and <section> tag, 1970 (1)Contains <*.info> tag and <section> tag, 1976 (0)Contains <*.info> tag and <section> tag, 1977 (0)Contains <*.info> tag and <section> tag, 1979 (0)Contains <*.info> tag and <section> tag, 1982 (0)Contains <*.info> tag and <section> tag, 1983 (0)Contains <*.info> tag and <section> tag, 1984 (0)Contains <*.info> tag and <section> tag, 1985 (0)Contains <*.info> tag and <section> tag, 1986 (0)Contains <*.info> tag and <section> tag, 1987 (0)Contains <*.info> tag and <section> tag, 1988 (0)Contains <*.info> tag and <section> tag, 1989 (0)Contains <*.info> tag and <section> tag, 1990 (0)Contains <*.info> tag and <section> tag, 1991 (1)Contains <*.info> tag and <section> tag, 1992 (0)Contains <*.info> tag and <section> tag, 1993 (0)Contains <*.info> tag and <section> tag, 1994 (0)Contains <*.info> tag and <section> tag, 1995 (0)Contains <*.info> tag and <section> tag, 1996 (0)Contains <*.info> tag and <section> tag, 1997 (2)Contains <*.info> tag and <section> tag, 1998 (0)Contains <*.info> tag and <section> tag, 1999 (0)Contains <*.info> tag and <section> tag, 2000 (3)Contains <*.info> tag and <section> tag, 2001 (4)Contains <*.info> tag and <section> tag, 2002 (6)Contains <*.info> tag and <section> tag, 2003 (5)Contains <*.info> tag and <section> tag, 2004 (3)Contains <*.info> tag and <section> tag, 2005 (4)Contains <*.info> tag and <section> tag, 2006 (5)Contains <*.info> tag and <section> tag, 2007 (15)Contains <*.info> tag and <section> tag, 2008 (19)Contains <*.info> tag and <section> tag, 2009 (42)Contains <*.info> tag and <section> tag, 2010 (56)Contains <*.info> tag and <section> tag, 2011 (102)Contains <*.info> tag and <section> tag, 2012 (417)Contains <*.info> tag and <section> tag, 2013 (10162)Contains <*.info> tag and <section> tag, 2014 (17360)Contains <*.info> tag and <section> tag, 2015 (15060)Contains only <section> tag, 1970 (0)Contains only <section> tag, 1976 (0)Contains only <section> tag, 1977 (0)Contains only <section> tag, 1979 (0)Contains only <section> tag, 1982 (0)Contains only <section> tag, 1983 (0)Contains only <section> tag, 1984 (0)Contains only <section> tag, 1985 (0)Contains only <section> tag, 1986 (0)Contains only <section> tag, 1987 (0)Contains only <section> tag, 1988 (0)Contains only <section> tag, 1989 (1)Contains only <section> tag, 1990 (1)Contains only <section> tag, 1991 (0)Contains only <section> tag, 1992 (0)Contains only <section> tag, 1993 (0)Contains only <section> tag, 1994 (0)Contains only <section> tag, 1995 (1)Contains only <section> tag, 1996 (0)Contains only <section> tag, 1997 (0)Contains only <section> tag, 1998 (0)Contains only <section> tag, 1999 (1)Contains only <section> tag, 2000 (5)Contains only <section> tag, 2001 (0)Contains only <section> tag, 2002 (2)Contains only <section> tag, 2003 (3)Contains only <section> tag, 2004 (4)Contains only <section> tag, 2005 (1)Contains only <section> tag, 2006 (2)Contains only <section> tag, 2007 (4)Contains only <section> tag, 2008 (2)Contains only <section> tag, 2009 (11)Contains only <section> tag, 2010 (18)Contains only <section> tag, 2011 (16)Contains only <section> tag, 2012 (93)Contains only <section> tag, 2013 (4515)Contains only <section> tag, 2014 (7944)Contains only <section> tag, 2015 (6361)Contains <*.info> tag, 1970 (0)Contains <*.info> tag, 1976 (0)Contains <*.info> tag, 1977 (0)Contains <*.info> tag, 1979 (0)Contains <*.info> tag, 1982 (0)Contains <*.info> tag, 1983 (0)Contains <*.info> tag, 1984 (0)Contains <*.info> tag, 1985 (0)Contains <*.info> tag, 1986 (0)Contains <*.info> tag, 1987 (0)Contains <*.info> tag, 1988 (0)Contains <*.info> tag, 1989 (0)Contains <*.info> tag, 1990 (0)Contains <*.info> tag, 1991 (0)Contains <*.info> tag, 1992 (0)Contains <*.info> tag, 1993 (0)Contains <*.info> tag, 1994 (0)Contains <*.info> tag, 1995 (0)Contains <*.info> tag, 1996 (0)Contains <*.info> tag, 1997 (0)Contains <*.info> tag, 1998 (0)Contains <*.info> tag, 1999 (0)Contains <*.info> tag, 2000 (0)Contains <*.info> tag, 2001 (0)Contains <*.info> tag, 2002 (0)Contains <*.info> tag, 2003 (0)Contains <*.info> tag, 2004 (0)Contains <*.info> tag, 2005 (0)Contains <*.info> tag, 2006 (0)Contains <*.info> tag, 2007 (0)Contains <*.info> tag, 2008 (0)Contains <*.info> tag, 2009 (0)Contains <*.info> tag, 2010 (0)Contains <*.info> tag, 2011 (0)Contains <*.info> tag, 2012 (1)Contains <*.info> tag, 2013 (3)Contains <*.info> tag, 2014 (9)Contains <*.info> tag, 2015 (10)Contains neither <*.info> tag nor <section> tag, 1970 (0)Contains neither <*.info> tag nor <section> tag, 1976 (1)Contains neither <*.info> tag nor <section> tag, 1977 (2)Contains neither <*.info> tag nor <section> tag, 1979 (1)Contains neither <*.info> tag nor <section> tag, 1982 (1)Contains neither <*.info> tag nor <section> tag, 1983 (4)Contains neither <*.info> tag nor <section> tag, 1984 (7)Contains neither <*.info> tag nor <section> tag, 1985 (9)Contains neither <*.info> tag nor <section> tag, 1986 (14)Contains neither <*.info> tag nor <section> tag, 1987 (14)Contains neither <*.info> tag nor <section> tag, 1988 (12)Contains neither <*.info> tag nor <section> tag, 1989 (17)Contains neither <*.info> tag nor <section> tag, 1990 (13)Contains neither <*.info> tag nor <section> tag, 1991 (9)Contains neither <*.info> tag nor <section> tag, 1992 (18)Contains neither <*.info> tag nor <section> tag, 1993 (27)Contains neither <*.info> tag nor <section> tag, 1994 (151)Contains neither <*.info> tag nor <section> tag, 1995 (530)Contains neither <*.info> tag nor <section> tag, 1996 (568)Contains neither <*.info> tag nor <section> tag, 1997 (723)Contains neither <*.info> tag nor <section> tag, 1998 (1048)Contains neither <*.info> tag nor <section> tag, 1999 (2259)Contains neither <*.info> tag nor <section> tag, 2000 (5443)Contains neither <*.info> tag nor <section> tag, 2001 (7759)Contains neither <*.info> tag nor <section> tag, 2002 (11218)Contains neither <*.info> tag nor <section> tag, 2003 (12732)Contains neither <*.info> tag nor <section> tag, 2004 (15310)Contains neither <*.info> tag nor <section> tag, 2005 (17308)Contains neither <*.info> tag nor <section> tag, 2006 (20582)Contains neither <*.info> tag nor <section> tag, 2007 (23215)Contains neither <*.info> tag nor <section> tag, 2008 (25906)Contains neither <*.info> tag nor <section> tag, 2009 (28059)Contains neither <*.info> tag nor <section> tag, 2010 (29870)Contains neither <*.info> tag nor <section> tag, 2011 (32258)Contains neither <*.info> tag nor <section> tag, 2012 (31073)Contains neither <*.info> tag nor <section> tag, 2013 (16378)Contains neither <*.info> tag nor <section> tag, 2014 (5669)Contains neither <*.info> tag nor <section> tag, 2015 (4011)Data source
Fig 1. Chart showing the number of documents with different kinds of markup. In particular, we are interested in the number of *.info tags, which are headers that contain metadata about the case, and section tags, denoting sections.

The problem that we investigate in this thesis, then, is whether we can enrich the markup of scarcely marked up documents in Rechtspraak.nl by automatically assigning a section hierarchy to the text elements. We divide this problem into the following subtasks:

  1. Importing documents from the Rechtspraak.nl web service;
  2. Tokenizing relevant text elements;
  3. Labeling these text elements with their respective roles (i.e. section title; numbering; text block; newline);
  4. Combining the tokens in such a way that they represent the most likely section hierarchy
  5. Publishing the resulting documents so that search engines can make use of the enriched markup

Tasks 1 and 2 are theoretically straightforward and mostly a problem of implementation, and the following chapter touches on both of these subjects briefly, mostly through a specification of the data set of court judgments from Rechtspraak.nl.

Task 3 describes labeling the text elements with their roles in the text, which we translate into the relevant markup tags. This is achieved by training a Conditional Random Field on a set of manually labeled documents. The trained model is then able to correctly label most elements: for all labels we report F1 scores of around 1.0, except for section titles: for these we report 0.91.

Task 4, organizing the tagged elements into a section hierarchy, is approached as a probabilistic parsing problem. We create a Context-Free Grammar which accepts a list of text elements as tokens and creates a parse tree which represents the section hierarchy. This approach returns a desirable section hierarchy in most cases: in our experiment we report an F1 score of 0.92.

Tasks 3 and 4 require more complicated machinery than importing and tokenization do, so these topics merit a more comprehensive explication. We describe our treatment of tasks 3 and 4 as two separate chapters, which are similarly structured: first, we introduce the problem to solve, then describe the methods used to solve the problem, and finally report and discuss experimental results.