de-setting-classifier

Sentence-level classifier for the representation of space in German narrative prose. Fine-tuned from lkonle/fiction-gbert-large (BERT-large, pre-trained on German fiction).

German counterpart to katrohrb/en-setting-classifier; both models use the same five categories and the same label encoding.

Categories

Label German term Description
action_space Aktionsraum Space registered through a character's movement and direct physical contact
visual_space Anschauungsraum Space as perceived by a character from a distance
perceived_space gestimmter Raum Space as it carries mood and atmosphere
descriptive_space Raumbeschreibung Things and objects in space, without reference to a character
no_space kein Raum 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/de-setting-classifier"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForSequenceClassification.from_pretrained(name).eval()

sentence = "Er trat durch die Tür und schloss sie hinter sich."
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/de-setting-classifier")
clf("Vom Hügel aus konnte sie das ganze Tal unter sich liegen sehen.")
# → [{'label': 'visual_space', 'score': 0.93}]

Citation

Rohrbacher, K. (2025). Opening Worlds: Narrative Beginnings and the Role of Setting. CCLS2025 Conference Preprints, 4(1). https://doi.org/10.26083/tuprints-00030149

Downloads last month
27
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for katrohrb/de-setting-classifier

Finetuned
(1)
this model