Čeština
English
  • Vítejte na stránkách NLP Centra!
  • Zapojte se do vývoje softwarových nástrojů!
  • Analýza přirozeného jazyka
  • Vyzkoušejte si korpusy o velikosti knihoven online!
  • Studujte jednu ze specializací!
  • Členové laboratoře

Stylometry

​IV161 NLP in Practice Course, Course Guarantee: Aleš Horák

Prepared by: Honza Rygl, Aleš Horák, Radoslav Sabol

State of the Art

The analysis of author's characteristic writing style and vocabulary has been used to uncover author's traits such as authorship, age, or gender documents by both manual linguistic approaches and automatic algorithmic methods.

The most common approach to stylometry problems is to combine stylistic analysis with machine learning techniques:

  1. specific style markers are extracted,
  2. a classification procedure is applied to extracted markers

References

  1. HUANG, Baixiang; CHEN, Canyu; SHU, Kai. Authorship attribution in the era of llms: Problems, methodologies, and challenges. ACM SIGKDD Explorations Newsletter, 2025, 26.2: 21-43 ​ pdf
  2. Daelemans, W. (2013). Explanation in computational stylometry. In International conference on intelligent text processing and computational linguistics (pp. 451-462). Springer, Berlin, Heidelberg. ​ pdf
  3. Soto, R.A.R., Wegmann, A., and Aggazzotti, C. 2026. STEB: Style Text Embedding Benchmark. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics. ​ link

Practical Session (For working in Google Colab)

The task will proceed using Python notebook run in a web browser in the ​Google Colaboratory environment.

In the case of running the codes in a local environment, the requirements are Python 3 and Jupyter Notebook.

Stylometric Feature Extraction

In this workshop, we will experiment with a feature extraction of style markers.

Access the ​Python notebook in the Google Colab environment. Please make your own copy of the notebook (File->Save a Copy in Drive).

Do not forget to save your work if you want to see your changes later; leaving the browser will throw away all changes!

  1. Follow the instructions present in the notebook
  2. Implement a feature extractor that improves the performance of existing system
  3. Download and submit your assignment.py and upload it to the homework vault (Odevzdavarna).