File size: 3,100 Bytes
5c79ead
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74ae435
5c79ead
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74ae435
5c79ead
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74ae435
5c79ead
 
 
 
 
 
c8003b0
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
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`](https://huggingface.co/FacebookAI/roberta-base).

English counterpart to
[`katrohrb/de-setting-classifier`](https://huggingface.co/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

```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