utterworks / fast-bert

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

Updated data.py and data_cls.py to work with xlsx data files #314

Open lingdoc opened 1 year ago

lingdoc commented 1 year ago

This hotfix allows xlsx files as data files for training and evaluation. It simply checks whether xlsx is in the filename and uses the read_excel() import function from the pandas library. It may require openpyxl to be installed via pip or another package manager.

Addresses #311 (possibly others), whereby imports via read_csv() can result in errors due to formatting problems.