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, [email protected]
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
- Academical AI Lecture slides – Games
http://www.dcs.st-and.ac.uk/~ipg/AI/Lectures/Games1/index.htm - Games, Diversions and Perl Culture – Best of the Perl Journal (vol. 3)
http://www.oreilly.com/catalog/tpj3/ - String matching: edit distance
http://cs.haifa.ac.il/~shlomo/pm_lectures/edit_distance/slides/index.html - Overview of the different checkers variants
http://ourworld.compuserve.com/homepages/Arthur_H_Olsen/checkers.htm - Analyzing some standard positions in Checkers
http://www.acfcheckers.com/std2.html - Some Game Go Notes
http://www.telgo.com/ - Zillions of chess-based games
http://www.zillions-of-games.com/games/index-chess.html - Zillions of non-chess games
http://www.zillions-of-games.com/games/index-nonchess.html - Computer Games as a Learning Resource
http://www.und.ac.za/und/biology/staff/amory/edmedia98.html - Games::Checkers on CPAN
http://search.cpan.org/dist/Games-Checkers/ - These presentation slides
http://migo.sixbit.org/papers/AI_and_Perl/