This repository can be used to train NER models.
-
Install Dependencies: Ensure you have all the necessary dependencies installed by running the following command:
pip install -r requirements.txt
-
Prepare Training Data: The training data must be kept in the
data
folder combined into a single file namedtrain.csv
. The CSV file must follow the same structure as this HF dataset. -
Prepare Test Data (Optional): Another CSV file named
test.csv
can be added to thedata
folder for evaluation metrics. Iftest.csv
is not present, the evaluation will be done ontrain.csv
itself. The evaluation results will be populated in thelogs
folder. -
Run Training: Once the data is prepared, run the training script using the following command:
python3 '/trainer/train_bert.py'
Follow these instructions to set up and train your NER model using this repository.