Downloads · 30 days
11
2% of all-time downloads
altsoph/xlmr-AER
xlmr-AER is a token classification model from altsoph. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
An XLM-Roberta based language model fine-tuned for AER (Actionable Entities Recognition) -- recognition of entities that protagonists could interact with for further plot development.
Downloads · 30 days
11
2% of all-time downloads
All-time downloads
518
Public
Repo size
4.5 GB
Likes
0
Public
Click a slice to open those files.
.bin2.2 GB · 99%
From the Hugging Face model README
An XLM-Roberta based language model fine-tuned for AER (Actionable Entities Recognition) -- recognition of entities that protagonists could interact with for further plot development.
We used 5K+ locations from 1K interactive text fiction games and extracted textual descriptions of locations and lists of actionable entities in them. The resulting BAER dataset is available here. Then we used it to train this model.
The example of usage:
from transformers import AutoModelForTokenClassification, AutoTokenizer, pipeline
MODEL_NAME = "altsoph/xlmr-AER"
text = """This bedroom is extremely spare, with dirty laundry scattered haphazardly all over the floor. Cleaner clothing can be found in the dresser.
A bathroom lies to the south, while a door to the east leads to the living room."""
model = AutoModelForTokenClassification.from_pretrained(MODEL_NAME)
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
pipe = pipeline("token-classification", model=model, tokenizer=tokenizer, aggregation_strategy="simple", ignore_labels=['O','PAD'])
entities = pipe(text)
print(entities)
If you use the model, please cite the following:
@inproceedings{Tikhonov-etal-2022-AER,
title = "Actionable Entities Recognition Benchmark for Interactive Fiction",
author = "Alexey Tikhonov and Ivan P. Yamshchikov",
year = "2022",
}