AI · zero-dependency · MIT

larzsentiment

Lexicon-based sentiment scoring - no model, no network.

A small positive/negative word lexicon scores text by counting hits, and label() turns that into positive/negative/neutral. similarity() adds bag-of-words overlap between two texts. Zero network, zero deps - not a substitute for a real trained sentiment model, but genuinely useful for quick triage.

larzscript pkg install sentiment
View on GitHub →Learn the stack

What you get

Try it

import "sentiment" as sentiment
print(sentiment.score("this is great and wonderful"))
print(sentiment.label("this is terrible"))
print(sentiment.similarity("the cat sat", "a cat sits"))
Output
2
negative
0.333333

Why it's in the Larz Stack

larzsentiment is a real Larzscript package (larzscript pkg install sentiment) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.