Tag: Prolog
There are several programming languages in use today and a simple google search will throw up interesting recommendations of a subset of these languages to learn, usually based on popularity ranking. As is expected, the popularity of a programming language varies over time and hence a language that was in demand a few years ago […]

In a series of articles written earlier, I had shown how it is possible to model Definite Clause Grammars (DCG) in LispWorks Lisp (Enterprise Edition). We use defgrammar in Common Prolog (available as part of KnowledgeWorks package) to define our grammar rules. Here is a toy English grammar represented using defgrammar: This corresponds to the following Prolog […]

A close relative of mine teaches Maths to school students in different Grades. During a casual chat some time ago, he mentioned that he was trying to adopt an automated approach to selecting assignment problems based on each student’s performance so far. Obviously, there are many ways in which this can be done, but he […]

Unification between two symbolic expressions involves finding substitutions for variables (if any) in the expressions such that the expressions match after applying the substitutions. This is a powerful idea and is quite common in logic programming languages such as Prolog. Interestingly, “newLisp” has a buil-in function called “unify” that can be used for unifying two expressions. […]

Sentences in English can be classified into the following common types: – Simple sentence (“I am drinking coffee”) – Compound sentence (“He came home with his school friend and they had an enjoyable evening”) – Complex sentence (“Whenever my dog barks, I give him some biscuit”) – Imperative sentence (“Please keep quiet”) – Interrogative sentence […]

Snake and Ladder is a popular game that originated in India and later spread to other parts of the world. Even now it is a hit among kids in South India, where people use the traditional game board, coins and dice. Last week, I had a chance to play this game with my 5-year-old granddaughter, who […]

The iLexicon system can handle active/passive voice conversion of fairly complex English sentences. I gave examples of the underlying verb conjugation mechanism in this article and this one. Today, I am going to give examples of the conversion of complete sentences. Here is an example of active to passive voice conversion: The above is a snapshot […]

Linda, originally proposed by Nicholas Carriero and David Gelernter, is a model of process communication using a small set of well-defined primitives, operating on a tuple space. Interestingly, Sicstus Prolog comes with a library that implements Linda (both Server and Client). I played with it a little bit and really enjoyed it. In this article, I would […]

In the last article, I showed how to generate verb conjugations in the “iLexicon” system. Today, let us see how this idea can be extended to English “phrasal verbs”. According to Wikipedia: “a phrasal verb is a phrase such as turn down or ran into which combines two or three words from different grammatical categories: […]

In an earlier post, I showed how Prolog can be used to generate poetry, making use of my “iLexicon”. I want to continue the discussion today by giving another example, this time based on the theme of sounds emitted by various animals and birds. As hinted in my previous articles, “iLexicon” stands for “Intelligent Lexicon”. […]
Recent Comments