Skip to content

dfederschmidt/pyliwc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyliwc

RTD

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

Installation

pipenv install -e git+https://github.com/dfederschmidt/pyliwc#egg=pyliwc

Usage

Initialization

liwc = LIWC("./LIWC2015.dic")

Process Text

liwc = LIWC("./LIWC2015.dic")
liwc_scores = liwc.process_text("My text to be analyzed")

Process Pandas Data Frame

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)

About

LIWC (Linguistic Inquiry and Word Count) in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages