Would this dataset work for SER fine-tuning?
I want to fine-tune a Spanish version of LayoutXLM for semantic entity recognition. By the looks of the XFUN.py, this seems to be prepared for Relation Extraction only. Would it work as well for SER? What addaptations would you suggest to use this dataset for SER?
If you mean NER (named entity recognition), then the answer is yes. You just need to make sure to use the appropriate processor (tokenizer).
Hi,
Ok yes I see that in the script (which I copied from Microsoft's unilm repository), they already tokenize the dataset for you.
Regarding the attention_mask and token_type_ids, these are created when batching the examples together. As seen here, the DataCollatorForKeyValueExtraction
class is leveraged for creating batches of examples. This will basically pad the examples to the same length as seen here.
This padding method will create the attention_mask and token_type_ids, as seen here.
So I'd advise you to just copy the data collator and use it for batching the examples together.