Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remrama/liwca
LIWC Assistant
https://github.com/remrama/liwca
Last synced: 17 days ago
JSON representation
LIWC Assistant
- Host: GitHub
- URL: https://github.com/remrama/liwca
- Owner: remrama
- License: mit
- Created: 2024-10-22T14:14:55.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T20:30:02.000Z (3 months ago)
- Last Synced: 2024-12-23T22:29:24.907Z (about 1 month ago)
- Language: Python
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# liwca
LIWCA is a [LIWC](https://liwc.app) 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
```shell
pip install liwca
```## Examples
```python
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")
```