codeforamerica / balance

A text message system for checking one's EBT card balance (SNAP benefits and more)
MIT License
47 stars 37 forks source link

Fix "senseless cents" issue in California transcription #268

Open daguar opened 9 years ago

daguar commented 9 years ago

From our transcription QA in #227, we found an issue where the audio transcriber separates the cents amount from the dollars, but our current parsing doesn't capture it correctly.

A few examples of this:

  1. Your food stamp balance is $0 your cash account balance is $0 and 36 cents as a reminder by (saving?) the receipt from your last purchase.
  2. Your food stamp balance is $1 and $.33. Your cash account balance is $0. As a reminder by saving to receive from your last purchase.

(See the QA spreadsheet for more examples)

We should write tests for these observed transcriptions and then modify the existing code to work for them.

The relevant code to be modified: https://github.com/codeforamerica/balance/blob/master/lib/state_handler/ca.rb#L9-L23 The relevant area in tests for new cases: https://github.com/codeforamerica/balance/blob/master/spec/lib/state_handler_spec.rb#L136-L182

@esmithayer — if you'd like to take this on, please assign yourself. Bug me if you would like pair on this.