<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-9025880770474050744</id><updated>2008-03-29T08:45:33.888-07:00</updated><title type='text'>Artificial Intelligence Blog</title><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml'/><author><name>Mark Watson,  author and consultant</name></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-5000396939809955155</id><published>2008-03-29T08:07:00.000-07:00</published><updated>2008-03-29T08:45:33.921-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OWL'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='semantic web'/><title type='text'>Protégé OWL Ontology Editor</title><content type='html'>I installed &lt;a href="http://protege.stanford.edu/" target="new"&gt;Protégé&lt;/a&gt; version 4 alpha last night and it has been solid for me so far. It has been over a year since I upgraded my local Protégé installation, and I like these (new ?) features a lot:&lt;ul&gt;&lt;li&gt;Saved XML for OWL ontologies is very readable, with good automatically generated comments and a nice layout&lt;/li&gt;&lt;li&gt;Use of the &lt;a href="http://owlapi.sourceforge.net/" target="new"&gt;Java OWL API&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Both Fact++ (using JNI) and Pellet 1.5 are smoothly integrated&lt;/li&gt;&lt;li&gt;The Owlviz Plug-in seems to display graphs faster&lt;/li&gt;&lt;li&gt;Drag and drop can be used rearrange class hierarchies&lt;/li&gt;&lt;/ul&gt;I have started working again on an old &lt;a href="http://knowledgebooks.com" target="new"&gt;KnowledgeBooks&lt;/a&gt; project: an OWL ontology for news stories and associated "Semantic Scrappers" to populate the ontology from plain texts of news stories. I am still in the experimentation stage for the semantic scrapper: I am trying to decide between pure Ruby code, Java using the available OWL APIs, or a combination of JRuby and the Java OWL APIs. I am currently playing with these three options - for now, I am in no hurry to choose a single option. Using a dynamic language like Ruby has a lot of advantages as far as generating "OWL classes" automatically from an ontology, etc. That said, the Java language has the best semantic web tools and libraries.&lt;br /&gt;&lt;br /&gt;Long term, I would like a semi-automatic tool for populating ontologies via custom scrapper libraries. I say "semi-automatic" because it would be useful to integrate with Protégé for manual editing and browsing, while supporting external applications accessing data read-only (?) via the Java OWL APIs.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2008/03/protg-owl-ontology-editor.html' title='Protégé OWL Ontology Editor'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=5000396939809955155' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/5000396939809955155'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/5000396939809955155'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-8680906328808197016</id><published>2008-02-23T12:35:00.000-08:00</published><updated>2008-02-23T12:48:06.761-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='knowledge representation'/><category scheme='http://www.blogger.com/atom/ns#' term='semantic web'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><title type='text'>Ruby API for accessing Freebase/Metaweb structured data</title><content type='html'>I had a good talk with some of the Metaweb developers last year and started playing with their Python APIs for accessing structured data. I wanted to be able to use this structured data source in a planned Ruby project and was very pleased to see Christopher Eppstein's new project that provides an ActiveRecord style API on top of &lt;a href="http://www.freebase.com" target="new"&gt;Freebase&lt;/a&gt;. Here is the web page for   &lt;a href="http://rubyforge.org/projects/freebaseapi/" target="new"&gt;Christopher's Freebase API project&lt;/a&gt;. Assuming that you do a "gem install freebase", using this API is easy; some examples:&lt;pre&gt;require 'rubygems'&lt;br /&gt;require "freebase"&lt;br /&gt;require 'pp'&lt;br /&gt;&lt;br /&gt;an_asteroid = Freebase::Types::Astronomy::Asteroid.find(:first)&lt;br /&gt;#pp "an_asteroid:", an_asteroid&lt;br /&gt;puts "name of asteroid=#{an_asteroid.name}"&lt;br /&gt;puts "spectral type=#{an_asteroid.spectral_type[0].name}"&lt;br /&gt;&lt;br /&gt;#all_asteroids = Freebase::Types::Astronomy::Asteroid.find(:all)&lt;br /&gt;#pp "all_asteroids:", all_asteroids&lt;br /&gt;&lt;br /&gt;a_company = Freebase::Types::Business::Company.find(:first)&lt;br /&gt;#pp "a_company:", a_company&lt;br /&gt;puts "name=#{a_company.name}"&lt;br /&gt;puts "parent company name=#{a_company.parent_company[0].name}"&lt;/pre&gt;You will want to use this API interactively: use the Freebase web site to find type hierarchies that you are interested in, fetch the first object matching a type hierarchy (e.g., Types -&gt; Astronomy -&gt; Asteroid) and pretty print the fetched object to see what data fields are available.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2008/02/ruby-api-for-accessing-freebasemetaweb.html' title='Ruby API for accessing Freebase/Metaweb structured data'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=8680906328808197016' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/8680906328808197016'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/8680906328808197016'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-5142249402151194044</id><published>2008-02-23T10:49:00.000-08:00</published><updated>2008-02-27T13:47:55.157-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='semantic web'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='NLP'/><title type='text'>My OpenCalais Ruby client library</title><content type='html'>Reuters has a great attitude about openly sharing data and technology. About 8 years ago, I obtained a free license for their 1.2 gigabytes of semantically tagged news corpus text - very useful for automated training of my KBtextmaster system as well as other work.&lt;br /&gt;&lt;br /&gt;Reuters has done it again, releasing free access to &lt;a href="http://opencalais.com/page/gallery" target="new"&gt;OpenCalias semantic text processing web services&lt;/a&gt;. If you sign up for a free access key (good for 20,000 uses a day of their web services), then you can use my Ruby client library:&lt;pre&gt;# Copyright Mark Watson 2008. All rights reserved.&lt;br /&gt;# Can be used under either the Apache 2 or the LGPL licenses.&lt;br /&gt;&lt;br /&gt;require 'simple_http'&lt;br /&gt;&lt;br /&gt;require "rexml/document"&lt;br /&gt;include REXML&lt;br /&gt;&lt;br /&gt;require 'pp'&lt;br /&gt;&lt;br /&gt;MY_KEY = ENV["OPEN_CALAIS_KEY"]&lt;br /&gt;raise(StandardError,"Set Open Calais login key in ENV: 'OPEN_CALAIS_KEY'") if !MY_KEY&lt;br /&gt;&lt;br /&gt;PARAMS = "&amp;paramsXML=" + CGI.escape('&amp;lt;c:params xmlns:c="http://s.opencalais.com/1/pred/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&amp;gt;&amp;lt;c:processingDirectives c:contentType="text/txt" c:outputFormat="xml/rdf"&amp;gt;&amp;lt;/c:processingDirectives&amp;gt;&amp;lt;c:userDirectives c:allowDistribution="true" c:allowSearch="true" c:externalID="17cabs901" c:submitter="ABC"&amp;gt;&amp;lt;/c:userDirectives&amp;gt;&amp;lt;c:externalMetadata&amp;gt;&amp;lt;/c:externalMetadata&amp;gt;&amp;lt;/c:params&amp;gt;')&lt;br /&gt;&lt;br /&gt;class OpenCalaisTaggedText&lt;br /&gt;  def initialize text=""&lt;br /&gt;    data = "licenseID=#{MY_KEY}&amp;content=" + CGI.escape(text)&lt;br /&gt;    http = SimpleHttp.new "http://api.opencalais.com/enlighten/calais.asmx/Enlighten"&lt;br /&gt;    @response = CGI.unescapeHTML(http.post(data+PARAMS))&lt;br /&gt;  end&lt;br /&gt;  def get_tags&lt;br /&gt;    h = {}&lt;br /&gt;    index1 = @response.index('terms of service.--&amp;gt;')&lt;br /&gt;    index1 = @response.index('&amp;lt;!--', index1)&lt;br /&gt;    index2 = @response.index('--&amp;gt;', index1)&lt;br /&gt;    txt = @response[index1+4..index2-1]&lt;br /&gt;    lines = txt.split("\n")&lt;br /&gt;    lines.each {|line|&lt;br /&gt;      index = line.index(":")&lt;br /&gt;      h[line[0...index]] = line[index+1..-1].split(',').collect {|x| x.strip} if index&lt;br /&gt;    }&lt;br /&gt;    h&lt;br /&gt;  end &lt;br /&gt;  def get_semantic_XML&lt;br /&gt;    @response&lt;br /&gt;  end&lt;br /&gt;  def pp_semantic_XML&lt;br /&gt;    Document.new(@response).write($stdout, 0)&lt;br /&gt;  end&lt;br /&gt;end&lt;/pre&gt;Notice that this code expects an environment variable to be set with your OpenCalais access key - you can just hardwire your key in this code if you want. Here is some sample use:&lt;pre&gt;tt = OpenCalaisTaggedText.new("President George Bush and Tony Blair spoke to Congress")&lt;br /&gt;&lt;br /&gt;pp "tags:", tt.get_tags&lt;br /&gt;pp "Semantic XML:", tt.get_semantic_XML&lt;br /&gt;puts "Semantic XML pretty printed:"&lt;br /&gt;tt.pp_semantic_XML&lt;/pre&gt;The tags print as:&lt;pre&gt;"tags:"&lt;br /&gt;{"Organization"=&gt;["Congress"],&lt;br /&gt; "Person"=&gt;["George Bush", "Tony Blair"],&lt;br /&gt; "Relations"=&gt;["PersonPolitical"]}&lt;/pre&gt;OpenCalais looks like a great service. I am planning on using their service for a technology demo, merging in some of my own semantic text processing tools. I might also use their service for training other machine learning based systems. Reuters will also offer a commercial version with guaranteed service, etc.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2008/02/my-opencalais-ruby-client-library.html' title='My OpenCalais Ruby client library'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=5142249402151194044' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/5142249402151194044'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/5142249402151194044'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-4557612593026200498</id><published>2008-02-04T08:55:00.000-08:00</published><updated>2008-02-04T09:12:48.164-08:00</updated><title type='text'>NLTK: The Natural Language Toolkit</title><content type='html'>I have a 22 year history of working with natural language processing, but for the most part this was a low level of effort (perhaps averaging 3 to 5 weeks a year). For learning (and perhaps for some production work if you extract the parts that you need) I can very much recommend &lt;a href="http://nltk.sourceforge.net/index.php/Main_Page" target="new"&gt;NLTK&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;NLTK developers (or aggregators since NLTK is an aggregate of smaller projects, with a lot of new work added) Steven Bird, Ewan Klein, and Edward Loper are writing a &lt;a href="http://nltk.sourceforge.net/index.php/Book" target="new"&gt;complete book on NLP using NLTK&lt;/a&gt; that looks good. I wish that I had a good resource like this 22 years ago!</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2008/02/nltk-natural-language-toolkit.html' title='NLTK: The Natural Language Toolkit'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=4557612593026200498' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/4557612593026200498'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/4557612593026200498'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-9033615281514479700</id><published>2008-01-22T06:56:00.000-08:00</published><updated>2008-01-22T07:05:14.831-08:00</updated><title type='text'>texai.org</title><content type='html'>Stephen Reed is doing some interesting research at &lt;a href="http://www.texai.org/blog/about/texai-project" target="new"&gt;texai.org&lt;/a&gt;. This project is interesting to me because there is a lot of overlap with my own KBSportal.com project (which I am currently re-writing in Ruby and Ruby on Rails: the first two versions were in Common Lisp and Java): RDF, Sesame, knowledge representation, and NLP.&lt;br /&gt;&lt;br /&gt;For me, working on KBSportal.com has been a learning process, and I think that texai also serves that purpose for Stephen.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2008/01/texaiorg.html' title='texai.org'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=9033615281514479700' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/9033615281514479700'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/9033615281514479700'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-7858779138016875524</id><published>2008-01-18T11:29:00.000-08:00</published><updated>2008-01-18T11:41:50.324-08:00</updated><title type='text'>RapidMiner machine learning, data mining, and visualization tool</title><content type='html'>When analyzing data for customers I usually start with a tool like Weka or occasionally write custom analysis code. The GUI tool &lt;a href="http://rapid-i.com/" target="new"&gt;RapidMiner&lt;/a&gt; (used to be called YALE) provides a nice environment for setting up experiments by selecting operations and models to apply to your data sets. RapidMiner uses Weka, libsvm, JAMA, and several graphics visualization libraries. RapidMiner has data loaders for relational databases, spreadsheets, comma delimited files, etc.&lt;br /&gt;&lt;br /&gt;It is well worth watching &lt;a href="http://rapid-i.com/videos/rapidminer_tour_3_4_en.html" target="new"&gt;the demo video&lt;/a&gt; for a quick introduction before working through the tutorial.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2008/01/rapidminer-machine-learning-data-mining.html' title='RapidMiner machine learning, data mining, and visualization tool'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=7858779138016875524' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/7858779138016875524'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/7858779138016875524'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-1391897665873252662</id><published>2007-12-14T06:54:00.000-08:00</published><updated>2007-12-14T07:14:11.096-08:00</updated><title type='text'>Machines Like Us</title><content type='html'>Norm Nason emailed me with a link to his site &lt;a href="http://www.machineslikeus.com/" target="new"&gt;Machines Like Us&lt;/a&gt; that contains an eclectic sampling of philosophy of AI, some interesting interviews (e.g., with my friend and old boss &lt;a href="http://www.machineslikeus.com/cms/mlu-interview-ben-goertzel.html" target="new"&gt;Ben Goertzel&lt;/a&gt;), biographies, etc.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/12/machines-like-us.html' title='Machines Like Us'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=1391897665873252662' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/1391897665873252662'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/1391897665873252662'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-7103235086761422165</id><published>2007-10-02T10:46:00.000-07:00</published><updated>2007-10-10T15:18:08.254-07:00</updated><title type='text'>Using the PowerLoom reasoning system with JRuby</title><content type='html'>I am writing a free web book on AI programming with Ruby (&lt;a href="http://www.markwatson.com/opencontent/ruby_ai/book.html" target="new"&gt;a work in progress&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;I wanted to use the &lt;a href="http://www.isi.edu/isd/LOOM/PowerLoom/" target="new"&gt;PowerLoom&lt;/a&gt; reasoning system for the book chapter on reasoning. I had two choices: using the C++ PowerLoom libraries with Ruby bindings or writing a Java wrapper class and then using JRuby. I decided to use JRuby. After some more work on converting to native Ruby types for query results, the material in this blog will eventually make its way into my Ruby AI book (along with a larger example). Here is a simple PowerLoom source file "test.plm" that I will use (part of an example by Robert M. NacGregor in the PowerLoom distribution):&lt;pre&gt;(defmodule "BUSINESS"&lt;br /&gt;  :documentation "Module for the Business demo example used in the PowerLoom Manual."&lt;br /&gt;  :includes ("PL-USER"))&lt;br /&gt;&lt;br /&gt;(in-module "BUSINESS")&lt;br /&gt;&lt;br /&gt;;; clear any info from previous runs:&lt;br /&gt;(clear-module "BUSINESS")&lt;br /&gt;(reset-features)&lt;br /&gt;&lt;br /&gt;;;; Concepts&lt;br /&gt;&lt;br /&gt;(defconcept company)&lt;br /&gt;(defconcept corporation (?c company))&lt;br /&gt;&lt;br /&gt;;;; Relation&lt;br /&gt;&lt;br /&gt;(defrelation company-name ((?c company) (?name STRING)))&lt;/pre&gt;and here is a JRuby example program that uses the wrapper (seen later):&lt;pre&gt;require "java"&lt;br /&gt;require "powerloom.jar"&lt;br /&gt;require "pl.jar"&lt;br /&gt;require 'pp'&lt;br /&gt;&lt;br /&gt;include_class "PowerLoomWrapper"&lt;br /&gt;&lt;br /&gt;pl = PowerLoomWrapper.new&lt;br /&gt;&lt;br /&gt;pl.load("test.plm")&lt;br /&gt;pl.changeModule("BUSINESS")&lt;br /&gt;pl.assertProposition("(and (company c3) (company-name c3 \"Mom's Grocery\"))")&lt;br /&gt;&lt;br /&gt;answers = pl.doQuery("all ?x (company ?x)")&lt;br /&gt;answers.each {|answer| puts answer}&lt;br /&gt;&lt;br /&gt;answers = pl.doQuery("all (?x ?name) (and (company ?x) (company-name ?x ?name))")&lt;br /&gt;answers.each {|answer| puts answer}&lt;/pre&gt;Assuming that you get the powerloom.jar and stella.jar files from the PowerLoom web site (grab the latest download), this Java wrapper should work for you:&lt;pre&gt;import edu.isi.powerloom.*;&lt;br /&gt;import edu.isi.powerloom.logic.*;&lt;br /&gt;import edu.isi.stella.Cons;&lt;br /&gt;import java.io.File;&lt;br /&gt;&lt;br /&gt;public class PowerLoomWrapper {&lt;br /&gt;&lt;br /&gt;    public PowerLoomWrapper() {&lt;br /&gt;        System.out.print("Initializing...");&lt;br /&gt;        PLI.initialize();&lt;br /&gt;        System.out.println("    done.");&lt;br /&gt;    }&lt;br /&gt;    public int load(String fpath) {&lt;br /&gt;        try {&lt;br /&gt;            PLI.load(fpath, null);&lt;br /&gt;            return 1;&lt;br /&gt;        } catch (Exception ex) {&lt;br /&gt;            System.out.println("Error loading " + fpath + " is: " + ex);&lt;br /&gt;            return 0;&lt;br /&gt;        }   &lt;br /&gt;    }&lt;br /&gt;    public int changeModule(String workingModule) {&lt;br /&gt;        try {&lt;br /&gt;            PLI.sChangeModule(workingModule, null);&lt;br /&gt;            this.workingModule = workingModule;&lt;br /&gt;            return 1;&lt;br /&gt;        } catch (Exception ex) {&lt;br /&gt;            System.out.println("Error changing module " + workingModule + " is: " + ex);&lt;br /&gt;            return 0;&lt;br /&gt;        }   &lt;br /&gt;    }&lt;br /&gt;    public int assertProposition(String proposition) {&lt;br /&gt;        try {&lt;br /&gt;            PLI.sAssertProposition(proposition, workingModule, null);&lt;br /&gt;            return 1;&lt;br /&gt;        } catch (Exception ex) {&lt;br /&gt;            System.out.println("Error asserting proposition '" + proposition + "' is: " + ex);&lt;br /&gt;            return 0;&lt;br /&gt;        }   &lt;br /&gt;    }&lt;br /&gt;    public int createRelation(String relation, int arity) {&lt;br /&gt;        try {&lt;br /&gt;            PLI.sCreateRelation(relation, arity, workingModule, null);&lt;br /&gt;            return 1;&lt;br /&gt;        } catch (Exception ex) {&lt;br /&gt;            System.out.println("Error creating relation '" + relation + "' with arity=" + arity + " is: " + ex);&lt;br /&gt;            return 0;&lt;br /&gt;        }   &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;  // following method donated by Thomas Russ:&lt;br /&gt;  public java.util.ArrayList doQuery(String query) {&lt;br /&gt;    java.util.ArrayList ret = null;&lt;br /&gt;      try {&lt;br /&gt;       PlIterator rawAnswer = PLI.sRetrieve(query, workingModule, null);&lt;br /&gt;       ret = new java.util.ArrayList(rawAnswer.length());&lt;br /&gt;       java.util.Iterator answer =&lt;br /&gt;         new edu.isi.stella.javalib.StellaIterator(rawAnswer);&lt;br /&gt;       while (answer.hasNext()) {&lt;br /&gt;         Object obj = answer.next();&lt;br /&gt;         int nItems = PLI.getColumnCount((edu.isi.stella.Stella_Object)obj);&lt;br /&gt;         java.util.ArrayList r2 = new java.util.ArrayList(nItems);&lt;br /&gt;         for (int i = 0; i &lt; nItems; i++) {&lt;br /&gt;           r2.add(fix(PLI.getNthValue((edu.isi.stella.Stella_Object)obj, i, null, null)));&lt;br /&gt;         }&lt;br /&gt;         ret.add(r2);&lt;br /&gt;       }&lt;br /&gt;      } catch (Exception ex) {&lt;br /&gt;       System.out.println("Error with query '" + query + "': " + ex);&lt;br /&gt;       ret = new java.util.ArrayList(0);&lt;br /&gt;    }&lt;br /&gt;      return ret;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    private String workingModule = "PL-USER";&lt;br /&gt;}&lt;/pre&gt;Here is the Makefile that I use for building a second jar file pl.jar" and running the sample program:&lt;pre&gt;all:&lt;br /&gt; javac -classpath .:powerloom.jar:stella.jar PowerLoomWrapper.java&lt;br /&gt; jar cvf pl.jar PowerLoomWrapper.class PowerLoomWrapper.java&lt;br /&gt; /Users/markw/bin/jruby-1.0/bin/jruby jruby_powerloom.rb&lt;br /&gt;&lt;/pre&gt;</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/10/using-powerloom-reasoning-system-with.html' title='Using the PowerLoom reasoning system with JRuby'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=7103235086761422165' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/7103235086761422165'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/7103235086761422165'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-8158078389872132884</id><published>2007-06-23T07:06:00.000-07:00</published><updated>2007-06-23T08:07:05.738-07:00</updated><title type='text'>Good video: Knowledge Representation and the Semantic Web</title><content type='html'>&lt;a href="http://www.cs.bell-labs.com/cm/cs/who/pfps/" target="new"&gt;Peter Patel-Schneider&lt;/a&gt; gave &lt;a href="http://video.google.com/videoplay?docid=-661464686397234947&amp;q=semantic+web&amp;total=86&amp;start=0&amp;num=10&amp;so=0&amp;type=search&amp;plindex=0" target="new"&gt;this talk at Google January, 2006&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Peter Patel-Schneider has an interesting perspective: while he has been very involved with Semantic Web technologies like OWL and descriptive logic reasoners (author of the Classic system), he also appears to have a reasonable amount of skepticism. His talk is good because he starts off clearly explaining RDF, RDFS, and the improved formalism and expressiveness of OWL. I especially enjoyed his summarization of different types of logic, what their computational limitations and capabilities are.&lt;br /&gt;&lt;br /&gt;I have mixed feeling about trying to implement the Semantic Web using a formal semantically rich language like OWL: I am concerned that encoding information in OWL simply takes too much effort. At the other end of the complexity spectrum, tagging is a very light weight expression of the Semantic Web but tagging is inadequate (but easy enough that many people make the effort).&lt;br /&gt;&lt;br /&gt;I have a &lt;a href="http://www.markwatson.com/km/" target="new"&gt;short list of Semantic Web resources&lt;/a&gt; that I find useful.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/06/good-video-knowledge-representation-and.html' title='Good video: Knowledge Representation and the Semantic Web'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=8158078389872132884' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/8158078389872132884'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/8158078389872132884'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-7124860797693184043</id><published>2007-06-12T17:16:00.000-07:00</published><updated>2007-10-10T13:04:57.417-07:00</updated><title type='text'>N-GRAM analysis using Ruby</title><content type='html'>I dusted off some old code today to look at common word pairs in some customer data. NGRAM analysis finds the most common bi-grams (2 word combinations), tri-grams (3 word combinations), etc. The code is simple, and I share it here in case you ever need to do the same thing:&lt;pre&gt;require 'zip/zipfilesystem'&lt;br /&gt;&lt;br /&gt;def words text&lt;br /&gt;  text.downcase.scan(/[a-z]+/)&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Zip::ZipFile.open('../text.txt.zip') { |zipFile| # training data&lt;br /&gt;  $words = words(zipFile.read('text.txt'))       # is in a ZIP file&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;bi_grams = Hash.new(0)&lt;br /&gt;tri_grams = Hash.new(0)&lt;br /&gt;&lt;br /&gt;num = $words.length - 2&lt;br /&gt;num.times {|i|&lt;br /&gt;  bi = $words[i] + ' ' + $words[i+1]&lt;br /&gt;  tri = bi + ' ' + $words[i+2]&lt;br /&gt;  bi_grams[bi] += 1&lt;br /&gt;  tri_grams[tri] += 1&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;puts "bi-grams:"&lt;br /&gt;bb = bi_grams.sort{|a,b| b[1] &lt;=&gt; a[1]}&lt;br /&gt;(num / 10).times {|i|  puts "#{bb[i][0]} : #{bb[i][1]}"}&lt;br /&gt;puts "tri-grams:"&lt;br /&gt;tt = tri_grams.sort{|a,b| b[1] &lt;=&gt; a[1]}&lt;br /&gt;(num / 10).times {|i|  puts "#{tt[i][0]} : #{tt[i][1]}"}&lt;/pre&gt;Output might look like this:&lt;pre&gt;bi-grams:&lt;br /&gt;in the : 561&lt;br /&gt;in Java : 213&lt;br /&gt;...&lt;br /&gt;tri-grams:&lt;br /&gt;in the code : 119&lt;br /&gt;Java source code : 78&lt;br /&gt;...&lt;/pre&gt;Cool stuff. Ruby is my favorite language for tool building.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/06/n-gram-analysis-using-ruby.html' title='N-GRAM analysis using Ruby'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=7124860797693184043' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/7124860797693184043'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/7124860797693184043'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-4809235784627671149</id><published>2007-06-10T16:03:00.000-07:00</published><updated>2007-06-10T16:08:26.950-07:00</updated><title type='text'>I have a new page on Knowledge Management</title><content type='html'>&lt;a href="http://www.markwatson.com/km/"&gt;I have a new page on Knowledge Management&lt;/a&gt; where I share some philosophy on why I believe that open source plays such an important role in building effective KM systems. I believe that as much as possible it is best to use available open source infrastructure software and use available resources for "value add" user modeling and AI components. I list on the right side of this web page some of the better free resources for doing KM work.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/06/i-have-new-page-on-knowledge-management.html' title='I have a new page on Knowledge Management'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=4809235784627671149' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/4809235784627671149'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/4809235784627671149'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-6903439869366392499</id><published>2007-06-03T09:31:00.000-07:00</published><updated>2007-06-03T09:32:31.820-07:00</updated><title type='text'>The URL for this blog has changed</title><content type='html'>Please use the new URL http://markwatson.com/aiblog/  The old URL will redirect.&lt;br /&gt;&lt;br /&gt;The new RSS feed is:   http://artificial-intelligence-theory.blogspot.com/atom.xml</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/06/url-for-this-blog-has-changed.html' title='The URL for this blog has changed'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=6903439869366392499' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/6903439869366392499'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/6903439869366392499'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-5301226760100993767</id><published>2007-04-30T15:11:00.000-07:00</published><updated>2007-05-02T08:06:29.294-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AI in games'/><title type='text'>My experiences writing AI software for vehicle control in games and virtual reality systems</title><content type='html'>I have in the past offered advice in the comp.ai.games news group re: AI control of vehicles. Here are a few short notes based on some experience that I have had. I have had the good fortune of getting to spend a fair amount of time (both on my own, and while being paid) writing code to control vehicles in games, etc.:&lt;br /&gt;&lt;br /&gt;    * Writing example code for my book AI Agents in Virtual Reality Worlds&lt;br /&gt;    * Working on the Indy 500 car simulation system at SAIC. I actually worked on the motion platform control, network programming, and sound system software. For this project, you always raced against other people, also in simulators.&lt;br /&gt;    * At Angel Studios working on 2 Nintendo games and a PC-based hover craft racing game. &lt;br /&gt;&lt;br /&gt;Anyway, I do have some advice on how to write AI driving opponents:&lt;br /&gt;&lt;br /&gt;The first thing that you want to do is to define data structures for navigational "way points" that AI vehicles follow and simply have the vehicles move between these "way points". If possible, AI controlled vehicles should use the same physics simulation code as the player's vehicle (at least when the AI vehicle is close and in the player's field of view).&lt;br /&gt;&lt;br /&gt;After your AI controlled vehicles can move along using "way points", then, based on the game theme, add logic for detecting the proximity of the player's vehicle (e.g., AI vehicle might swerve into the player's vehicle under specified circumstances), etc. Do not bother with complex behavior if a vehicle is not in the rendered scene for a player.&lt;br /&gt;&lt;br /&gt;It should be fairly easy to get the code running to follow way points, but that is definitely your first step. Combining driving logic control with "lerping" between weigh points will also make the vehicles look a lot more realistic while more or less keeping them where you want them.&lt;br /&gt;&lt;br /&gt;When possible, your movement logic should depend heavily on where the AI vehicle is in the player's field of view. For efficiency, it might be expedient to use simple finite state machines for the control logic. However, I have experimented (again, see my book) with using expert systems, neural networks, and genetic algorithms. For Java programmers, my book "Intelligent Java Applications" contains a (not practical, but fun!) example of using genetic algorithms to train simple control programs in an "asteroids" style arcade game.&lt;br /&gt;&lt;br /&gt;Good luck, and have fun!</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/04/my-experiences-writing-ai-software-for.html' title='My experiences writing AI software for vehicle control in games and virtual reality systems'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=5301226760100993767' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/5301226760100993767'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/5301226760100993767'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-1680712168360455496</id><published>2007-04-17T08:34:00.000-07:00</published><updated>2007-04-17T09:35:08.925-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='semantic web'/><title type='text'>Something like Google page rank for semantic web URIs</title><content type='html'>A key idea of the semantic web is reusing other people's URIs - this reuse forms interconnections between different RDF data stores. The problem, as I see it, is that while URIs are unique, we will end up with a situation where (as an example) there might be thousands of URIs for &lt;span style="font-weight:bold;"&gt;NewsItem&lt;/span&gt;. The &lt;a href="http://swoogle.umbc.edu/"&gt;Swoogle semantic web search engine&lt;/a&gt; is useful for finding already existing URIs - a good first step toward reuse.&lt;br /&gt;&lt;br /&gt;Swoogle &lt;a href="http://swoogle.umbc.edu/2005/modules.php?name=Documents&amp;file=manual&amp;doc=introduction"&gt;will return results&lt;/a&gt; using their type of 'page ranking'.&lt;br /&gt;&lt;br /&gt;So, we need two things to accelerate the adoption and utility of the semantic web: web sites must start to include RDF and this included RDF must reuse common URIs for concepts and instances.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/04/something-like-google-page-rank-for.html' title='Something like Google page rank for semantic web URIs'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=1680712168360455496' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/1680712168360455496'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/1680712168360455496'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-1226670736593685819</id><published>2007-04-09T12:55:00.000-07:00</published><updated>2007-04-09T13:01:35.153-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='knowledge representation'/><title type='text'>Great Overview of Knowledge Representation</title><content type='html'>&lt;a href="http://bc.tech.coop/blog/070409.html" target="new"&gt;Bill Clementson&lt;/a&gt; mentioned Conrad Barski's new open content &lt;a href="http://www.tellstuff.com/" target="new"&gt;article on Knowledge Representation&lt;/a&gt;. Nice! Conrad provides not only a great overview, but just as important, the motivation for treating Knowledge Representation as a science.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/04/great-overview-of-knowledge.html' title='Great Overview of Knowledge Representation'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=1226670736593685819' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/1226670736593685819'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/1226670736593685819'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-2151651511618583699</id><published>2007-04-01T07:32:00.000-07:00</published><updated>2007-04-09T13:06:49.097-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='neural networks'/><category scheme='http://www.blogger.com/atom/ns#' term='knowledge representation'/><title type='text'>Defining AI and Knowledge Engineering</title><content type='html'>Our own intelligence is defined by our abilities to predict and generalize. As Jeff Hawkins points out, we live our lives constantly predicting what will happen to us in the next few seconds. (See &lt;a href="http://numenta.com/"&gt;Numenta.com&lt;/a&gt; - Hawkin's company - for the source code to NTA hierarchical temporal memory system.)&lt;br /&gt;&lt;br /&gt;We also generalize by learning to recognize patterns and ignore noise.&lt;br /&gt;&lt;br /&gt;AI systems need to implement prediction and generalization, and do this in a way that scales so that we can move past small toy problems. Scalability is most important in prediction because of the size of data required to model the environment that an AI will &lt;i&gt;live in&lt;/i&gt; and the real time requirements (prediction does us little good if the calculation takes too long).&lt;br /&gt;&lt;br /&gt;Knowledge Engineering is not AI, it is the engineering discipline for the understanding and re-implementation in software of human level expertise in narrow problem domains.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/04/defining-ai-and-knowledge-engineering.html' title='Defining AI and Knowledge Engineering'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=2151651511618583699' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/2151651511618583699'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/2151651511618583699'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-6851724234417337428</id><published>2007-03-03T11:14:00.000-08:00</published><updated>2007-03-21T07:24:00.440-07:00</updated><title type='text'>Java FastTag part of speech tagger is now released under the LGPL</title><content type='html'>&lt;a href="http://markwatson.com/commercial"&gt;FastTag&lt;/a&gt; is now released under the LGPL. I expect to release version 3 of my KBtextmaster NLP toolkit under the same licensing in the next few weeks. A separate version of FastTag uses the MEDPOST medical term lexicon.&lt;br /&gt;&lt;br /&gt;I also released taggers written in C++, C#, and Ruby using the LGPL.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/03/fasttag-part-of-speech-tagger-is-now.html' title='Java FastTag part of speech tagger is now released under the LGPL'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=6851724234417337428' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/6851724234417337428'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/6851724234417337428'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-1201176199548234797</id><published>2007-02-09T14:59:00.000-08:00</published><updated>2007-02-01T21:57:18.079-08:00</updated><title type='text'>Semantic Web: through the back door with HTML and CSS</title><content type='html'>I have spent a lot of time over the last 10 years working on technology for harvesting semantic information from a variety of existing sources. I was an early enthusiast for Semantic web standards like RDF and later OWL. The problem is that too few web site creators invest the effort to add Semantic Web meta data to their sites.&lt;br /&gt;&lt;br /&gt;I believe that as web site creators start using CSS and drop HTML formatting tags like &amp;lt;font ...&amp;gt;, etc. (HTML should be used for structure, not formatting!), writing software that is able to understand the structure of web pages will get simpler. Furthermore, the use of meaningful &lt;b&gt;id&lt;/b&gt; and &lt;b&gt;class&lt;/b&gt; property values in &amp;lt;div&amp;gt; tags will act as a crude but probably effective source of meta data; for example: a &amp;lt;div&amp;gt; tag with an &lt;b&gt;id&lt;/b&gt; or &lt;b&gt;class&lt;/b&gt; property value that contains the string "menu" is likely to be navigational information and can be ignored or be of value depending on the requirements of your knowledge gathering application.&lt;br /&gt;&lt;br /&gt;Just as extracting semantic information from natural language text is very difficult, analyzing the structure and HTML/CSS markup to augment web data scraping information software is difficult. That said, HTML + CSS is likely to be much simpler to process in software than plain HTML with formatting tags. BTW, I am in the process of converting all of my own sites to using only CSS for formatting - I have been writing HTML with embedded formatting since my first web site in 1993 - time for an update in methodology.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2007/02/semantic-web-through-back-door-with.html' title='Semantic Web: through the back door with HTML and CSS'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=1201176199548234797' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/1201176199548234797'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/1201176199548234797'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-537008316980798900</id><published>2006-10-25T20:08:00.000-07:00</published><updated>2007-03-03T11:24:26.976-08:00</updated><title type='text'>New version of my NLP toolkit</title><content type='html'>I have done a fair amount of work in the last year on my KBtextmaster product (although not in the last 5 months due to a consulting contract). I hope to release version 4 next spring. For previous versions I did my R&amp;D in Common Lisp, then converted to Java (bigger market!). While I may eventually do a Java port, I decided that I would rather stick with Common Lisp and go for maximum features and performance for the next release.&lt;br /&gt;&lt;br /&gt;I did just formed a VAR relationship with Franz to use their Allegro Common Lisp for development and deployment. Allegro has support for compiling to a library that is accessible from Java applications, so that may be be OK for Java customers. The high runtime performance of Allegro is amazing.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2006/10/new-version-of-my-nlp-toolkit.html' title='New version of my NLP toolkit'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=537008316980798900' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/537008316980798900'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/537008316980798900'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-5042897920870839404</id><published>2006-10-04T14:36:00.000-07:00</published><updated>2007-04-09T13:06:05.471-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Scheme'/><category scheme='http://www.blogger.com/atom/ns#' term='Prolog'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Lisp'/><title type='text'>Software environments for working on AI projects</title><content type='html'>In the new global economy of driving production and service costs towards zero, it makes a lot of sense for computer scientists to learn specialized skills to differentiate themselves in the marketplace. Since you are reading this blog I assume that you are interested in learning more about AI so I thought that I would list the AI development environments that I have found to be particularly useful - and a lot of them are free.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Classic AI Languages&lt;/span&gt;&lt;br /&gt;Although not strictly required for work in AI, a few AI oriented languages have proven especially useful in the past: Lisp, Scheme, and Prolog. Scheme is a great language but suffers from an "embarrassment of riches": there are almost too many fine implementations available to choose from. That said, I would recommend the excellent and free &lt;a href="http://www.plt-scheme.org/" target="new"&gt;DrScheme and MzScheme&lt;/a&gt; as a very good place to start because it is supported by a &lt;a href="http://planet.plt-scheme.org/" target="new"&gt;repository of useful libraries&lt;/a&gt; that are very easy to install. If you want to mix logic programming with Scheme then the following book (with examples that work with DrScheme) is recommended: &lt;a href="http://www.amazon.com/gp/search?ie=UTF8&amp;keywords=Reasoned%20Schemer&amp;tag=markwatsonassoci&amp;index=books&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325"&gt;The Reasoned Schemer&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=markwatsonassoci&amp;amp;l=ur2&amp;amp;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;br /&gt;&lt;br /&gt;If you want to use Common Lisp (which is what I use for most of my AI development consulting) there are two commercial products that are very good and have free (non-commercial only!) versions: &lt;a href="http://franz.com" target="new"&gt;Franz Lisp&lt;/a&gt; and &lt;a href="http://lispworks.com" target="new"&gt;LispWorks&lt;/a&gt;. There is no need however to stick just with commercial offerings: &lt;a href="http://www.sbcl.org/" target="new"&gt;SBCL&lt;/a&gt; (MIT license) and &lt;a href="http://clisp.cons.org/" target="new"&gt;CLisp&lt;/a&gt; (GPL license) are two good choices among many.&lt;br /&gt;&lt;br /&gt;If you want to use Prolog, the open source (LGPL) &lt;a href="http://www.swi-prolog.org/" target="new"&gt;SWI-prolog&lt;/a&gt; and the commercial &lt;a href="http://amzi.com" target="new"&gt;Amzi Prolog&lt;/a&gt; are both excellent choices and have lots of third party libraries.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scripting Languages&lt;/span&gt;&lt;br /&gt;I have found two scripting scripting languages to be particularly useful for AI projects: Ruby and Python. Python has more third party libraries and projects for AI but I personally enjoy developing in Ruby.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Pick an environment and stick with it&lt;/span&gt;&lt;br /&gt;Believe it or not, I tend to follow this advice myself: I tend to use one language for a year or so, and then switch (usually because of customer preference or the availability of a great library written in one specific language). It pays to take the time to master one language and environment, then use that environment a lot.&lt;br /&gt;&lt;br /&gt;So my advice is to spend just a few hours each with a few of my suggestions in order to pick one to learn really well. Once you pick a language stick with it until you master it.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2006/10/software-environments-for-working-on-ai.html' title='Software environments for working on AI projects'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=5042897920870839404' title='4 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/5042897920870839404'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/5042897920870839404'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-694460313473253972</id><published>2006-08-24T16:43:00.000-07:00</published><updated>2006-08-24T16:51:58.743-07:00</updated><title type='text'>Using Amazon's cloud service for computationally expensive calculations</title><content type='html'>I did not get too excited about Amazon's S3 online storage web services, but the &lt;a href="http://www.amazon.com/b/ref=sc_fe_l_2/104-9403179-8419167?ie=UTF8&amp;node=201590011&amp;no=3435361&amp;me=A36L942TSJ2AJA" target="new"&gt;Amazon cloud web services&lt;/a&gt; look very compelling: $0.10 per instance-hour consumed (or part of an hour consumed) where an instance is roughly equivalent to 1.7Ghz Xeon CPU, 1.75GB of RAM, 160GB of local disk, and 250Mb/s of network bandwidth.&lt;br /&gt;&lt;br /&gt;I sometimes do large machine learning runs, and the two computers on my local LAN that I usually use (dual CPU Mac tower with 1.5 gigs RAM, Dell dual Pentium with 1 gig of RAM) are fairly fast, but there is often that pesky overnight wait to get a run in.&lt;br /&gt;&lt;br /&gt;I need to spend more time checking out Amazon's &lt;a href="http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=84" target="new"&gt;code samples and documentation&lt;/a&gt;, but the idea of spending perhaps $10 and getting a long running machine learning run done quickly is very compelling.&lt;br /&gt;&lt;br /&gt;PS. I just tried to sign up for the service, but their beta is full :-(&lt;br /&gt;&lt;br /&gt;PSS. I just got an account :-)</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2006/08/using-amazons-cloud-service-for.html' title='Using Amazon&apos;s cloud service for computationally expensive calculations'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=694460313473253972' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/694460313473253972'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/694460313473253972'/><author><name>Mark Watson,  author and consultant</name></author></entry><entry><id>tag:blogger.com,1999:blog-9025880770474050744.post-6787978520182757155</id><published>2006-08-17T16:57:00.000-07:00</published><updated>2007-04-09T13:08:03.186-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reasoning'/><category scheme='http://www.blogger.com/atom/ns#' term='PowerLoom'/><title type='text'>Classic reasoning systems like Loom and PowerLoom vs. more modern systems based on probalistic networks</title><content type='html'>My current project (for a large health care company) involves three AI components (a semantic network, and reasoning system based on PowerLoom, and a module using probalistic networks).&lt;br /&gt;&lt;br /&gt;We are in a hedge our bets mode, basically using three promising approaches - I can not talk too much about the application domain, but it will be useful to see which approaches end up being most useful.&lt;br /&gt;&lt;br /&gt;BTW, I have written about this on my regular web blog, but the release of a new version of &lt;a href="http://www.isi.edu/isd/LOOM/PowerLoom/" target="new"&gt;PowerLoom&lt;/a&gt; under liberal open source licensing (that is, commercial use OK) is a great addition to anyone's 'AI toolkit'.</content><link rel='alternate' type='text/html' href='http://markwatson.com/aiblog/2006/08/classic-reasoning-systems-like-loom-and.html' title='Classic reasoning systems like Loom and PowerLoom vs. more modern systems based on probalistic networks'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9025880770474050744&amp;postID=6787978520182757155' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://artificial-intelligence-theory.blogspot.com/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/6787978520182757155'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9025880770474050744/posts/default/6787978520182757155'/><author><name>Mark Watson,  author and consultant</name></author></entry></feed>