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.

Source Distribution

moralizer-0.1.4.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

moralizer-0.1.4-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file moralizer-0.1.4.tar.gz.

File metadata

  • Download URL: moralizer-0.1.4.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Darwin/18.6.0

File hashes

Hashes for moralizer-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fb301b55cb892241a9e1c61d4571a28e81da4ab88bc8062d62f7284c053d27da
MD5 08b8cda0008a5a6c676e688722d277cc
BLAKE2b-256 33dcf64a971fa6f36cd3ea24ac53e75264ce634e2542095de2f014ce36af47b4

See more details on using hashes here.

File details

Details for the file moralizer-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: moralizer-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Darwin/18.6.0

File hashes

Hashes for moralizer-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d026f571673b160c1db51491ea8f519eebe2ab1451dff1d2839d4f5c02a84b67
MD5 52943a062a84f2811e2ea62c10654edd
BLAKE2b-256 57df0317b7f92c41dabacbd639d6802e91c7ea2e0eb1bcc0acfad4168bafd7c3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page