Semantic Analysis in Natural Language Processing
Natural language processing is the field which aims to give the machines the ability of understanding natural languages. Semantic analysis is a sub topic, out of many sub topics discussed in this field. Simply, semantic analysis means getting the meaning of a text. Different techniques are used in achieving this. This article aims to address the main topics discussed in semantic analysis to give a brief understanding for a beginner.
Co-reference resolution
Let’s see an example before going into the details. In the example shown in the below image, you can see that different words or phrases are used to refer the same entity.
There are two entities as ‘Michael Cohen’ and ‘Mr. Trump’. These entities are referred by different phrases.
What we do in co-reference resolution is, finding which phrases refer to which entities. Here we need to find all the references to an entity within a text document. The words used for referring need not be pronouns. You can see that in the example also. There are both word phrases and pronouns used in referencing. There are also words that such as ‘that’, ‘this’, ‘it’ which may or may not refer to an entity. We should identify whether they refer to an entity or not in a certain document.
Semantic role labeling
A sentence has a main logical concept conveyed which we can name as the predicate. This can be identified by main verb of that sentence. The arguments for the predicate can be identified from other parts of the sentence. Names given for these arguments can vary upon the method. Some methods use the grammatical classes whereas others use unique methods to name these arguments. The identification of the predicate and the arguments for that predicate is known as semantic role labeling.
Build better voice apps. Get more articles & interviews from voice technology experts at voicetechpodcast.com
Let’s see an example. See the example in the following image.
“The keys, which were needed to access the building, were locked in the car.”
The result after doing the semantic role labeling is shown in the picture below.
Word sense disambiguation
The natural language processing involves resolving different kinds of ambiguity. A word can take different meanings making it ambiguous to understand. This makes the natural language understanding by machines more cumbersome. For an example, consider word “bank”. It can refer to a financial institution or the land alongside a river. These different meanings are called word senses. Context can be used effectively to perform WSD. That means the sense of the word depends on the neighboring words of that particular word. Likewise word sense disambiguation (WSD) means selecting the correct word sense for a particular word. WSD can have a huge impact on machine translation, question answering, information retrieval and text classification.
Named entity recognition
This path of natural language processing focuses on identification of named entities such as persons, locations, organisations which are denoted by proper nouns.
See the below example.
“Michael Jordan is a professor at Berkeley.”
There we can identify two named entities as “Michael Jordan”, a person and “Berkeley”, a location. There are real world categories for these entities, such as ‘Person’, ‘City’, ‘Organization’ and so on. Named entity recognition involves resolving high ambiguity. The same words can represent different entities in different contexts. For an example consider the word Seattle. The word can represent a person or location. Sometimes the same word may appear in document to represent both the entities. Named entity recognition can be used in text classification, topic modelling, content recommendations, trend detection.
Summary
Here I have described some of the major topics discussed in natural language processing with regard to semantics. This article provides only a general description of those topics. There are different methods used in those areas, which are not mentioned in this article. Comment your thoughts on this article. The feedback you provide will help me in writing future articles. 😊😊😊
All the examples used here are from https://demo.allennlp.org.