Skip to main content
100%

loading in LIWC

✓ Published0🌍 Public
Aandyreagan
Last edited Mar 30, 2015
Created on Mar 30, 2015

The example shows how LIWC (Linguistic Inquiry and Word Count) dictionary words are loaded and assigned sentiment scores, distinguishing positive and negative emotion words from neutral function words. The Python script `speedy.py` reads a tab-separated file, checks each line for category markers like `125`, `126`, `127`, and `1`, and builds a dictionary `LIWC` mapping each word to a tuple of its score and a sequential index. It uses plain file iteration and string operations (`split`, `in`) without external libraries, incrementing a counter `i` for every accepted word.

AI-generated description

Similar vizzes