Creating a tool to format judicial decisions, legal scholarship, and statutes for Wikisource.


Name: Stephen LaPorte
Email: stephen.laporte -at-
Project title: Wikisource Legal Tool

Contact/working info[edit]

Timezone: UTC-7 (Pacific Daylight Time)
Typical working hours: Flexible

Project summary[edit]

WikiSource should be a repository of statutory law, judicial decisions, and legal scholarship. Prof. Timothy K. Armstrong identified Wikisource as solution to the architectural limitations of existing repositories for judicial decisions and legal scholarship.[1] Prof. Armstrong listed three obstacles for Wikisource--legal, content, and cultural issues. The legal and cultural issues can be address through education and outreach. This project addresses the problem of content.

A tool to format judicial decisions and statutes will help users move text that is already electronically available[2] and in the public domain[3] to Wikisource, solving the "chicken-and-egg" problem that Wikisource currently faces. Once Wikisource has a substantial body of legal sources, users will gain value[4] from and improve the coverage of those legal sources.

About me[edit]

I am currently a Juris Doctor candidate studying Intellectual Property Law at the University of California, Hastings College of the Law. In 2008, I received a Bachelor of Arts in English and Latin from the University of Nebraska, Lincoln. I am interested in open access to information, especially the law.

I have written small programs in PHP, used MediaWiki templates regularly in editing, and am familiar with the MediaWiki template system.


The tool should be able to sort through text from standard sources, identify important information, and apply templates and wiki formatting. The tool should be part of a workflow that allows users to efficiently move content on to Wikisource.

Required deliverables[edit]

  • Identify key information, such as the title, citation, and author from text or html
  • Sort the text, e.g. determining if it is a statute or a U.S. Supreme Court concurring opinion.
  • Apply wiki templates and categories based on the above information
  • Turn citations (full and short form) to cases, statutes, and secondary material into wiki links to the corresponding page on Wikisource
  • Format footnotes with <ref> tags
  • Develop workflow for users moving law and legal sources on to Wikisource

If time permits[edit]

  • Turn "Id." citations[5] to links to corresponding page on Wikisource

Project schedule[edit]

  1. Identify electronic sources of judicial decisions and statutes, and determine copyright status
  2. Discuss with mentor and other people the best way to build the tool
  3. Review proof of concept with mentor
  4. Expand/rewrite script for identifying key information
  5. Expand script for applying templates and categories
    1. Automate templates within tool
  6. Write script to identify citations
    1. Write script to identify short-form citations
    2. Improve range of identifiable sources
  7. Develop workflow and integrate this tool

Key dates[edit]

  • May 24: Evaluate proof of concept
  • May 31: Work on function to identify key information
  • June 14: Work on function to identify citations
  • July 16: Submit tool for midterm evaluation
  • July 26: Test across sources
  • August 6: Finish tool, write documentation for workflow


I will communicate frequently with my mentor, and I will contact others (such as research librarians) who are familiar with electronically available legal sources. I have a clear vision of what I want the tool to do, and I want to discuss with a mentor the best technology and approach for doing it.

I see this tool as a first step for a WikiProject:Law on wikisource,[6] so I am interested in building something effective.

Proof of concept[edit]

Proof of concept code is running here, with an explanation here.


  1. Timothy K. Armstrong, Rich Texts: Wikisource as an Open Access Repository for Law and the Humanities (March 15, 2010). U of Cincinnati Public Law Research Paper No. 10-09. Available at SSRN:
  2. For example, see Office of the Law Revision Counsel's Downloadable U.S. Code
  3. See the 17 U.S.C. 105
  4. For example, wiki links in citations allows users to conduct research, and the "what links here" feature allows users to find cases that cite back to a case as authority. If Wikisource had more legal sources, it would be a powerful and free research tool.
  5. An Id. citation refers to the previous full or short form citation
  6. There is not, as of March 2010, a Wikisource WikiProject:Law. There is WikiProject U.S. Supreme Court cases, but it is largely inactive. It is difficult to start a WikiProject:Law where there are not active users, and there are no active users because there is not a lot of content. This is the "chicken-and-the-egg" problem that this tool will help users address.

See also[edit]