Now builds regex from list of labels, and includes each in the output CSV
Now the regex for extracting labelled data from the description field is built up from a list of labels. Normalised versions of these are then used as column names in the output CSV and populated with the relevant data.
For SC 8 the expected labels are: "Petitioners","Name(s)","Addressees","Occupation","Nature of request","Nature of endorsement","Places mentioned","People mentioned" which give output fields petitioners, names, addressees, occupation, nature_of_request, nature_of_endorsement, places_mentioned, people_mentioned
Future generalisation should make it possible to input desired list of labels and URL parameters to allow more flexible usage.