Hook up your AI Provider of choice with contextr and make it your intelligent assistant to analyze text for spam, sentiment, and moderation, delivering precise insights with confidence scores and detailed reasoning.
$check = $contextr->spam() ->text('Buy cheap viagra now!!! Click here: shady.link') ->context(['topic' => 'Health Forum Discussion']) ->withReasoning() ->analyze(); echo $check->spam(); // true echo $check->confidence(); // 0.95 echo $check->reasoning(); // "Contains promotional content and suspicious link"
$check = $contextr->moderation() ->text('These morons don’t even know how to kick a ball properly!') ->context([ 'platform' => 'sports news website', 'topic' => 'Premier League match review' ]) ->withReasoning() ->analyze(); $check->data(); // full result array $check->violates(); // true (boolean) $check->confidence(); // 0.75 (float) $check->violations(); // ['profanity', 'civility'] (array) $check->reasoning(); // "Contains insulting language and lacks respectful tone"
$check = $contextr->sentiment() ->text('This blu ray was great, too bad it did not include Project A.') ->context([ 'product' => 'Jackie Chan Collection Vol 1983', 'category' => 'Blu ray' ]) ->withReasoning() ->analyze(); $check->data(); // full result array $check->sentiment(); // neutral (string) $check->confidence(); // 0.75 (float) $check->reasoning(); // "Expresses enjoyment of the blu ray but also disappointment about the absence of a specific content." (string)
$check = $contextr->ai() ->text('The strategic intricacies of modern football necessitate a comprehensive understanding of player positioning, tactical adaptability, and cohesive team synergy to achieve superior performance outcomes.') ->context([ 'platform' => 'football fan forum', 'topic' => 'Post-match discussion: Manchester United vs. Liverpool', 'user_history' => 'New account, posted 5 similar analyses in 24 hours' ]) ->withReasoning() ->analyze(); $check->data(); // full result array $check->ai(); // true (boolean) $check->confidence(); // 0.92 (float) $check->reasoning(); // "Overly polished language and generic analysis typical of AI-generated text, especially given the user's pattern of similar posts."
Join the contextr waitlist as we work on a simple, scalable solution for spam detection, sentiment analysis, and moderation without having to setup a Grok or OpenAI account.
This service will let you define custom prompt templates, pre-select the best AI provider based on speed and performance, and will give you access to upcoming products - such as WordPress plugins.
Join the waitlist and stay up to date.