Reuse of Grammars Through Inheritance

Written by on September 13, 2017 in LISP, Natural Language Processing, Programming with 0 Comments
Reuse of Grammars Through Inheritance

We are familiar with the advantages of class inheritance in object-oriented languages such as C++, C#, Java, and Python. The ability to reuse functionality via inheritance allows us to express our software design optimally, without having to write redundant code. iLangGen encourages the reuse of grammars by supporting Grammar Inheritance, where a grammar can explicitly […]

Continue Reading

KP Astrology REST API

Written by on August 30, 2017 in Astrology, C++ with 0 Comments
KP Astrology REST API

In today’s post I want to share my experience in implementing a set of REST API calls for Astrology. The series on iLangGen will resume after this. As readers of this column probably know, I am the author of an Astrology software called KPAstro. You can read about it here. First released in the year […]

Continue Reading

Repetition in Grammar Rules

Written by on August 18, 2017 in LISP, Natural Language Processing, Programming with 0 Comments
Repetition in Grammar Rules

Many times, we need to repeatedly generate an element, or in general, have a way to control the number times one or more elements get generated. iLangGen supports all the standard cases: – Zero or once – Zero or more times (unbounded) – Zero or more times (bounded) – One or more times (unbounded) – […]

Continue Reading

Text Generation Using iLangGen Framework

Written by on August 6, 2017 in LISP, Natural Language Processing, Programming with 0 Comments
Text Generation Using iLangGen Framework

The two primary areas in Natural Language processing are Natural Language Understanding and Natural Language Generation. The former is concerned with processing and making sense of natural language text, whereas the latter is concerned with synthesizing text, possibly from some deep representation. Both are fascinating and at the same time, challenging, areas of research. The […]

Continue Reading

CLPython: Python in Common Lisp – Part 2

Written by on July 22, 2017 in LISP, Programming, Python with 0 Comments

We looked at the basic features of CLPython in our last blog. In today’s post let us look at the support for Python classes. PYTEST 130 > (defun pyclass ()   (run  “class Employee:    def __init__(self, name, dept):      self.name = name      self.dept = dept    def dump(self):      print ‘Name […]

Continue Reading

CLPython – Python in Common Lisp

Written by on July 7, 2017 in LISP, Python with 0 Comments

My work in the area of NLP requires me to work with several frameworks across multiple languages such as Java, Python and Lisp. Sometime ago I got a chance to experiment with CLPython, an open-source implementation of Python in Common Lisp. Although CLPython is not under active development now, I found it quite usable. In fact […]

Continue Reading

Definite Clause Grammars in Lisp – Part 3

Written by on June 23, 2017 in LISP, Natural Language Processing, Programming with 0 Comments
Definite Clause Grammars in Lisp – Part 3

In today’s post, let us see how we can enhance the grammar representation discussed so far to include both Number constraint and Parse Tree. Fortunately, this turns out to be quite straightforward. Just as we do in Prolog, we need to include additional parameters, as needed, to each grammar rule. In the earlier two posts, […]

Continue Reading

Definite Clause Grammars in Lisp – Part 2

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

In the last post, I showed how we can implement DCGs in LispWorks using the KnowledgeWorks package. The grammar discussed in that post did not take into account subject/predicate number agreement. This is one of the basic constraints in English grammar. Today I will show how easy it is to encode this constraint. Here is […]

Continue Reading

Definite Clause Grammars (DCG) in Lisp

Written by on May 22, 2017 in LISP, Natural Language Processing, Programming with 0 Comments
Definite Clause Grammars (DCG) in Lisp

Definite Clause Grammars (DCG) are an elegant formalism for specifying context free grammars, and part of their popularity is due to their support in the Prolog language. Most books on Natural Language processing usually include a brief coverage of DCGs, even though Natural languages are not context-free. Because of the ability to attach arbitrary actions […]

Continue Reading

Accessing Dictionary API Using Lisp

Written by on May 7, 2017 in LISP, Programming with 0 Comments

A few days ago when I was searching for good online dictionaries, I stumbled upon Oxford Dictionary API for developers. I decided to check it out and registered for a free account. This allows me to make 3000 API calls in a month. Since I am not planning to use this service commercially, that limit […]

Continue Reading

Top