katrohrb's picture
Update README.md
c8003b0 verified
|
Raw History Blame Contribute Delete
3.1 kB
metadata
language: en
license: cc-by-4.0
base_model: FacebookAI/roberta-base
pipeline_tag: text-classification
tags:
  - english
  - literature
  - digital-humanities
  - narratology
widget:
  - text: He walked through the door and shut it behind him.
    example_title: action_space
  - text: From the hilltop she could see the whole valley spread out below.
    example_title: visual_space
  - text: The room felt heavy and oppressive, as if the walls were closing in.
    example_title: perceived_space
  - text: A table stood in the corner, covered with dusty books.
    example_title: descriptive_space
  - text: She wondered whether he would ever write back.
    example_title: no_space

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

Label Description
action_space Space registered through a character's movement and direct physical contact
visual_space Space as perceived by a character from a distance
perceived_space Space as it carries mood and atmosphere
descriptive_space Things and objects in space, without reference to a character
no_space No 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

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:

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