friendly_brief parses brief titles from a CSV file and emits a new CSV file
with some inferences about the brief. A brief title might look like this.

    1.    Amicus Brief, BRIEF OF L. S. LEE, INC. AMICUS CURIAE ON BEHALF OF PETITIONER, December 6, 2000, 2000 U.S. S. Ct. Briefs LEXIS 836 

For such a title, friendly_brief tries to guess the

* Brief number
* Amici curiae
* Posture of the amici

How to use
--------------
Install it from pip. ::

    pip3 install friendly_brief

And run it on a CSV file. The file must contain a column with all of the
brief titles that you care about, and the titles must be in a column called
"brief". The CSV file can have anything else you want in it too. ::

    friendly-brief briefs.csv

It can also receive a CSV file over STDIN. ::

    cat briefs.csv | friendly-brief

The resulting CSV file is written to stdout.

How it works
---------------
Let's discuss how each of the inferences is made.

Brief number
~~~~~~~~~~~~~
We take the first unbroken group of digits as the brief number.
For example, the following brief title starts with a "1", then a "9",
and then a ".".

    19.    Brief, BRIEF AMICUS CURIAE OF SOCIAL SCIENCE AND COMPARATIVE LAW SCHOLARS IN SUPPORT OF NEITHER PARTY, June 1, 2001, 2001 U.S. S. Ct. Briefs LEXIS 718 

We stop upon noticing the non-digit "." and use "19" as the brief number.

Posture
~~~~~~~~~~~~
Posture is guessed based on the presence of certain phrases.
There are five types of posture, and here are their corresponding phrases

Posture 0
    "Neither party"
Posture 1
    "Petitioner", "Appellant", and "Reversal"
Posture 2
    "Respondent", "Appellee", "Affirmance"
Posture 3
    "Plaintiff"
Posture 4
    "Defendant"

The program looks for the presence of all of these phrases.
If the result is unambiguous, the resulting spreadsheet contains
the number corresponding to the posture.

Ambiguity can occur if no posture phrases are present or if
phrases corresponding to different postures are present.
For example, I would consider a brief title containing both
"plaintiff" and "defendant" to be ambiguous. In cases of
ambiguouity, the posture cell is left blank.

Amici
~~~~~~~~~
The messiest part of this whole process is the guessing of the amici.
This process is designed to produce many false positives and, hopefully,
no false negatives. That is, many non-amici will occur in the resulting
spreadsheet, but no amici should be left out.

The brief title is split into pieces at commas and at the word "and".
Consider, for example, the following brief title.

    4.    Amicus Brief, BRIEF OF SOCIAL AND ORGANIZATIONAL PSYCHOLOGISTS AS AMICI CURIAE SUPPORTING RESPONDENTS, August 13, 2012, 2012 U.S. S. Ct. Briefs LEXIS 3223  

It gets split into these pieces:

* 4.    Amicus Brief
* BRIEF OF SOCIAL AND ORGANIZATIONAL PSYCHOLOGISTS AS AMICI CURIAE SUPPORTING RESPONDENTS
* August 13
* 2012
* 2012 U.S. S. Ct. Briefs LEXIS 3223 

Next, the piece is expanded in both directions in case an amicus was
erroneously broken. (That would happen if the name of the amicus
contained a comma or the word "and".) For the above example, the actual
output is as follows, with the core amicus bolded and the expantion
not bolded.

* **4.    Amicus Brief**, BRIEF OF SOCIAL AND 
* \4.    Amicus Brief, **BRIEF OF SOCIAL AND ORGANIZATIONAL PSYCHOLOGISTS AS AMICI CURIAE SUPPORTING RESPONDENTS**, August 13, 2012, 201
* ORTING RESPONDENTS, **August 13**, 2012, 2012 U.S. S. C
* ONDENTS, August 13, **2012**, 2012 U.S. S. Ct. Bri
* S, August 13, 2012, **2012 U.S. S. Ct. Briefs LEXIS 3223**

In the above example, the pieces are expanded by up 20 letters in
each direction. In other cases, the expansion is smaller; here is
how the size of the expansion is chosen.

1. We first check whether the brief title contains both a comma and the word "and".
   In such cases, the expansion is 20 letters in each direction. The reasoning
   for this is that it is likely that an amicus's name contains
   either a comma or the word "and" and that the amicus will thus
   get split erroneously; the large expansion is to avoid breaking
   the amicus's name.
2. If the comma and "and" criterion was not met, we check for
   a phrase like "Inc.". If it contains a phrase like "Inc.",
   the expansion is five letters in each direction. Amici often have
   names like "Cogswell Cogs, Inc.", and the intent of this rule
   is to include the "Inc." in the name of the amicus.
3. If the above two criteria were not met, no expansion is used (zero letters).
