ChainLabel
NAME
Acme::Skynet::ChainLabel
DESCRIPTION
Acme::Skynet::ChainLabel attempts to find arguments from a given phrase.
For example, if say "Remind me at 7 to strech", it could correspond to a function call remindMe(7, "stretch"). Given a series of inputs, we try to come up with a graph to handle various inputs.
ChainLabel is a very basic. If you use certain cue words multiple times, it can mess up the labeling. ChainLabel will be used as a preprocessor in the future.
Examples
use Acme::Skynet::ChainLabel;
my $reminders = ChainLabel.new;
$reminders.add("remind me at 7 to strech -> 7, strech");
$reminders.add("at 6 pm remind me to shower -> 6 pm, shower");
$reminders.add("remind me to take out the chicken in 15 minutes -> 15 minutes, take out the chicken");
$reminders.learn();
my @args = $reminders.get("remind me in 10 minutes to e-mail jim"); # (10 minutes, e-mail jim)