Distill information about amendments to the Oregon Revised Statutes.
Find a file
2025-08-04 22:13:43 -06:00
analyze haskell updates (#12) 2023-07-28 14:17:20 -06:00
fixtures add fixtures and jar file (#11) 2023-07-28 13:51:17 -06:00
.gitignore Initial commit 2016-08-06 23:59:00 -07:00
.travis.yml Travis-CI builds (#7) 2017-10-16 15:12:27 -07:00
LICENSE Initial commit 2016-08-06 23:59:00 -07:00
README.md Update README.md 2025-08-04 22:13:43 -06:00
tika-app-2.8.0.jar add fixtures and jar file (#11) 2023-07-28 13:51:17 -06:00

analyze-oregon-law

A command line app, analyze, which pulls in an Oregon session law in PDF format:

image

and produces this metadata in JSON:

$ analyze 2016orLaw0001.pdf

{
    "summary": "Relating to speed limits on highways that traverse state lines; creating new provisions; amending ORS 811.111; and declaring an emergency.",
    "bill": {
        "billNumber": 4047,
        "billType": "HB"
    }, 
    "effectiveDate": "2016-03-01",
    "year": 2016,
    "affectedSections": {
        "repealed": [],
        "amended": [
            "811.111"
        ]
    }
}

A web app can easily import this and display it:

Screenshot 2023-10-10 at 8 32 32 PM

See Main.hs for the top-level code.

Improving flexibility via this intermediate step

In the past, this kind of coding was in the same project as the rest of the application. E.g., here, it'd be a Ruby rake task because the app is in Rails.

But this new, separate repo decouples the data import process: instead of writing more Ruby code for my Rails app, the JSON data is a go-between format. In this way I can, e.g. use with other languages like Haskell when appropriate.