Skip to main content

A python package for the Linguistic Inquiry and Word Count (LIWC) dictionary.

Project description

Build Status

LIWC Text Analysis - Python

A python package for the Linguistic Inquiry and Word Count (LIWC) dictionary. This package requires the proprietary LIWC dictionary file (.dic), that can be obtained from


>>> from liwc import Liwc
>>> liwc = Liwc(LIWC_FILEPATH)
>>> # Search a word in the dictionary to find in which LIWC categories it belongs
>>> print('happy'))
['affect', 'posemo']
>>> # Extract raw counts of words in a document that fall into the various LIWC categories
>>> print(liwc.parse('I love ice cream.'.split(' ')))
Counter({'verb': 1, 'present': 1, 'affect': 1, 'posemo': 1, 'bio': 1, 'sexual': 1, 'social': 1})


The project comes with an extensive set of unit tests. The Pytest framework is used for unit testing. To run the tests use:

Project repository


Written by Evan Lalopoulos

Evan Lalopoulos - evanll

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for liwc-text-analysis, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size liwc_text_analysis-1.0.2-py3-none-any.whl (5.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size liwc-text-analysis-1.0.2.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page