ragegun

Lexica based text analysis.

As crates.io is a pain in the ass, this module will download the lexica from GitHub at build time.

API

Age (default feature, age)

```rust mod ragegun;

fn main() { let rg = ragegun::RageGun::new("foo");

dbg!(rg.age()); // value like 30.00

} ```

Gender (default feature, gender)

```rust mod ragegun;

fn main() { let rg = ragegun::RageGun::new("foo");

rg.gender() // value like GenderInterpretation::Female

} ```

Distress (default feature, distress)

```rust mod ragegun;

fn main() { let rg = ragegun::RageGun::new("foo");

dbg!(rg.distress()); // value like 1.00

} ```

PERMA (default feature, perma)

```rust mod ragegun;

fn main() { let rg = ragegun::RageGun::new("foo");

dbg!(rg.perma());

// PERMAAnalysis {
//  positive_emotion: Negative,
//  engagement: Negative,
//  relationships: Postive,
//  meaning: Negative,
//  accomplishment: Negative,
// }

} ```

EmoLex (emolexalllanguages, 20MB+)

```rust mod ragegun;

fn main() { let rg = ragegun::RageGun::new("foo");

dbg!(rg.emolex_all_languages());

// EmoLexEmotions {
// anger: Neutral,
// anticipation: Neutral,
// disgust: Neutral,
// fear: Neutral,
// joy: Neutral,
// negative: Neutral,
// positive: Neutral,
// sadness: Neutral,
// surprise: Neutral,
// trust: Neutral,
// }

} ```

EmoLex (emolex_english, ~2MB)

```rust mod ragegun;

fn main() { let rg = ragegun::RageGun::new("foo");

dbg!(rg.emolex_english());

// EmoLexEmotions {
// anger: Neutral,
// anticipation: Neutral,
// disgust: Neutral,
// fear: Neutral,
// joy: Neutral,
// negative: Neutral,
// positive: Neutral,
// sadness: Neutral,
// surprise: Neutral,
// trust: Neutral,
// }

} ```

References

Age & gender prediction

Personal distress prediction

Prospection Lexicon: Temporal Orientation

Dark Triad

Empathic Concern

EmoLex / NRC Word-Emotion Association Lexicon

Affect Intensity / NRC Emotion Intensity Lexicon

NRC Valence, Arousal, Dominance Lexicon

PERMA (Positive Emotions, Engagement, Relationships, Meaning, Accomplishment)

Sources