Skip to main content

LIWC Assistant

Project description

liwca

LIWCA is a LIWC assistant. It is not a copy of LIWC (they don't like that), it is just helper functions that I've found useful.

Stuff like:

  • Reading and writing dictionary files (.dic[x])
  • Converting between .dic and .dicx files
  • Converting between dictionary (.dic[x]) and tabular (.[ct]sv) files
  • Fetching public dictionary files from remote repositories
  • Calling liwc-22-cli from Python

Install with pip

pip install liwca

Examples

import liwca

# Download and read a public dictionary
dx = liwca.fetch_dx("sleep")

# Write local dictionary files
liwca.write_dx(dx, "./sleep.dic")
liwca.write_dx(dx, "./sleep.dicx")

# Read local dictionaries
dx = liwca.read_dic("./sleep.dic")
dx = liwca.read_dicx("./sleep.dicx")

dx.to_dicx("./moral-foundations.dicx")

# Load local dictionary
dic = liwca.read_dx("./sleep.dicx")

Project details


Download files

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

Source Distribution

liwca-0.0.1a1.tar.gz (10.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page