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.scikit(["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.scikit(texts, dx)                      # percentages (default)
results = liwca.scikit(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.0a1.tar.gz (30.5 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.0a1-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: liwca-0.1.0a1.tar.gz
  • Upload date:
  • Size: 30.5 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.0a1.tar.gz
Algorithm Hash digest
SHA256 9ddc67111914a5cd698876cd7bc94cfc25827b7cbcc8e02c2dea65bff8b8c727
MD5 1153988e247e431b3009df700f8459de
BLAKE2b-256 93a6ccdbcd2c04419ad81d1de7d8c810db4236232a0693a39d41e23b59bcfc99

See more details on using hashes here.

Provenance

The following attestation bundles were made for liwca-0.1.0a1.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.0a1-py3-none-any.whl.

File metadata

  • Download URL: liwca-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 23.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.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d80e2f510f4a7f588aa3ac8991b05d30deae4ea3765d52f0168ac909e3f41d2
MD5 4cf0ba9c2475cb628002d743d682012a
BLAKE2b-256 7041b0d38c1cacf31a1e42fe25d23810d55120416f357f907d3fc24af6bd3124

See more details on using hashes here.

Provenance

The following attestation bundles were made for liwca-0.1.0a1-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