Tutorials

Python for Chinese Humanities (1): Basics

  • Python grammar: variables, loops, functions
  • Logic operators: if-else
  • Lists, sets, dictionaries

Required time: 3 hours

Colab link: https://colab.research.google.com/github/mcjkurz/qhchina/blob/main/tutorials/Intro_to_Python_for_Chinese_Humanities_Part_1_Basics.ipynb

Python for Chinese Humanities (2): Working with Texts

  • Reading text files
  • Chinese text segmentation
  • Word frequency and word probability
  • Stopwords removal

Required time: 3 hours

Colab link: https://colab.research.google.com/github/mcjkurz/qhchina/blob/main/tutorials/Intro_to_Python_for_Chinese_Humanities_Part_2_Working_with_Texts.ipynb

Python for Chinese Humanities (3): Collocation Analysis

  • Building co-occurrence matrix
  • Implementing sliding window approach
  • Calculating p-value with Fisher’s exact test
  • Sorting and exporting the results to .xlsx

Required time: 3 hours

Colab link:
https://colab.research.google.com/github/mcjkurz/qhchina/blob/main/tutorials/Intro_to_Python_for_Chinese_Humanities_Part_3_Collocation_Analysis.ipynb