{"id":184,"date":"2010-03-31T23:07:45","date_gmt":"2010-04-01T04:07:45","guid":{"rendered":"http:\/\/blog.law.cornell.edu\/voxpop\/2010\/03\/31\/crowdsourcing-legal-commentary\/"},"modified":"2010-07-17T10:54:58","modified_gmt":"2010-07-17T15:54:58","slug":"crowdsourcing-legal-commentary","status":"publish","type":"post","link":"https:\/\/blog.law.cornell.edu\/voxpop\/2010\/03\/31\/crowdsourcing-legal-commentary\/","title":{"rendered":"Crowdsourcing Legal Commentary"},"content":{"rendered":"

Background: The Need for Free Legal Commentaries<\/strong>\"Statler<\/a><\/p>\n

A legal commentary — also known as a legal treatise<\/a> — is an unofficial text, intended to complement a particular source of law, often consisting of one or more statutes<\/a>. A commentary on a statute provides information on how to interpret terms in the statutory text<\/a>, summarizes examples of the statute’s application, references other relevant parts of the statutory law, and explains the legislative history<\/a> and policy background of the statute. As statutory law is typically written in an open-ended way, setting forth norms in general language and usually without examples of how the law should be applied, a newcomer may have difficulty understanding it. Legal commentaries help with this.<\/p>\n

In many jurisdictions, the texts of statutes are published by the legislature, usually without claim to copyright, and thus are made available to all, including to free-access-to-law services<\/a>. Legal commentaries, by contrast, are written by private parties, who have a copyright on the resulting text, copies of which they typically sell at price levels that prevent most persons other than legal professionals from accessing them. Thus, most citizens may have free access to law, but not to the texts necessary for understanding it<\/a>.<\/p>\n

My background is that of a software developer, but in 2005 I started law school in Sweden. At that time, I couldn’t find any good freely accessible web service containing Swedish statutory law, so I built one called lagen.nu<\/a> (which, translated, means “the law, now”). When the site debuted it contained around 4,000 pages of statutory law, and another 10,000 pages with headnotes on legal cases, with hyperlinks and cross-references. Over the next few years the site was gradually improved, with better hyperlinking of references, the addition of the full text of case law, and an improved graphical interface. The purpose of the site was and is to make law accessible to the common person. But making available official data such as statutory and case law can only get you so far, as there are many aspects of the law which are not apparent from the face of primary legal documents.<\/p>\n

The Swedish legal system<\/a>, like most civil law systems<\/a>, is based more on statutory law than are most common law systems<\/a>. Jurists in Sweden therefore spend much time interpreting statutory law. There are several publishers<\/a> — including Thomson Fakta<\/a> and Norstedts Juridik<\/a> — that provide legal commentaries on Swedish central acts. The commentaries are written for legal professionals, which is evident in both the extent of the commentaries and their price. (As an example, the standard commentary on the Swedish code of judicial procedure<\/a> fills four loose-leaf binders and costs 4435 SEK [$611 US].) As such, they are not accessible in any realistic sense to laypeople.<\/p>\n

Therefore, I started thinking about how one could create a free commentary on Swedish law. Traditional commentaries require enormous resources, the most critical and expensive being the time of professors or other experts. Commentaries written for legal professionals generally fall into either of two categories: (1) in-depth works, or (2) practice tools. In-depth works — such as Fitger’s R\u00e4tteg\u00e5ngsbalken<\/a> — provide extensive treatment of the subject, delve deeply into the historical and teleological background of the regulation in question, and examine every conceivable exceptions-from-the-exception-to-the-rule detail. Those commentaries can be ten times the length of the actual statutory text, and are typically published in book form. In particular, they are written for readers who already understand the basic concepts and structure of the regulation, and who have time to dig deeper. For ordinary people, this level of detail is neither needed nor wanted.<\/p>\n

In addition, there are practice tools, shorter commentaries more suited for the practicing lawyer who needs to quickly understand a particular regulation. These are still written for professionals, and are typically accessible as part of an electronic database subscription<\/a>. Such subscriptions are priced far beyond the reach of non-professionals as well.<\/p>\n

Thus neither form of commentary is written for laypeople, and neither is readily available to them. In order for the law to be accessible to all, it needs to be explained differently, and the explanation needs to be freely available. Writing this sort of commentary doesn’t require a tenured professor.\u00a0 In fact, the basic aspects of any central act can be adequately explained by any law student having the following two qualities:<\/p>\n

a) A thorough understanding of the subject (for example, having taken the relevant course and having received a good grade); and<\/p>\n

b) A talent for explaining complex things succinctly. At this, the student may even outdo the professor, as the student — having recently been a novice respecting the topic — will have a better understanding of how the subject is approached by someone new to it.<\/p>\n

In any given act, there are a handful of key sections. A brief introduction to the act, combined with short explanations of these key sections, would be enough to create something useful to a nonlawyer. A person with a good knowledge of the act could write this in an evening. Something more extensive, like a basic commentary on the interesting parts of any central act, could be written in one or two weeks of work.<\/p>\n

Still, there are a lot of central acts in Swedish law, and of only a few of these do I have\"Swedish<\/a> extensive knowledge. Since I wouldn’t be able to write all the commentary myself, I’d have to create something that made it possible for people more knowledgeable than I to contribute their knowledge. Thus, the solution would have two aspects — one technological, one social. During the spring, summer, and autumn of 2009, we tried to create this solution.<\/p>\n

Technology: Collaborative Writing Tools<\/strong><\/p>\n

In our proposed free online system, a commentary for a single act would normally contain a brief introduction to the act itself, followed by comments on the most important sections. A simple way to do this is to write the entire commentary as a single text document, divided into different parts, each referencing a particular section of the act. Acts in the Swedish law system can vary greatly in length, with some being only a sentence long,<\/a> and some being over 100,000 words long<\/a> and containing over 1000 different sections.\u00a0 However, the decision to use one single commentary text per act was made in order to keep things simple.<\/p>\n

Swedish acts are typically divided into chapters, which are divided into sections (though for shorter acts, only sections are used). For example, the second section of the fourth chapter of an act is referenced as “4 kap. 2 \u00a7”. We adopted a convention of using such a reference as a header preceding the commentary for the referenced section.<\/p>\n

Apart from headings, we tried to use as little formatting as possible. Basic bold and italics were desirable, as were different sorts of lists (ordered, unordered, and definition lists), but not things like multiple fonts or footnotes. Hyperlinks, both internal within the system and external to other web pages, were encouraged.<\/p>\n

Apart from commentaries on the acts themselves, we wanted to be able to describe important concepts referred to in the acts. To write succinct explanations of statutes, one often has to refer to central legal concepts<\/a> (such as “The rule of law<\/a>“). If that reference can be linked to a page that describes the concept in greater detail, the commentary can be made shorter and the user can decide whether to follow the link if more explanation is needed. Furthermore, the concept can be referred to from multiple commentaries.<\/p>\n

In order for the process to be as simple as possible, we needed a web-based editing system that didn’t require any particular piece of software on the user’s computer. We also didn’t want to spend significant time developing or customizing software.<\/p>\n

The decision was made to use MediaWiki<\/a>, the software behind Wikipedia<\/a>, for the task. MediaWiki is a very robust and well developed piece of software with an active developer community. It’s also easy to extend with “hooks,” that is,\u00a0small pieces of code that are configured to run in certain situations (such when a page is saved). Pages can be hyperlinked, and basic formatting such as headings and lists can be done using a simple markup language, normally referred to as “wikitext<\/a>.”<\/p>\n

As MediaWiki is based around the editing of pages, the commentary for each act in our system would take the form of a page, and the description for each legal concept would also constitute a page. In Swedish law, acts and ordinances are published in a collection called SFS (Svensk f\u00f6rfattningssamling)<\/a>. Each act or ordinance is given an identifying number: e.g.,\u00a0the public access to information and secrecy act<\/a> is known as “SFS 2009:400”. In our free online system, this would correspond to a commentary page called SFS\/2009:400<\/a>.<\/p>\n

Unlike Wikipedia, we did not want to use MediaWiki as the interface for the reader. The primary reason for this was that we wanted to present the statutory text and the commentary side-by-side. In order to do that, we needed to extract the text that we had edited using MediaWiki, split it up into commentaries for each individual section, and then weave the statutory text and the commentary text together. (Click here to see an example<\/a>.)<\/p>\n

The architecture of lagen.nu is such that no pages are ever created dynamically in response to a user’s request. Instead, everything is pre-rendered in the form of static HTML files on disc. This makes the site responsive even when running on modest hardware and under high loads. A hook was developed so that every time a wiki page in the main namespace was saved, a program to weave together that commentary text with the statutory text was run. The result was stored as a normal HTML file on disc.<\/p>\n

Writing the program to do this weaving was not a trivial task. In particular, translating the minimalist wikitext markup into XHTML fragments proved to be difficult, and not all MediaWiki markup was supported. We also needed to do custom processing of the commentary text. Luckily, a library<\/a> was found that parsed the MediaWiki markup and returned the equivalent XHTML markup. This library was extended in order to identify references to acts, sections, and legal cases present in the system. This enabled the commentary authors, who were not expected to learn advanced hyperlinking syntax, to just write normal legal prose, which was then linked automatically.<\/p>\n

Using this setup, the editing process boiled down to these steps:<\/p>\n