Perl Artificial Intelligence Research

Posted on Posted in programming, technotes

Here is some information that I’ve gathered a few years back when I was doing some research about perl working with various AI technologies…

There are plenty of CPAN modules dealing with different linguistic problems:

  • Simulating typos
    • Is it possible to simulate typical human typos on QWERTY or other keyboard types?
  • Correcting typos, word distance
    • Given two words, what is their distance? Used in spell checkers.
  • Auto-correcting typos in Perl programs
    • Symbol::Approx::Scalar, Symbol::Approx::Sub
  • Intelligent chat and info bots
    • Chatbot::Eliza module and a lot of others
  • Semantic phrase parsing
    • Lingua::Wordnet module
  • Sonnets generated by Perl
    • Automatic poetry, haiku, Coy module

AI & PERL Forum – http://www.nntp.perl.org/group/perl.ai

AI::Prolog – Perl extension for logic programming.

http://search.cpan.org/~ovid/AI-Prolog-0.734/lib/AI/Prolog.pm

http://search.cpan.org/dist/Language-Prolog-Yaswi/
http://search.cpan.org/dist/AI-Prolog/

See also Robert Pratte’s perl.com article, “Logic Programming with Perl and Prolog” (http://www.perl.com/pub/a/2005/12/15/perl_prolog.html) for more more examples.

To learn more about Prolog, see Roman Barták’s “Guide to Prolog Programming” at http://kti.ms.mff.cuni.cz/~bartak/prolog/index.html. Amongst other things, his course uses the Java applet that AI::Prolog was ported from, so his examples will generally work with this module.

AI::FANN is a Perl wrapper for the Fast Artificial Neural Network (FANN) Library available from http://fann.sourceforge.net:

http://search.cpan.org/~salva/AI-FANN-0.07/lib/AI/FANN.pm

The AI::Categorize Perl Module

http://mathforum.org/~ken/bayes/bayes.html

The AI::Categorize code can be found at http://mathforum.org/~ken/bayes/AI.tar .

Ken Williams, ken@mathforum.org

http://sourceforge.net/projects/ai-categorizer/

Solving using Perl module

use Lingua::EN::MatchNames;
# 85% of certainty
if (name_eq("Leonardo Da Vinci", "Leonard d'Vinchi") >= 85) {
      print "Match\n";
}

References

Leave a Reply

Your email address will not be published. Required fields are marked *