Spelling, signals and block columns
Text signals in Portuguese, English, Spanish and Chinese
Intensifiers, hedges, polarity, negation, passive voice, pronouns, all caps, punctuation, emoji, laughter and signs of irony, measured in one row.
· jsonW 1.3.11
The problem
The form of a message says a lot: all caps, three exclamation marks, a "lol", a negation. These counts are usually scattered across different regular expressions in every system.
How jsonW solves it
The jsonw_sinal_texto function matches the language's lexicon (pt, en, es or zh, written by hand) with the feature 9 automaton and counts form without a dictionary. Chinese, which does not separate words with spaces, is matched character by character.
const char *t = "NÃO acredito que você fez isso de novo!!! Foi muito bom kkkk 😂";
int64_t r = jsonw_sinal_texto(t, strlen(t), "lexico-pt.jsw", "exemplo", "t1", saida, sizeof saida, erro, sizeof erro);
{origem: "exemplo", chave: "t1", palavras: 12, frases: 2, palavras_por_frase: 6, palavra_media_letras: 3.83333, complexidade: 0.5, intensificadores: 1, atenuadores: 0, positivas: 1, negativas: 0, carga_emocional: 1, polaridade: 1, absolutas: 0, negacoes: 1, passivas: 0, eu: 0, nos: 0, voce: 1, ele: 0, caixa_alta_pct: 8.33333, palavras_caixa_alta: 1, exclamacoes: 3, interrogacoes: 0, pontuacao_exagerada: 1, reticencias: 0, repeticao_letras: 0, sem_pontuacao_final: 0, emojis: 1, kaomojis: 0, figurinhas: 0, interjeicoes: 0, onomatopeias: 0, disfluencias: 0, risos: 1, ironia_indicios: 0}
Real libjsonw 1.3.11 output with the Portuguese lexicon: 1 negation, 1 "você" (you), 1 intensifier ("muito", very), 3 exclamation marks, 1 emoji and 1 laugh ("kkkk").
Where it is
In the ABI (jsonw_sinal_texto). Without a lexicon, it measures form only. Signs of irony are pattern counts, not a verdict; the decision stays with your model.