chbrown / liwc-python

Linguistic Inquiry and Word Count (LIWC) analyzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moral Foundations LIWC dictionary

robertjoellewis opened this issue · comments

I am trying to use the moral foundations dictionary created for LIWC. I have used it in LIWC 2015 but it doesn't seem to work for me (although I get the other dics to work).

The moral foundations dictionary is available here:
https://www.moralfoundations.org/sites/default/files/files/downloads/moral%20foundations%20dictionary.dic

I attached a screenshot of the error message below, which reads on the last line as: "IndexError: list index out of range"

screen shot 2018-10-03 at 9 59 16 pm

Ooh, very nice bug report! Thanks for the link to the problematic dictionary and the screenshot of the full traceback.

The issue was that the standard LIWC dictionary I've worked with in the past always uses the tab character to separate category name and id, as well as string match and category id(s).

f06e5b5 splits on any/all whitespace instead, so upgrade to 0.4.1 (latest) and you should be good to go!