User:Slaporte/slaw

From Wikisource
Jump to: navigation, search

The Wikisource Legal Tool gathers, wikifies, and sorts the text of a judicial decision. This script does not edit Wikisource--it is a tool to prepare material that can be manually added to Wikisource.

Wikifying and formatting[edit]

What it does[edit]

  • Separates the syllabus, opinion of the court, and any concurrences or dissents
  • Adds templates:
  • Adds data (where available) into the above templates:
    • Court
    • Volume (citation)
    • Reporter (citation)
    • Page (citation)
    • Case name
    • Lower court (not always available)
    • Date decided
    • Date argued (not always available)
    • Docket number (not always available)
  • Wikifies foot notes by creating <ref> tags and ==Notes== section
    • Known issue with * notes that are sometimes at the begining of an opinion. I am not sure how to handle this, since MediaWiki automatically assigns numbers to foot notes
  • Wikifies links to:
    • Full citation to U.S. Reporter
    • Full citation to Federal Reporter

What it does not do (yet)[edit]

  • Identify the author of the opinion of the court, dissents, or concurrences
  • Identify corresponding article on Wikipedia
  • Wikify links to citations to state decisions, statutes, secondary material
  • Wikify short form citations or "Id."

Technical information[edit]

I wrote the Wikisource Legal Tool in PHP. It uses XPath to sift through the DOM tree of an HTML page. It can parse OpenJuris, and I have another version that parses some areas of Cornell's Legal Information Institute. This script is just a proof of concept--I wrote it when I should have been studying tax. If you want to help the project, please contact me.