Natural Language Processing

WolframAlpha, ChatGPT, and the Future of AI

WolframAlpha, ChatGPT, and the Future of AI

We all know that ChatGPT has taken the world by storm. True, it is a major advance of Artificial Intelligence in the area of Natural Language Processing. Many may not know that WolframAlpha, launched in 2009, allowed natural language queries. As a long time user of Wolfram Mathematica, I was pleasantly surprised when the product […]

Continue Reading

Definite Clause Grammars in Lisp – Part 4

Written by on June 12, 2022 in LISP, Natural Language Processing, Programming, Prolog with 0 Comments
Definite Clause Grammars in Lisp – Part 4

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 […]

Continue Reading

Sentence Negation

Written by on July 18, 2021 in Natural Language Processing, Programming, Prolog with 0 Comments
Sentence Negation

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 […]

Continue Reading

Identifying Sentence Types Automatically

Written by on July 4, 2021 in Natural Language Processing, Programming, Prolog with 0 Comments
Identifying Sentence Types Automatically

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 […]

Continue Reading

The Structure of WH-Questions

Written by on May 23, 2021 in Natural Language Processing, Programming, Prolog with 0 Comments
The Structure of WH-Questions

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 […]

Continue Reading

Implementing iLexicon using LiteDB

Written by on March 28, 2021 in Natural Language Processing, Programming, Prolog with 0 Comments
Implementing iLexicon using LiteDB

iLexicon is an “intelligent” dictionary that can be used to build Natural Language applications. I have two implementations, one in Lisp and another in Prolog. Both implementations are memory-based, in order to speed up performance. I have written several articles referencing it, for example see this.   LiteDB is a NoSQL database for .NET. I […]

Continue Reading

Template-based Text Generation – Part 2

Written by on October 11, 2020 in LISP, Natural Language Processing, Programming with 0 Comments
Template-based Text Generation – Part 2

In my previous article, I showed how “iLangGen” framework facilitates text generation using templates. I talked about the various “patterns” that can be used in a template. However, in that article, I did not go into the details of the “Embedded Template” pattern. That is the focus of today’s article. Embedded Template This pattern allows […]

Continue Reading

Template-Based Text Generation

Written by on September 28, 2020 in LISP, Natural Language Processing, Programming with 0 Comments
Template-Based Text Generation

I had written earlier about natural language generation using my iLangGen framework. I used a “template” text file which was instantiated dynamically based on predefined “grammars” and external data. The sample application I show-cased demonstrated its utility and versatility. Today I would like to touch upon a few other “pattern” elements that can be embedded in […]

Continue Reading

Mathematica: Using TextCases to Extract Information from Natural Language Text 

Written by on September 13, 2020 in Mathematica, Natural Language Processing, Programming with 0 Comments
Mathematica: Using TextCases to Extract Information from Natural Language Text 

Extracting meaningful information from unstructured, human readable text is a hot topic of research today and has important applications in many domains. I have written a few blogs related to this topic, for example, see this and this. In today’s article, I would like to show how Mathematica can be a great help when working with […]

Continue Reading

Automatically Converting Active Voice to Passive Voice and Vice Versa

Written by on February 16, 2020 in Natural Language Processing, Programming, Prolog with 0 Comments
Automatically Converting Active Voice to Passive Voice and Vice Versa

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 […]

Continue Reading

Top