Training
Train your entity extraction model using PyTorch.
First, activate the virtual environment as explained here.
Train an Entity Extraction Model
Configure the necessary hyperparameters in the config.json file. The defaults are:
To train the model, run the following script in the train
directory:
The training script is based on the official HuggingFace token classification tutorial.
Train an Entity Similarity Model
Configure the necessary hyperparameters in the sbert_train
function in the sbert_train.py file:
To train the similarity model, run the following script in the train
directory:
The dataset should be formatted as a CSV file with two columns, such as 'title' and 'esco_label', where each row contains a pair of related textual data points to be used during the training process. Make sure there are no missing values in your dataset to ensure successful training of the model. Here's an example of how your CSV file might look:
Senior Conflict Manager
public institution director
etc
etc
More information can be found here.
Last updated