Open oliviaclyde opened 4 years ago
This is what the parser yields:
{ "caseNumber": "191906862", "charges": [ { "statute": "76-5-202", "offenseName": "AGGRAVATED MURDER", "severity": "Offense Date: June 17, 2019" }, { "statute": "76-5-302", "offenseName": "AGGRAVATED KIDNAPPING", "severity": "Offense Date: June 17, 2019" }, { "statute": "76-8-306(1)", "offenseName": "OBSTRUCTING JUSTICE", "severity": "Offense Date: June 17, 2019" }, { "statute": "76-9-704", "offenseName": "ABUSE OR DESECRATION OF A DEAD HUMAN BODY", "severity": "Felony" } ], "accountSummary": [ { "name": "ACCOUNT SUMMARY", "collection": false } ] }
Parser logic is failing due to docket formatting differences. It appears most dockets have indentations with white space inside each charge. Outlier case has a docket with left alignment on the charges section. This difference in alignment throws the parsing off and the "Offense Date" is parsed in the "Severity" section. The flag checking the severity of the charge then fails because the array returns empty of key words.
Reference docket: Axxxx xxxxx6862