Views
No views yet
xlm-roberta-base checkpoint.PER (Person), LOC (Location), ORG (Organization), EVT (Event), PRO (Product), FAC (Facility), ANG (Animal), DUC (Document), WRK (Work of Art), CMP (Chemical Compound/Drug), MSR (Measure/Quantity), DTM (Date/Time), MNY (Money), PCT (Percent), LAG (Language), LAW (Law), NOR (Nationality/Religious/Political Group).daviddallakyan2005/armenian-ner) corresponds to training run run_16 from the associated project, selected based on the best F1 score on the pioNER validation set during a hyperparameter search involving 36 variations.xlm-roberta-base (Originating from research associated with Facebook AI Research's fairseq library)pioner-silver for training/validation and pioner-gold for testing, loaded via conll2003 dataset script).transformers, pytorch2e-50.01817ArmTokenizer library for pre-tokenization in the inference process shown in the associated project's scripts (armenian-ner-network), although the transformers pipeline example below uses the built-in xlm-roberta-base tokenizer directly.transformers library pipeline:1from transformers import pipeline, AutoTokenizer, AutoModelForTokenClassification
2
3# Load the tokenizer and model from Hugging Face Hub
4model_name = "daviddallakyan2005/armenian-ner"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForTokenClassification.from_pretrained(model_name)
7
8# Create NER pipeline
9# Use "simple" aggregation for basic entity grouping
10ner_pipeline = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
11
12# Example text
13text = "Գրիգոր Նարեկացին հայ միջնադարյան հոգևորական էր, աստվածաբան և բանաստեղծ։ Նա ծնվել է Նարեկ գյուղում։"
14
15# Get predictions
16entities = ner_pipeline(text)
17print(entities)
18
19# Example Output:
20# [
21# {'entity_group': 'PER', 'score': 0.99..., 'word': 'Գրիգոր Նարեկացին', 'start': 0, 'end': 16},
22# {'entity_group': 'LOC', 'score': 0.98..., 'word': 'Նարեկ', 'start': 87, 'end': 92}
23# ]scripts/03_ner/run_ner_inference_segmented.py in the GitHub repo for an example integrating ArmTokenizer before passing words to the Hugging Face tokenizer)xlm-roberta-base model was fine-tuned on the Armenian pioNER dataset using the transformers Trainer API. The training involved:conll2003 format pioNER data.xlm-roberta-base tokenizer and aligning NER tags to subword tokens (labeling only the first subword of each word).TrainingArguments with varying hyperparameters (learning rate, weight decay, epochs, gradient accumulation).AutoModelForTokenClassification with the correct number of labels and mappings (id2label, label2id) derived from the dataset.DataCollatorForTokenClassification for batching.compute_metrics function using seqeval (precision, recall, F1) for evaluation during training.pioner-silver/dev.conll03).pioner-gold/test.conll03).scripts/03_ner/ner_roberta.py in the GitHub repo for the full training script.)run_16) achieved the best F1 score on the pioNER validation set during the hyperparameter search. Final evaluation metrics on the pioNER gold test set are logged in the training artifacts within the associated GitHub project.1@misc{armenian_ner_network_2025,
2 author = {David Dallakyan},
3 title = {Armenian NER and Network Analysis Project},
4 year = {2025},
5 publisher = {GitHub},
6 journal = {GitHub repository},
7 howpublished = {\url{https://github.com/daviddallakyan2005/armenian-ner-network}}
8}