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/evanll/liwc-text-analysis-python
Author
Written by Evan Lalopoulos evan.lalopoulos.2017@my.bristol.ac.uk
Evan Lalopoulos - evanll
Metadata
Release files for liwc-text-analysis 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| liwc-text-analysis-1.0.2.tar.gz | 3.6 kB | Without provenance | Details for liwc-text-analysis-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liwc_text_analysis-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for liwc_text_analysis-1.0.2-py3-none-any.whl |
Total release size: 9.3 kB
Release files / liwc-text-analysis-1.0.2.tar.gz
| Download URL | liwc-text-analysis-1.0.2.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddd14e4c533d40d6b2dc27c5e68c96a5e96b2d3737fffb81c2490f246e5f27be
|
|
BLAKE2b-256 checksum How to use checksums |
5b8701f4dac9cd4c973505e7a4841b18da976c670204af1b3c36a1fe1620af0b
|
| 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.2-py3-none-any.whl
| Download URL | liwc_text_analysis-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d5d122781fd258a13463c9f135f7b53cc34b06dcf53dbe1e5adb3dd21c810bc
|
|
BLAKE2b-256 checksum How to use checksums |
c03832f5c62dd39f07768587e2bc9a45bda5e767970d4d23dc6e7786b93267cd
|
| 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
|
Security for liwc-text-analysis 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.