Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Document AI. Use functions inside value field

Hi all:

It's possible to use a function to manage the final value?

In this image, I've "FORMA DE PAGO: xxxxxx", but I only want the "xxxxxxxxx" part

SpBit_0-1723189755644.png

Can I use for example a regex function for deleting the "FORMA DE PAGO:" part?

0 7 216
7 REPLIES 7

Hello SpBit,

Welcome to Google Cloud Community!

Unfortunately, we cannot use functions to manage the final value such as the regex function for deleting the “FORMA DE PAGO:” part.

As a recommendation, we have 2 ways on how to remove the “FORMA DE PAGO:” part in the final value. 

  1. Manual edit the value. Delete the “FORMA DE PAGO:” then click confirm. Lastly click Mark as Labeled.

     
    McMaco_2-1723673279873.png

     

  2. Do not include in the bounding box the “FORMA DE PAGO:” then click confirm. Lastly click Mark as Labeled.

    McMaco_3-1723673367298.png

I hope the above information is helpful.

 I've tried this option, but always returns all the text

If I capture all the text, and then delete the "FORMA DE PAGO" part from the value and CONFIRM, it doesn't work. The model always returns the complete value.

Try the second option, train a new model do not include in the bounding box the “FORMA DE PAGO:” then click confirm. Lastly click Mark as Labeled. Let me know if you're still getting the word "FORMA DE PAGO:"

Another problem. The text not always appears in only one line

SpBit_0-1723738683760.png

It's possible tell to the model that the value is in two parts?

 

Aside from using the bounding box in training of our model, we can use "Select Text" to highlight the two parts to train our model.

McMaco_0-1723741354267.png

 

But my text appears in two lines, and between correct data is the "FORMA DE PAGO" fieldname.

With the text option, I can't select in only one pass the two parts of the text.

How do you do it?