Linguistic Inquiry Word Count Assistant
Project description
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-clifrom 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eb836b03e71bd59ab5c3df30ebaf48718e47fb01b08854b297b1f2d3f45bdd5
|
|
| MD5 |
7418678f09b9ce480ad0ff3cfeef74ed
|
|
| BLAKE2b-256 |
28c267b2da72b3a6338296e9dfb754c35303b6000792232139a2d500d52d31d6
|
Provenance
The following attestation bundles were made for liwca-0.1.0a2.tar.gz:
Publisher:
release.yaml on remrama/liwca
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liwca-0.1.0a2.tar.gz -
Subject digest:
5eb836b03e71bd59ab5c3df30ebaf48718e47fb01b08854b297b1f2d3f45bdd5 - Sigstore transparency entry: 1281017348
- Sigstore integration time:
-
Permalink:
remrama/liwca@5250f333c9ae5ced867205a19cee5517b68f7bb8 -
Branch / Tag:
refs/tags/v0.1.0.alpha.2 - Owner: https://github.com/remrama
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5250f333c9ae5ced867205a19cee5517b68f7bb8 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6feaec0973a7594a522391e15bfd1057f9430b08abbb6c62ccbf0ee9ae97fb8
|
|
| MD5 |
d27a8872f0a9ce4933b0a9941fd52105
|
|
| BLAKE2b-256 |
2059617d098d05176a809d21ca6fcb0a1ae746ab18e3d82439d31b8b9fdb4ad5
|
Provenance
The following attestation bundles were made for liwca-0.1.0a2-py3-none-any.whl:
Publisher:
release.yaml on remrama/liwca
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liwca-0.1.0a2-py3-none-any.whl -
Subject digest:
f6feaec0973a7594a522391e15bfd1057f9430b08abbb6c62ccbf0ee9ae97fb8 - Sigstore transparency entry: 1281017358
- Sigstore integration time:
-
Permalink:
remrama/liwca@5250f333c9ae5ced867205a19cee5517b68f7bb8 -
Branch / Tag:
refs/tags/v0.1.0.alpha.2 - Owner: https://github.com/remrama
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5250f333c9ae5ced867205a19cee5517b68f7bb8 -
Trigger Event:
push
-
Statement type: