Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages