capjamesg/pysurprisal

Calculate surprisal for words in text.

29
/ 100
Experimental

This tool helps linguists and cognitive scientists analyze text by quantifying how unexpected each word is within a given passage. You input a piece of text, and it outputs a numerical value for each word, indicating its 'surprisal' or how much new information it conveys. This is designed for researchers studying language comprehension or text complexity.

No commits in the last 6 months. Available on PyPI.

Use this if you need to objectively measure the information content or predictability of individual words in a text for linguistic analysis.

Not ideal if you need a tool for broad sentiment analysis, topic modeling, or general natural language understanding beyond word-level surprisal.

linguistics psycholinguistics cognitive science text analysis information theory
Stale 6m
Maintenance 0 / 25
Adoption 4 / 25
Maturity 25 / 25
Community 0 / 25

How are scores calculated?

Stars

8

Forks

Language

Python

License

MIT

Last pushed

Dec 15, 2023

Commits (30d)

0

Dependencies

1

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/nlp/capjamesg/pysurprisal"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.