Bedeutung berechnen

Semantische Annäherungen durch Vektorräume

Christoph Sander & Frederik Elwert

Ringvorlesung Lesen – Schreiben – Zählen – Prompten. Kulturtechniken des (Text-)Wissens von gestern bis heute

Grundlagen I

Bedeutung im und als Sprachgebrauch

dans la langue il n’y a que des differences

de Saussure (1916), S. 166.

Die Bedeutung eines Worts ist sein Gebrauch in der Sprache

Wittgenstein (1953), §43, verkürzt

You shall know a word by the company it keeps!

Firth (1957), S. 11

Mehr bei Lenci und Sahlgren (2023)

Die distributionelle Hypothese I

If A and B have almost identical environments […], we say they are synonyms: oculist and eye-doctor. If A and B have some environments in common and some not (e.g. oculist and lawyer) we say that they have different meanings, the amount of meaning difference corresponding roughly to the amount of difference in their environments.

Harris (1954), S. 157.

Die distributionelle Hypothese II

Harris’ Beispiel, als Tabelle:

Ausdruck Augen untersuchen Termin vereinbaren Vor Gericht vertreten
oculist 1 1 0
eye-doctor 1 1 0
lawyer 0 1 1

Schema nach Harris (1954), S. 157. 1 = typisch, 0 = hier eher untypisch.

Ähnliche Kontextprofile sprechen für Bedeutungsnähe.

Die distributionelle Hypothese III

Matrix aus Giuliano (1965)

Nächstes Wort determiniert Bedeutungsmatrix

Grundlagen II

Semantische Räume

  • Distributionelle Semantik konkret
  • „Semantische Räume“ bieten …
    • intuitiven Zugang (Wortfelder, semantische Nähe)
    • mathematische Umsetzung
  • Grundlagen:
    • Hochdimensionale Vektorräume
    • Embeddings: Information als Vektoren

Vektorräume

Von Mathze, Wikimedia Commons, CC BY-SA 4.0
Von MartinThoma, Wikimedia Commons, CC BY-SA 3.0

Anwendung I

Word2Vec

Mikolov u. a. (2013)

  • Lerne optimale Vektorrepräsentation für jedes Wort (type) aus großen Textsammlungen
  • Ähnliche Bedeutung = Ähnlicher Kontext = Ähnliche Position im Vektorraum
  • Originale Implementierung: 300 Dimensionen, trainiert auf Google News (100 Mrd Wörter)

Eigene Embeddings

Closest semantic neighbors for emoji 🙏 (all words and non-emoji only), Elwert u. a. (2023)

Transformer

Vaswani u. a. (2017)

BERT

Bidirectional Encoder Representations from Transformers (Devlin u. a. 2019)

  • Lerne optimale Vektorrepräsentation für jedes Einzelwort (token) aus großen Textsammlungen
  • Ähnliche Bedeutung = Ähnlicher Kontext = Ähnliche Position im Vektorraum
  • Kann Polysemie berücksichtigen
  • Originale Implementierung: 768 Dimensionen, trainiert auf Books Corpus + English Wikipedia (3,3 Mrd Wörter)

Metaphernanalyse mit BERT

Rodenhausen (2024)

Anwendung II

Konfessionalität in der Frühen Neuzeit

  • Konfessionen (bspw. ‘katholisch’ vs. ‘protestantisch’) sind
    • biographische Zuschreibungen (nach Taufe)
    • Ausdruck bestimmter Intentionen oder Sprechakte (ich glaube X)

… und lassen sich nur aus Texten vorhersagen?

Ein Sprachmodell der Konfession I

Beispiel: Korpus des SCIGMA-Projektes (Theologiehandbücher, 1550-1800)

  • Ist ein (religionsbezogener) Text von einem Katholiken oder Protestanten verfasst worden?
    • aus Sprachwahl (bspw. Latein vs. Volkssprache?)
    • aus Stil (bspw. scholastisches Latein vs. klassizistisches Latein)
    • aus Thema (bspw. über Moraltheologie vs. Kreuzestheologie)
    • aus Position (bspw. Anerkennung des Sakraments der Buße)

Ein Sprachmodell der Konfession II

  • Basis: Häufigkeiten von Wörtern (types, char-ngram3-5)
  • Features: Top-60.000 nach Signifikanz (TF-IDF)
    • Häufig im Dokument & selten im Corpus –> signifikant
  • Training: Logistische Regression sucht eine Formel, um von den Merkmalen die Klasse ‘Katholisch vs. Protestantisch’ vorherzusagen.

Klassifikator, ähnlich bei Peverelli (2025) für lateinische Dramen.

Ein Sprachmodell der Konfession III

Text moyses johannes dubium
A 8 1 5
B 7 1 4
C 0 9 0
  • A und B haben ähnliche sprachliche Profile.
  • A und B sind von Katholiken verfasst, B nicht.
  • Generalisierung

Demonstration

Experiment auf https://www.ruhr-uni-bochum.de/scigma-erc/confess/

confess1 confess2

Ein Sprachmodell der Konfession IV

  • “Echte Vorhersage” unnötig, da Konfession meist bekannt
  • Heuristik und “explainable AI”
    • Graduierbarkeit des kategorischen Merkmals
    • Ausreißer und Stellvertreter
    • Sprachprofile und ihre Bedeutung

Fazit

  • Lesen – Computationale Sprachverarbeitung basiert auf großen Mengen von Beispielen von Sprachgebrauch
  • Zählen – Computer verarbeiten Sprache duch mathematische Operationen
  • Schreiben – Technischer Fokus verschiebt sich vom maschinellen Lesen zum Schreiben (Generative KI)
  • Prompten – Die Interaktion mit der Maschine wird zu Co-Creation, damit aber unberechenbar

Vielen Dank für die Aufmerksamkeit!

Literatur

Devlin, Jacob, Ming-Wei Chang, Kenton Lee, und Kristina Toutanova. 2019. „BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding“. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), herausgegeben von Jill Burstein, Christy Doran, und Thamar Solorio. Association for Computational Linguistics. https://doi.org/10.18653/v1/N19-1423.
Elwert, Frederik, Giulia Evolvi, Anna Neumaier, und Kim de Wildt. 2023. „🙏: Emoji and Religion in the Twitter Discourses on the Notre Dame Cathedral Fire“. Journal of Religion, Media and Digital Culture 11 (2): 198–226. https://doi.org/10.1163/21659214-bja10071.
Firth, John Rupert. 1957. „A Synopsis of Linguistic Theory, 1930–1955“. In Studies in Linguistic Analysis, herausgegeben von John Rupert Firth. Special Volume of the Philological Society. Basil Blackwell. https://www.ling.upenn.edu/courses/ling5900/Firth1957.pdf.
Giuliano, Vincent E. 1965. „The Interpretation of Word Associations“. In Statistical Association Methods for Mechanized Documentation: Symposium Proceedings, Washington 1964, Nr. 269, herausgegeben von Mary Elizabeth Stevens, Vincent E. Giuliano, und Laurence B. Heilprin. National Bureau of Standards Miscellaneous Publication. U.S. Government Printing Office. https://www.govinfo.gov/content/pkg/GOVPUB-C13-14e5c8213b5ad089bb2a05f24cc09e94/pdf/GOVPUB-C13-14e5c8213b5ad089bb2a05f24cc09e94.pdf.
Harris, Zellig S. 1954. „Distributional Structure“. Word-Journal of The International Linguistic Association 10 (2–3): 146–62. https://doi.org/10.1080/00437956.1954.11659520.
Lenci, Alessandro, und Magnus Sahlgren. 2023. „From Usage to Meaning: The Foundations of Distributional Semantics“. In Distributional Semantics, von Magnus Sahlgren und Alessandro Lenci. Studies in Natural Language Processing. Cambridge University Press. https://doi.org/10.1017/9780511783692.002.
Mikolov, Tomas, Kai Chen, Greg Corrado, und Jeffrey Dean. 2013. „Efficient Estimation of Word Representations in Vector Space“. arXiv:1301.3781 [cs], Januar 16. http://arxiv.org/abs/1301.3781.
Peverelli, Andrea. 2025. „Authorial Framework and the Problem of Style through a Computational Analysis of Neo-Latin Drama“. Doctoral thesis 2 (Research NOT UU / Graduation UU), Utrecht University. https://doi.org/https://doi.org/10.33540/2851.
Rodenhausen, Lina. 2024. „‚Mutter, Vater, Kind‘. Ressourcenarme automatische Metaphernverarbeitung für religionswissenschaftliche Fragestellungen“. Konferenzbeitrag presented auf Digital Humanities im deutschsprachigen Raum. DHd 2024, Februar 21. https://doi.org/10.5281/zenodo.10698475.
Saussure, Ferdinand de. 1916. Cours de linguistique générale. Herausgegeben von Charles Bally und Albert Sechehaye. Payot. https://catalogue.bnf.fr/ark:/12148/cb31303351g.
Vaswani, Ashish, Noam Shazeer, Niki Parmar, u. a. 2017. „Attention is All you Need“. Advances in Neural Information Processing Systems 30. https://proceedings.neurips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html.
Wittgenstein, Ludwig. 1953. Philosophical Investigations. Herausgegeben von G. E. M. Anscombe und Rush Rhees. Übersetzt von G. E. M. Anscombe. Basil Blackwell. https://catalogue.bnf.fr/ark:/12148/cb31661300v.