Token classifier that marks animals in Early Modern and 18th–19th-century
Dutch text. It is GysBERT v1
fine-tuned with genannote, without any human-labelled training data: every
training label comes from gpt-6-luna, and the training sentences were chosen
by active learning from a pool of 940k DBNL sentences. It is an experiment in
building a tagger without human labels, not a finished research instrument.
This is the second version. It was trained exactly like gysbert-animals-nov26-v1, but the teacher labelled under revised guidelines (prompt v3). The two models score the same on the dev set (see Evaluation).
B-Animal, I-Animal, O)Animal marks a word or phrase that names an animal:
Not marked:
Spans are the animal noun itself, with a modifier only when it says which animal is meant (woldraghende vee = sheep), not descriptive words or articles (Potwalvis, not grooten Potwalvis).
The full guidelines are in task.json.
gpt-6-luna, zero-shot, reasoning effort medium. Under these
guidelines it scores token F1 0.955 on the dev set below (0.941 under the
previous guidelines).gpt-6-luna yes/no filter
("does this sentence name an animal?"), half random.The animals_ner_dutch dev (248 sentences) and test (250 sentences) sets,
gold-standard annotations. Scores are token-level and positives-only, plus
span-level F1:
| Model | test F1 (P / R) | test span F1 | dev F1 |
|---|---|---|---|
| this model | 0.801 (0.89 / 0.73) | 0.763 | 0.819 |
| gysbert-animals-nov26-v1 (guidelines v2) | 0.789 (0.92 / 0.69) | 0.768 | 0.821 |
gpt-6-luna, zero-shot (the teacher) |
0.961 (0.957 / 0.965) | 0.953 | 0.955 |
Read the test column with care: the v3 guidelines were written from the teacher's mistakes on this test set, which flatters the teacher's test score and possibly this model's. The dev set was not used for that, and on dev the two GysBERT versions are equal within noise.
from transformers import pipeline
tagger = pipeline(
"token-classification",
model="ArjanvD95/gysbert-animals-nov26-v2",
aggregation_strategy="average",
)
tagger("Den Vos ghijngh wt om een proye, en sach van verre den Leeu.")
The pipeline's word field is lowercased (the tokenizer lowercases); use
start and end to cut the original spelling from your text.
With genannote, use word-level alignment and a sliding window for long sentences:
from genannote.tasks import load_task_from_file
from genannote.trainers.hf_encoder import HFEncoderAnnotator
ann = HFEncoderAnnotator.from_pretrained(
"ArjanvD95/gysbert-animals-nov26-v2",
task=load_task_from_file("task.json"),
)
metrics.json has the full dev and test scores.
emanjavacas/GysBERT