Skip to main content

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

Release files for moralizer 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moralizer 0.1.4
File Size Uploaded
moralizer-0.1.4.tar.gz 22.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moralizer 0.1.4
File Interpreter ABI Platform
moralizer-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 45.9 kB

Release files / moralizer-0.1.4.tar.gz

Download URL moralizer-0.1.4.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fb301b55cb892241a9e1c61d4571a28e81da4ab88bc8062d62f7284c053d27da
BLAKE2b-256 checksum
How to use checksums
33dcf64a971fa6f36cd3ea24ac53e75264ce634e2542095de2f014ce36af47b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.4 Darwin/18.6.0

Release files / moralizer-0.1.4-py3-none-any.whl

Download URL moralizer-0.1.4-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d026f571673b160c1db51491ea8f519eebe2ab1451dff1d2839d4f5c02a84b67
BLAKE2b-256 checksum
How to use checksums
57df0317b7f92c41dabacbd639d6802e91c7ea2e0eb1bcc0acfad4168bafd7c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.17 CPython/3.7.4 Darwin/18.6.0

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page