Prolog
Polynomial is an important topic in High School maths curriculum. There are many online courses that explain the topic in great details with lots of examples and sample exercises. Wouldn’t it be interesting if we can generate polynomials of given degree programmatically? It turns out that this is not such a hard problem after all. […]
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 […]
In an earlier article, I showed how Sicstus Prolog allows us to use Berkeley DB for storage and retrieval of terms using the file system. Interestingly, the latest release of Sicstus Prolog, version 4.7.0, deprecates the Berekely DB library, while recommending an alternative implementation based on Lightning Memory-Mapped Database Manager (LMDB). The library interfaces are […]
In the last article, I talked about determining sentence types automatically. Another interesting task is to generate the “negation” of a given sentence. Example-1: Sentence => “My teacher lives nearby” Negation => “My teacher does not live nearby” Example-2: Sentence => “She did not like that speech” Negation => “She liked that speech” I have […]
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 […]
Visual Prolog has its roots in Turbo Prolog, which was popularized by Borland in the mid 1980s. It is developed and supported by PDC A/S, Denmark. So how is Visual Prolog different from other Prolog implementations out there, for example, SWI-Prolog or Sicstus Prolog? Here are the key differences: 1) It is not an ISO Prolog […]
WH-Questions are questions that begin with the following words: – Who (“Who came here yesterday?”) – What (“What is the goal of this project?”) – When (“When can I visit my parents?”) – Where (“Where did he go?”) – Why (“Why is everyone running away?”) – Which (“Which is the book you recommend?”) – How […]
Recent Comments