GraphNormalization icon indicating copy to clipboard operation
GraphNormalization copied to clipboard

SROIE Graph text encoding

Open Sharathmk99 opened this issue 5 years ago • 4 comments

Hi,

I'm trying to understand and run training on SROIE dataset. Based on my understanding currently index based encoding is used based on alphabet string. How can i change to something like work2vec or tfidf?

How can i train on other languages like German?

One more question, We have around 200 labeled invoices, is this data enough for training or is it possible to use transfer learning?

Sharathmk99 avatar Oct 03 '20 21:10 Sharathmk99

Hi, @Sharathmk99 Thanks for following our work.

  1. How can i change to something like work2vec or tfidf? Yes, that's a good idea. please show me your results if you try it.

  2. How can i train on other languages like German? Yes, you can train on any language.

  3. We have around 200 labeled invoices, is this data enough for training or is it possible to use transfer learning? 200 invoices are a bit less,It is recommended to label 500~1000 invoices, there will be good results.

note: We train SROIE as a node classification task, to obtain the final result, you may to do some post-processing like regular expression operations. In the future, we will combine the two tasks of node classification and named entity recognition to extract key information from invoices.

cyh1112 avatar Oct 04 '20 03:10 cyh1112

Hi @cyh1112 ,

Thank you for responding.

  1. Yes i'll try with Glove embedding instead of index based encoding.

  2. To train on other languages i need to pass alphabet correctly right?

  3. Ok i'll try to collect more labeled data.

Regarding entity recognition, do i really need entity recognition model? Currently from node classification i can get label(date, address, etc.) for every node/sentence right?

I got below output for one of the document, Document nodes/sentences/words, ['TAN CHAY YEE', 'SOON HUAT MACHINERY ENTERPRISE', '(JM0352019-K)', 'NO.53 JALAN PUTRA 1,', 'TAMAN SRIPUTRA,', '81200 JOHOR BAHRU', 'JOHOR', 'TEL : 07-5547360 / 016-7993391', 'FAX : 07-5624059', '[email protected]', 'GST ID : 002116837376', 'CASH SALES', 'DOC NO.', ': CS00004040', 'DATE: 11/01/2019', 'CASHIER', ': USER', 'TIME: 09:44:00', 'SALESPERSON :', 'REF.:', 'GOODS SOLD ARE NOT RETURNABLE, THANK YOU.', 'ITEM', 'QTY', 'S/PRICE', 'S/PRICE', 'AMOUNT', 'TAX', '1072', '1', '80.00', '80.00', '80.00', 'REPAIR ENGINE POWER SPRAYER (1UNIT)', 'WORKMANSHIP & SERVICE', '70549', '1', '160.00', '160.00', '160.00', 'GIANT 606 OVERFLOW ASSY', '1071', '1', '17.00', '17.00', '17.00', 'ENGINE OIL', '70791', '1', '10.00', '10.00', '10.00', 'GREASE FOR TOOLS 40ML (AKODA)', '70637', '1', '6.00', '6.00', '6.00', 'EY20 PLUG CHAMPION', '1643', '1', '8.00', '8.00', '8.00', 'STARTER TALI', '70197', '1', '10.00', '10.00', '10.00', 'EY20 STARTER HANDLE', '70561', '2', '18.00', '18.00', '36.00', 'HD40 1L COTIN', 'TOTAL QTY:', '9', '327.00', 'TOTAL SALES :', '327.00', 'DISCOUNT :', '0.00', 'TOTAL :', '0.00', 'ROUNDING :', '0.00', 'TOTAL SALES :', '327.00', 'CASH :', '327.00', 'CHANGE :', '0.00']

Prediction:

[0 1 0 2 2 2 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0]

Do i still need entity recognition model?

Sharathmk99 avatar Oct 04 '20 21:10 Sharathmk99

One more question, Can i use every word as node? Example instead of using 'TAN CHAY YEE' as one node, can i use TAN, CHAY, YEE as three separate nodes? Will this approach drops performance?

Sharathmk99 avatar Oct 04 '20 21:10 Sharathmk99

@cyh1112 please reply once you get some time. Thank you

Sharathmk99 avatar Oct 14 '20 00:10 Sharathmk99