0
$\begingroup$

We have a set of PDFs with the different types of documents from the various companies. The goal: to predict which of them contain some important attributes (for example, document number, customer name) and extract them. May be also predict the type of document. Some of them already marked for the training.

How to do that better theoretically? Use transformation PDF to text and then work with it as with text? Or first split page layout to the squares and predict, that it contains key attribute before?

Thank you for any help!

$\endgroup$

1 Answer 1

0
$\begingroup$

For MVP I build the Multi-Class Classification Model based on 3 features: word_before, second_word_before and word_above. For each the document in the training dataset I have already marked by human important attributes. So, just trained that model only on the "important words"

Then take some document for prediction, split it myself to the words, extract these 3 necessary attributes (word_before, second_word_before and word_above) and try to predict one of the 26 different labels (which we have in training). If word is a simple one and belongs none of those labels - the max probability of the predicted label will be small. And if probability is big - we will use that prediction.

Used CatBoost Classifier since you can use categorical features there without transforming it to numbers using One Hot Encode.

MVP results are pretty nice. So, will try to improve results

$\endgroup$

Your Answer

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

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