admin

rss feed

std::is_base_of<>

Written by on April 26, 2020 in C++, Programming with 0 Comments
std::is_base_of<>

In our on-going series on C++ Type Traits, today’s topic is about the trait std::is_base_of<>. For the official description, see this. std::is_base_of<A, B>::value takes two arguments, both classes (or structs), and returns true if A is a base class of B and false otherwise. Trivially, std::<A, A>::value is true. Let us look at an example […]

Continue Reading

std::common_type<> Type Trait

Written by on April 12, 2020 in C++, Programming with 0 Comments
std::common_type<> Type Trait

In today’s post, I would like to go over the type trait std::common_type<>. This trait was introduced in C++11. As per the specification, std::common_type<T1, T2, …Tn>::type refers to a type Tx in the given list, which the rest of the types in the list can be implicitly converted to. This works with built-in as well […]

Continue Reading

std::is_empty

Written by on March 28, 2020 in C++, Programming with 0 Comments
std::is_empty<T>

In the previous post, we looked at the std::is_destructible<T> type trait. Today, let us try to understand another type trait std::is_empty<T>. As per the specification, is_empty<T>::value will return true in the following cases: – The class/struct has no non-static data member – The class/struct does not define a virtual function – The class/struct does not […]

Continue Reading

std::is_destructible

Written by on March 15, 2020 in C++, Programming with 0 Comments
std::is_destructible

In the last article, I explained the deleted destructor in some detail. Today, I would like to talk about a related construct, a type trait called std::is_destructible. Type traits, defined in the header <type_traits>, are a big help when it comes to implementing template metaprogramming.  See this article for a nice introduction to type traits in […]

Continue Reading

Deleted Destructor in C++

Written by on March 4, 2020 in C++ with 0 Comments
Deleted Destructor in C++

Since C++ 11, we can use the keyword delete to declare functions as deleted and thus prohibit the use of these functions in the code. See this article for a brief overview. In particular, the destructor of a class/struct/union can be declared as deleted. In today’s article, I am going to discuss this specific feature in […]

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

Verb Conjugations in Passive Voice

Written by on February 2, 2020 in Natural Language Processing, Prolog with 0 Comments
Verb Conjugations in Passive Voice

In my earlier article, I showed how the iLexicon system can generate verb conjugations based on <Verb, Tense, Person, Number> quadruple. For the 16 tense forms discussed in that article, the verb conjugations were generated in “active” voice.  We all know that “transitive” verbs can be expressed in both “active” and “passive” voice. For example, […]

Continue Reading

Experimenting with Text Simplification

Written by on January 19, 2020 in Natural Language Processing with 0 Comments

After my last book review, I decided to check out a few websites that claim to simplify English text and/or help compute the measure of readability. In today’s post, I am sharing the results of my experiment. www.simplish.org This site has some interesting functionality. It does spelling check, grammar check, text simplification, and can even […]

Continue Reading

Book Review – Automatic Text Simplification

Written by on January 2, 2020 in Book Review, Natural Language Processing with 0 Comments
Book Review – Automatic Text Simplification

Title: Automatic Text Simplification Author: Horacio Saggino Publisher: Morgan & Claypool Publishers Year: 2017 Automatic Text Simplification is an active area of research in NLP and has been going on for over 20 years. The idea is to transform a given text T1 into text T2 such that T2 is easier to read and understand […]

Continue Reading

Distributed Computing with Linda

Written by on December 22, 2019 in Programming, Prolog with 0 Comments
Distributed Computing with Linda

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

Continue Reading

Top