2 ms·
IBM Watson uses Prolog? That is interesting. I have been helping a friend for a year integrate IBM Watson into his product, but I don't know much about how Wats
by mark_l_watson 11y ago
IBM Watson uses Prolog? That is interesting. I have been helping a friend for a year integrate IBM Watson into his product, but I don't know much about how Watson is implemented.
- mindcrime 11y agoIBM Watson uses Prolog? Yep. Watson has been described as "mostly written in Java, with some chunks in C++ and some in Prolog"[1]. The Prolog is apparently mainly used for language parsing[2]. Also the open source UIMA[3] project is heavily used by Watson. UIMA started out as an IBM project called OmniFind (IIRC) and was later donated to the ASF. [1]: http://www.drdobbs.com/jvm/ibms-watson-written-mostly-in-java/229300226 http://www.drdobbs.com/jvm/ibms-watson-written-mostly-in-jav... [2]: http://learning.acm.org/webinar/lally.cfm http://learning.acm.org/webinar/lally.cfm [3]: http://uima.apache.org http://uima.apache.org
- mjn 11y agoSome background on why Prolog for parsing: That was traditionally a popular use of Prolog, because something similar to BNF-style grammar rules can be written almost literally as Prolog clauses, and you get a parser for "free". Very easy to prototype, plus since it's just Prolog clauses that can be used by the rest of the Prolog program and vice versa (not black-box tables generated by YACC), you can muck with edge cases, integrate error reporting, call out to information-extraction heuristics where relevant, etc. The technique is "definite clause grammars" (DCGs), and can either be written directly in normal Prolog, or with some syntactic sugar that most Prolog implementations include. Here's a tutorial: http://www.pathwayslms.com/swipltuts/dcg/ http://www.pathwayslms.com/swipltuts/dcg/ Compared to when DCG parsing was most popular ('70s-'90s), there are now more alternatives for easily working with grammars, though, including non-black-box approaches nicely integrated into languages, like combinator parsers in Haskell and LPeg in Lua. So it's not quite as unique today, though it's still a nice way to prototype parsers.