Skip to main content

Linguistic Inquiry Word Count Assistant

Project description

Project Status Tests PyPI Downloads Python Versions License Ruff

LIWCA

LIWCA (Linguistic Inquiry Word Count Assistant) offers helper functions for working with LIWC dictionaries. Useful when you want end-to-end pipelines or notebook workflows that don't require the LIWC-22 app to be open, or when you just need reusable .dic[x] file I/O without writing it from scratch every project.

Features:

  • Reading and writing dictionary files (.dic/.dicx)
  • Merging dictionary files
  • Fetching public LIWC-format dictionaries from remote repositories
  • Pure-Python word counting (no LIWC-22 needed)
  • Calling liwc-22-cli from Python

Installation

pip install --upgrade liwca

Quick Start

import liwca

# Fetch a public dictionary and count words (no LIWC-22 needed)
dx = liwca.fetch_threat()
results = liwca.count(["danger lurks ahead"], dx)

Usage

Fetching dictionaries

import liwca

dx = liwca.fetch_sleep()           # Fetch and load a public dictionary
dx = liwca.fetch_bigtwo()          # Versioned dictionary (version="a" by default)
dx = liwca.read_dx("./my.dicx")    # Read a local dictionary file
liwca.write_dx(dx, "./my.dic")     # Write to a different format

Word counting

Pure-Python word counting using LIWC-style dictionaries (no LIWC-22 needed).

texts = ["I feel happy today", "This is a sad story"]
results = liwca.count(texts, dx)                      # percentages (default)
results = liwca.count(texts, dx, as_percentage=False)  # raw counts

LIWC-22 wrapper (requires LIWC-22)

The LIWC-22 desktop application (or its license server) must be running when you call the CLI. See the LIWC CLI documentation and Python CLI example for more details.

liwca.liwc22("wc", input="data.csv", output="results.csv")

Similar Projects

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.1.0a2.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liwca-0.1.0a2-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file liwca-0.1.0a2.tar.gz.

File metadata

  • Download URL: liwca-0.1.0a2.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for liwca-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 5eb836b03e71bd59ab5c3df30ebaf48718e47fb01b08854b297b1f2d3f45bdd5
MD5 7418678f09b9ce480ad0ff3cfeef74ed
BLAKE2b-256 28c267b2da72b3a6338296e9dfb754c35303b6000792232139a2d500d52d31d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for liwca-0.1.0a2.tar.gz:

Publisher: release.yaml on remrama/liwca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file liwca-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: liwca-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for liwca-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6feaec0973a7594a522391e15bfd1057f9430b08abbb6c62ccbf0ee9ae97fb8
MD5 d27a8872f0a9ce4933b0a9941fd52105
BLAKE2b-256 2059617d098d05176a809d21ca6fcb0a1ae746ab18e3d82439d31b8b9fdb4ad5

See more details on using hashes here.

Provenance

The following attestation bundles were made for liwca-0.1.0a2-py3-none-any.whl:

Publisher: release.yaml on remrama/liwca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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