https://github.com/dfederschmidt/pyliwc
LIWC (Linguistic Inquiry and Word Count) in Python
https://github.com/dfederschmidt/pyliwc
datamining liwc nlp python3
Last synced: about 1 year ago
JSON representation
LIWC (Linguistic Inquiry and Word Count) in Python
- Host: GitHub
- URL: https://github.com/dfederschmidt/pyliwc
- Owner: dfederschmidt
- License: mit
- Created: 2018-01-29T21:17:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T01:13:29.000Z (over 3 years ago)
- Last Synced: 2025-03-29T18:11:48.374Z (about 1 year ago)
- Topics: datamining, liwc, nlp, python3
- Language: Python
- Homepage:
- Size: 161 KB
- Stars: 10
- Watchers: 0
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pyliwc

Requires a version of the LIWC dictionary in .dic format. Still very much work in process. Results might differ (albeit marginally) from the commercial LIWC software.
For the full documentation [look here](http://pyliwc.readthedocs.io/en/latest/)
## Installation
```
pipenv install -e git+https://github.com/dfederschmidt/pyliwc#egg=pyliwc
```
## Usage
### Initialization
```python
liwc = LIWC("./LIWC2015.dic")
```
### Process Text
```python
liwc = LIWC("./LIWC2015.dic")
liwc_scores = liwc.process_text("My text to be analyzed")
```
### Process Pandas Data Frame
```python
import pandas as pd
liwc = LIWC("./LIWC2015.dic")
df = pd.DataFrame([["all nice people", "mean people"], ["terrible", "awesome"]], columns=list('AB'), index=[12,3])
liwc.process_df(df)
# OR (in case of large series)
liwc.process_df_mp(df)
```