Write tests to measure effectiveness of field detection logic
$30-250 USD
Closed
Posted over 7 years ago
$30-250 USD
Paid on delivery
I have a javascript function that given a PNG of a form will find fields that can be filled out by a user of the form.
I want to measure the false positive and false negative rate for this function.
To do this one can:
1. Collect a corpus of sample PDFs
2. Filter the corpus of sample PDFs to those that have field data defined in them
3. Extract field data from the remaining PDFs
4. Create a PNG of the pages in the remaining PDFs
5. Execute the field detection logic against the PNGs
6. Compare the embedded field data to the detected field data
7. Produce a report of the results
I would do this with two scripts, the first of which would collect of the corpus of PDFs to be used as test vectors.
This script would likely:
1. Search google for "filetype:pdf form" and download the corresponding files.
2. Extract field data. This can be done with [login to view URL]
3. Convert from a PDF to PNGs. This can be done with [login to view URL]
The second script would measure the effectiveness of the of our field detection using the results of the first.
This script would likely:
1. Enumerate through the results of the first script
2. Run the field detection logic against the PNGs from the first script
3. Look at the fields extracted in the first step comparing results from our field detection logic.
4. Produce a markdown table of the results.
The markdown table would look something like this:
| Filename | # Fields | # Fields Detected | False Positive | False Negative | Accuracy |
|---------------|----------|-------------------|----------------|----------------|----------|
| [login to view URL] | 10 | 10 | 0 | 0 | 100% |
| [login to view URL] | 20 | 20 | 0 | 0 | 100% |
Where:
False Positive = The count of fields where we found a field that did not exist
False Negative = The count of fields where the form contained a field we did not find
Accuracy = The % of fields that were expected to be found that were actually found
Both scripts could use [login to view URL] for command line parsing.
I work only with individuals, no agencies please.