CoolFace
Modelpublic

katrohrb/en-setting-classifier

sourceHugging Facecc-by-4.0updated 7d agoView on Hugging Face
0likes33downloads
Model Card

en-setting-classifier

Sentence-level classifier for the representation of space in English narrative prose. Fine-tuned from `FacebookAI/roberta-base`.

English counterpart to `katrohrb/de-setting-classifier`; both models use the same five categories and the same label encoding.

Categories

LabelDescription
action_spaceSpace registered through a character's movement and direct physical contact
visual_spaceSpace as perceived by a character from a distance
perceived_spaceSpace as it carries mood and atmosphere
descriptive_spaceThings and objects in space, without reference to a character
no_spaceNo spatial reference

Label ids: 0 perceived_space, 1 action_space, 2 visual_space, 3 descriptive_space, 4 no_space (stored in config.json as id2label).

Usage

python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

name = "katrohrb/en-setting-classifier"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForSequenceClassification.from_pretrained(name).eval()

sentence = "He walked through the door and shut it behind him."
with torch.no_grad():
    probs = model(**tok(sentence, return_tensors="pt")).logits.softmax(-1)[0]
print(model.config.id2label[int(probs.argmax())])
# → action_space

Or with a pipeline:

python
from transformers import pipeline

clf = pipeline("text-classification", model="katrohrb/en-setting-classifier")
clf("From the hilltop she could see the whole valley spread out below.")
# → [{'label': 'visual_space', 'score': 0.87}]

Citation

Rohrbacher, K., Nieth, B., Salin, E., Eskofier, B., Mahlberg, M. (2026). How LLMs Build Fictional Worlds: Measuring Setting and Narrative Space in AI-Generated Creative Storytelling. Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing (EMNLP). To appear. Preprint: https://doi.org/10.48550/arXiv.2609.02482