Core#

Input/Output#

Reading, writing, creating, and merging LIWC dictionaries. Each reader and writer commits to one file format and one value-type; the caller picks the function whose name matches the data. Two schemas validate each shape: dx_schema for binary dictionaries and dx_weighted_schema for weighted dictionaries (signed values allowed, e.g. for sentiment lexicons like VADER).

create_dx

Create a binary dictionary DataFrame from a category-to-terms mapping.

read_dic

Read a binary LIWC dictionary from a .dic file.

read_dicx

Read a binary .dicx file.

read_dicx_weighted

Read a weighted .dicx file.

write_dic

Write a binary dictionary to a .dic file.

write_dicx

Write a binary dictionary to a .dicx file.

write_dicx_weighted

Write a weighted dictionary to a .dicx file.

merge_dx

Merge multiple dictionaries into a single dictionary.

drop_category

Remove one or more categories from a dictionary.

dx_schema

A lightweight pandas DataFrame validator.

dx_weighted_schema

A lightweight pandas DataFrame validator.

LIWC-22 CLI#

Python wrapper for the LIWC-22 command-line tool. All seven analysis modes are exposed as methods on Liwc22.

Liwc22

Wrapper around LIWC-22-cli.

Word Counting#

Pure-Python LIWC-style word counting.

count

Count LIWC dictionary categories across documents (pure-Python).

DDR Scoring#

Distributed Dictionary Representation — semantic scoring via word embeddings.

ddr

Score documents against dictionary categories via DDR.

Utility#

Miscellaneous utilities and helpers.

set_log_level

Configure logging output for the liwca package.