AI-MicroStructure
view release on metacpan or search on metacpan
lib/AI/MicroStructure.pm view on Meta::CPAN
| ( ( Yb . ' . | L
\ bo 8b . . J | <0>_
\ "' . . . . L F <1>_
o._.:. . . \mm,__J/ / <2>_
Y8::'|. / `Y8P J <3>_
`|' J: . . ' . . | F <4>_
| L ' . _: | <5>_
| `: . .:oood8bdb. | 1>_
F `:. "-._ `" F 2>_
/ `::. """' / 3>_
/ `::. "" / 4>_
_.-d( `:::. F 5>_
-888b. `::::. . J 6>_
Y888888b. `::::::::::' 7>_
Y88888888bo. `::::::d 8>_
`"Y8888888888boo.._ `"dd88b. 9>_
"""""""""""""""""""""""""""""""""""""""""""""""
EOT
$usage =~ s/<0>_/\033[0;32mThe word $search\033[255;34m/g;
$usage =~ s/<1>_/\033[0;32mhas $senseNr concept's\033[255;34m/g;
$usage =~ s/<2>_/\033[0;32mwe need to find out the which one\033[255;34m/g;
$usage =~ s/<3>_/\033[0;32mto use for our new,\033[255;34m/g;
$usage =~ s/<4>_/\033[0;32mmicro-structure,\033[255;34m/g;
$usage =~ s/<5>_//g;
my @row = ();
my $ii=0;
foreach my $sensnrx (sort keys %{$data->{"rows"}->{"senses"}})
{
my $row = $data->{"rows"}->{"senses"}->{$sensnrx};
my $txt="";
foreach(@{$row->{"basics"}}[1..2]){
next unless($_);
$txt .= sprintf("\033[0;31m %s\033[255;34m",$_);
}
$txt .= sprintf("",$_);
$usage =~ s/$sensnrx>_/($sensnrx):$txt/g;
if($sensnrx>9){
$usage .= sprintf("\n(%d):%s",$sensnrx,$txt);
}
}
foreach my $ii (0..16){
$usage =~ s/$ii>_//g;
}
return $usage;
}
1;
__END__
#print Dumper $micro;
# ABSTRACT: AI::MicroStructure Creates Concepts for words
=head1 NAME
AI::MicroStructure
=head1 DESCRIPTION
Creates Concepts for words
=head1 SYNOPSIS
~$ micro new world
~$ micro structures
~$ micro any 2
~$ micro drop world
~$ micro
=head1 AUTHOR
Hagen Geissler <santex@cpan.org>
=head1 COPYRIGHT AND LICENCE
Hagen Geissler <santex@cpan.org>
=head1 SUPPORT AND DOCUMENTATION
[sample using concepts](http://active-memory.de:2323/nerd?param=perl#ajax/home)
[PDF info on my works](https://github.com/santex/AI-MicroStructure)
=head1 SEE ALSO
AI-MicroStructure
=cut
__DATA__
( run in 1.193 second using v1.01-cache-2.11-cpan-bbcb1afb8fc )