/strukt-owl

AI & things

Primary LanguagePHP

Strukt Owl

AI package. Mostly text analysis. More to come...

Usage

Sentiment Analysis: Vader Score

$text = "From Oasis' first ever single to the name of Noel and Liam's long-suffering mother, just how well do YOU know the band? Take MailOnline's ultimate quiz";

probe($text);

Tags: Ranking

// use tags function
tags($text); //get all tags

// get to 10 tags above 0.9 ranking
arr(tags($text))->each(fn($k,$v)=>number($v)->gt(0.9)?$k:null)->filter()->values()->yield()

Summarize

$text = fs()->cat("news.txt");

summary($text);

Highlights

$text = fs()->cat("news.txt");

highlights($text);

Credits