Background: The Need for Free Legal Commentaries
A legal commentary — also known as a legal treatise — is an unofficial text, intended to complement a particular source of law, often consisting of one or more statutes. A commentary on a statute provides information on how to interpret terms in the statutory text, summarizes examples of the statute’s application, references other relevant parts of the statutory law, and explains the legislative history 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.
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. 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.
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 (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.
The Swedish legal system, like most civil law systems, is based more on statutory law than are most common law systems. Jurists in Sweden therefore spend much time interpreting statutory law. There are several publishers — including Thomson Fakta and Norstedts Juridik — 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 fills four loose-leaf binders and costs 4435 SEK [$611 US].) As such, they are not accessible in any realistic sense to laypeople.
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ättegångsbalken — 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.
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. Such subscriptions are priced far beyond the reach of non-professionals as well.
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. In fact, the basic aspects of any central act can be adequately explained by any law student having the following two qualities:
a) A thorough understanding of the subject (for example, having taken the relevant course and having received a good grade); and
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.
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.
Still, there are a lot of central acts in Swedish law, and of only a few of these do I have 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.
Technology: Collaborative Writing Tools
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, and some being over 100,000 words long and containing over 1000 different sections. However, the decision to use one single commentary text per act was made in order to keep things simple.
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 §”. We adopted a convention of using such a reference as a header preceding the commentary for the referenced section.
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.
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 (such as “The rule of law“). 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.
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.
The decision was made to use MediaWiki, the software behind Wikipedia, 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, small 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.”
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örfattningssamling). Each act or ordinance is given an identifying number: e.g., the public access to information and secrecy act is known as “SFS 2009:400”. In our free online system, this would correspond to a commentary page called SFS/2009:400.
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.)
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.
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 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.
Using this setup, the editing process boiled down to these steps:
- Find the act to be commented on on the main site, and click the “edit commentary” link.
- This leads to a MediaWiki editing page — or, if the user is not logged in, to a login form.
- The user creates or edits the commentary, saving occasionally.
- When saving, the edit can be flagged as a “minor edit”. When this is the case, the weaving process is not run, enabling the user to save work that is still in progress without changing the contents of the main site.
- When the user is satisfied (which does not necessarily mean that he/she is altogether done with writing the commentary, just that it is in such a state that it can be published on the main site), the page is saved and the weaving process is run.
- The user can then check the main site and verify that the statutory text and the commentary text look OK side by side.
Social Aspects: Coordinating the Writing Effort
The plan was to get motivated law students to write the commentary for our free online system. We formed a group of 14 people, consisting mostly of law students, but including some practicing or retired lawyers. They were each given an assignment, normally consisting of a single act, and the instruction to write the best commentary on that act that they could fashion, within a 40 hour period. For some longer acts, this limit was extended to 60 or 80 hours. The authors retained copyright in their work, and were to receive attribution for it, but they agreed to license it under a Creative Commons license (specifically the CC-BY-SA license). They were also given a small monetary compensation for their work. The deadline for completing the writing assignments was set for October 1st.
At the start of summer 2009, we held an initial workshop where the motivation and impetus of the project were explained, and where people were given some hands-on instruction in how to write and edit commentary. For the rest of the summer, project members communicated using an email mailing list, together with occasional get-togethers on Saturdays at the central library in Stockholm.
During this time, the framework for writing, as well as the results, were constantly examined and improved. My roles were those of software developer (fine-tuning the weaving process), editor (suggesting improvements to individual commentaries as they were written), and project manager (gently reminding everyone of the impending October deadline).
It soon became apparent that everyone had his or her own idea of how commentaries should be written. In general, this diversity is a good thing — if everyone tries out their ideas, we can see what works and what doesn’t. However, if everyone is forced to invent their own wheels, progress is slow and resources that could be used for writing are wasted on other things.
Therefore, we wrote a style guide, containing basic guidelines with examples on how to write concisely and simply, how to refer and link to legal concepts and external resources, how to prioritize, whom to write for, and so on. A getting-started guide, and a shorter guide to MediaWiki markup, were also written.
During the writing period we were featured in the daily press, trade magazines and national radio. We were also nominated for a prize awarded by the Centre for Easy-to-Read.
Evaluation: Does It Work?
From July to September 2009, we commented on 17 acts, 1,200 individual sections, and 500 legal concepts, resulting in a total output of over 400 pages of text. A great amount of knowledge was created in an amazingly short time span. The quality assurance, which was done by me, proved to be an interesting challenge, as I’m not (as stated above) an expert on all of the acts for which commentaries were written. However, having taken basic classes on all the areas of law addressed by the commentaries, I was able to recognize most of the content of the commentaries (and to dig deeper if I found statements that seemed at odds with what I had learned). Overall, the quality of the commentaries was surprisingly high.
In conclusion, the commentary project has been a learning experience. Following the intensive activity of the summer and autumn, fewer commentaries have been added to the system. One reason for this might be that we no longer have the funds to pay authors. The monetary compensation was small but not insignificant. However, it seemed that the major incentives for authors were the opportunity to make law more accessible to others, as well as the chance to educate themselves by explaining the law to others. We have now enabled non-registered users to comment on the commentaries, using the Discussion namespace of MediaWiki. This way, we have identified and fixed many omissions and mistakes in the original commentaries.
One thing that seemed to work really well was the procedure of assigning work and following up on it. Writing a commentary on a long statute can be accomplished using free time over the course of a month or two. Setting a deadline, monitoring progress, and providing relevant feedback can serve as incentives for authors, too.
The commentaries produced by our project are written using best-efforts principles. There are no guarantees that the information in the commentaries is complete, updated, or even correct. However, having a principal author for each commentary gives that author an incentive to ensure the information in the commentary is as good as possible. Authors may use, and in fact have used, their commentaries as work samples. Even so, having someone other than the author read the text and provide feedback can improve the quality of a commentary as well.
With the commentary project, I feel we have proved that legal commentaries can be written in a crowdsourced way (even though we used monetary compensation to motivate our authors), and that wiki technology has the required capabilities, and is sufficiently user-friendly, for such an undertaking.
The next step for our commentaries project is to formalize and sustain an assignment and feedback workflow. This will require multiple project managers, and ideally some form of delegation of responsibility for different parts of the law. Further, I am confident that the project can be sustained using a voluntary framework. This remains to be proven, though.
Note: This project was supported by a grant from Internetfonden, for which we are eternally grateful.
Staffan Malmgren — the creator of the Swedish free access to law service lagen.nu — is a project manager at the Swedish Courts administration by day, working on coordinating the publishing of official legal information on the web, using structured and standardized formats (by night, he’s working on his final law school thesis, on the subject of jurisprudential relevance ranking in legal information systems).