unitedstates/citation

Refactor how regexes are laid out

Closed this issue · 2 comments

@vzvenyach had some ideas about how to rearrange how regexes are laid out in a particular citation file. So @vzvenyach, if you'd like to propose something, we could make it a candidate for the 1.0 milestone.

Right. Just to keep a record. The goal here is to be more abstract about citations. Each citation generally has:

  1. the corpus (code, slip laws, regulations, opinions, etc.)
  2. a state
  3. a publication date
  4. a major identifier (often a title, a volume, etc.)
  5. a minor identifier (a section)

There are others, of course. But the goal is to start with the building blocks and the variations within the building blocks and compile regular expressions on the fly. This could mean that contexts can be handled more effectively (e.g., the "section 500 of this article" problem)

Just cleaning house -- I'm going to close this, but feel free to re-open it with a specific proposal (like how the US Code regexes might be refactored, for instance).