Christmas present for New York: permalinks to the state laws

(Hanukkah fell during finals this year, so there was no way I could get it done in time.)

Up until now, authors had to resort to tortured instructions when linking to N.Y. laws.  Here’s how the Citizen Media Law Project does it in their excellent document, Forming a Corporation in New York:

. . . You can find the New York statute relating to the organizational meeting at N.Y. Bus. Corp. Law § 404 (link is to entire code, you need to click on the Business Corporation section, then choose Article 4 and locate the specific provision). . . .

Oy. Reminds me of the problems linking to Thomas documents.  The issue here is that the state of New York doesn’t create permalinks to the statutes.  I gave this a lot of thought, and created permalinks that look like this:

Remaining Issues

I wasn’t quite sure exactly what format these should take.  The current scheme balances these competing concerns:

  • People blog and write web pages with many different citation formats:
    • A scheme that follows the Bluebook would start with N.Y. Bus. Corp. Law § 404. I saw this used by law review blog posts and the Citizen Media Law document, above.
    • I found a state source that would write NY Business Corporation Law 404
    • I found one law professor who’d write the equivalent of NY Business Corporation Law Section 404
    • I found another who’d write NY Business Corporation Law sec. 404
  • The URL is an interface between the website and search engines and web services, not just web authors.
  • I’m unsure about how often (1) the consolidated laws are updated and (2) how often the state’s website is updated.  I’ll add a date/revision notation to the permalink in a backwards-compatible way when I nail this down.

So the scheme above is what I settled on.  Why can’t every state be like wonderful, efficient Oregon? We’ve got ORS 163.095, and the Bluebook/ALWD Or. Rev. Stat. § 163.095, and that’s it, really.

EDIT: I’ve discovered the Tanbook.

First internally hyperlinked New York Laws online

I’m completing an internally hyperlinked version of the New York Laws.  I’ve looked hard, but I haven’t found any other sites that link the cross references in the text itself.  (Someone please correct me if I’m wrong.)  Why hasn’t this been done before?  Take a look at Abandoned Property Law § 1222:

The provisions of sections twelve hundred seven, twelve hundred eight, twelve hundred eleven and twelve hundred twelve of article twelve of this chapter shall apply to all escheat proceedings under this article.

Compare with a similar Oregon statute, ORS 98.304:

Unless otherwise provided in ORS 98.302 to 98.436 and 98.992 or by other statute of this state, intangible property is subject to the custody of this state…

The reason for the lack of a hyperlinked version looks obvious: We want to figure out which statute is being referred to.  That’s many times more difficult with text like “twelve hundred twelve of article twelve of this chapter” compared with “ORS 98.302” — especially for a computer program.

Core computer science techniques can solve problems like this

A hyperlinked cross reference

A hyperlinked cross reference

I wrote a divide and conquer / recursive descent parser which interprets a legal citation and translates New York state’s idiomatic language into ordinary numbers.  A factory method controls access to the algorithm; this is one of the great design patterns for writing flexible code.  For example, software that changes its behavior depending on which state’s laws its displaying.

That’s the buzzword-laden summary.  If anybody would like more details, drop me a line.