Skip to content

Simple tool to get the Moral Foundations counts of a given text.

License

Notifications You must be signed in to change notification settings

npmontgomery/moralizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moralizer

Simple tool to get the Moral Foundations counts of a given text.

MIT dependencies python

Installation

pip install moralizer

SpaCy requires the following add-on.

python -m spacy download en_core_web_sm

Description

Moralizer returns word counts of a text based on the Moral Foundations Vocabulary 2.0 in a neat and organized JSON object or Python dictionary.

Use

from moralizer import *
  • moralizer
    • read_json(reads in a json file)
    • read_file(input_file)
    • moralize(text, output_format=default is Python dictionary, add ".json" for output in JSON).

Dependencies

Moralizer only uses one outside dependency, the delightfully opinionated spaCy.

Under Construction

  • Tests
  • Documentation

About

Simple tool to get the Moral Foundations counts of a given text.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages