Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for moralizer, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size moralizer-0.1.4-py3-none-any.whl (23.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size moralizer-0.1.4.tar.gz (22.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page