Skip to main content

Build Status

LIWC Text Analysis - Python

A python package for the Linguistic Inquiry and Word Count (LIWC) dictionary. This package requires the proprietary LIWC dictionary file (.dic), that can be obtained from LIWC.net.

Usage

>>> from liwc import Liwc
>>> liwc = Liwc(LIWC_FILEPATH)
>>> # Search a word in the dictionary to find in which LIWC categories it belongs
>>> print(liwc.search('happy'))
['affect', 'posemo']
>>> # Extract raw counts of words in a document that fall into the various LIWC categories
>>> print(liwc.parse('I love ice cream.'.split(' ')))
Counter({'verb': 1, 'present': 1, 'affect': 1, 'posemo': 1, 'bio': 1, 'sexual': 1, 'social': 1})

Tests

The project comes with an extensive set of unit tests. The Pytest framework is used for unit testing. To run the tests use:
pytest

Project repository

https://github.com/evanlal/liwc-text-analysis-python

Author

Written by Evan Lalopoulos evan.lalopoulos.2017@my.bristol.ac.uk

Evan Lalopoulos - evanlal

Release files for liwc-text-analysis 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liwc-text-analysis 1.0.1
File Size Uploaded
liwc-text-analysis-1.0.1.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for liwc-text-analysis 1.0.1
File Interpreter ABI Platform
liwc_text_analysis-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / liwc-text-analysis-1.0.1.tar.gz

Download URL liwc-text-analysis-1.0.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4d12b4aed2546e53f584e53ef8f78dd7ea210fda0b1746bcd4c99c1f3ab02035
BLAKE2b-256 checksum
How to use checksums
c1489fee44392ff505abe8a2b2d82eeb762a5f5f04919265e322ef5745381f5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.7

Release files / liwc_text_analysis-1.0.1-py3-none-any.whl

Download URL liwc_text_analysis-1.0.1-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fe589d75c7369d762ebdbe033117f67befc29146ccf0efc8934e28eef31c8af
BLAKE2b-256 checksum
How to use checksums
a5bc3ad4bcd5d0d95f41ba4197026de172535c6b5a8fd1230396ddc3bd7d1326
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.7

Release history Release notifications | RSS feed

1.0.2

2 release files

This release

1.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page