0
$\begingroup$

I was searching for a while around the web and I couldn't find any solution that would give some ideas on how to solve my problem. I have a few hundreds of document with some permission forms filled by authorities. Documents can be OCRed. Forms are not all the same but the same pattern repeats in many documents. From the document, I need to extract specific fields like date, company name, product name, etc.

Besides documents, I have a table with correct values (values that need to be extracted from the text) for each document. Each type of values is in the separate column (date, company name, product name).

I have already searched and found some ideas about named entity recognition, but I think my problem can be solved by a supervised model that predicts what token (or group of tokens) hold a specific value since I have correct values available. I have some ideas already but would like to see some other examples since I am not exactly sure how to label n-grams from text based on data in the table or how to decide how many consecutive n-grams to join together in the final result.

Is there any similar project/paper that would be a help?

$\endgroup$

1 Answer 1

0
$\begingroup$

Your problem really is a named-entity-recognition problem or more generally sequence-labeling problem -- which is as you correctly say a supervised learning problem.

To learn the labeling, you need to preprocess the data, i.e., find the entities in the text and assign the ground truth labels. Typically, the BIO encoding (beginning, inside, outside) is used. Here is an example:

Buy the newest Space     Shuttle T5 from the Space      Y Corporation .
O   O   O      B-Product I       I  O    O   B-Company  I I           .

Once you have the data in such a format, you can use any sequence-labeling approaches (LSTM, LSTM+CRF, BERT+CRF, ...) to fit a model. This repo IMO looks quite good: https://github.com/kamalkraj/BERT-NER

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.