utterworks / fast-bert

Super easy library for BERT based NLP models
Apache License 2.0
1.85k stars 341 forks source link

Using additional features in text classification #246

Open ndolev opened 4 years ago

ndolev commented 4 years ago

Hi,

Thanks for a great package. For a multi-label training problem, the input training data should like like this:


id | text | toxic | severe_toxic | obscene | threat | insult | identity_hate
0 | Why the edits made under my username Hardcore Metallica Fan were reverted? | 0 | 0 | 0 | 0 | 0 | 0

I would like to be able to add additional computed features like this:


id | text | f1 | f2 | f3 | toxic | severe_toxic | obscene | threat | insult | identity_hate
0 | Why the edits made under my username Hardcore Metallica Fan were reverted? | 0.37 | 45 | 1.8 | 0 | 0 | 0 | 0 | 0 | 0

How would I do this in fast-bert? 

Cheers,
Noah
NawelAr commented 4 years ago

If you ever get an answer, I would love to hear about it.