You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Transformer-based Sequence-labeling Approach to the Slovenian Cross-domain Automatic Term Extraction
1. Description
In this repo, we experiment XLM-RoBERTa on RSDO5 dataset to evaluate the performance of multilingual pretrained language models in the cross-domain sequence-labeling setting of automatic term extraction (ATE) and compare our models' performance towards the benchmarks.
2. Requirements
Please install all the necessary libraries noted in requirements.txt using this command:
pip install -r requirements.txt
3. Data
The experiments were conducted on RSDO5 dataset, which is a collection of 12 documents with altogether about 250,000 words from the Slovenian language. The dataset is available at RSDO5 1.1 and contains the following domains:
RSDO5 dataset
Languages
Slovenian
Domains
Biomechanics, Chemistry, Veterinary, Linguistics
4. Implementation
As the orginal dataset does not follow IOB format, we preprocess the data to sequentially map each token with it regarding label. An example of IOB format is demontrated below.
For ACTER dataset, run the following command to preprocess the data:
where -corpus_path is the path to the directory containing the corpus files, -term_path is the path to the directory containing the term files, -output_csv_path is the path to the output csv file, and -language is the language of the corpus.
For RSDO5 dataset, the dataset is already in conll format. Please use read_conll() function in preprocess.py to get the mapping.
Run the following command to train the model with all the scenarios in RSDSO5 datasets:
run.sh
where run.sh covers the 12 scenarios regarding 12 combination of train-valid-test splits with two domains of training, one domains of validation and one domains of testing.
Feel free to hyper-parameter tune the model. The current settings are:
num_train_epochs=20, # total # of training epochsper_device_train_batch_size=32, # batch size per device during trainingper_device_eval_batch_size=32, # batch size for evaluation learning_rate=2e-5, # learning rateeval_steps=500,
load_best_model_at_end=True, # load the best model at the end of trainingmetric_for_best_model="f1",
greater_is_better=True,