Perl Artificial Intelligence Research

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 –

AI::Prolog – Perl extension for logic programming.

See also Robert Pratte’s article, “Logic Programming with Perl and Prolog” ( for more more examples.

To learn more about Prolog, see Roman Barták’s “Guide to Prolog Programming” at 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

The AI::Categorize Perl Module

The AI::Categorize code can be found at .

Ken Williams, [email protected]

Solving using Perl module

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


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.