Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

notes of natural langauge, Cheat Sheet of Natural Language Processing (NLP)

notes of natural language processing

Typology: Cheat Sheet

2022/2023

Uploaded on 11/29/2023

abhay-kumar-20
abhay-kumar-20 🇮🇳

1 document

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UNIT-5 SEMANTICS-KNOWLEDGE REPRESENTATION
Semantic Analysis
The purpose of semantic analysis is to draw exact meaning, or you can say dictionary
meaning from the text. The work of semantic analyzer is to check the text for
meaningfulness.
We already know that lexical analysis also deals with the meaning of the words, then
how is semantic analysis different from lexical analysis? Lexical analysis is based on
smaller token but on the other side semantic analysis focuses on larger chunks. That is
why semantic analysis can be divided into the following two parts −
Studying meaning of individual word
It is the first part of the semantic analysis in which the study of the meaning of individual
words is performed. This part is called lexical semantics.
Studying the combination of individual words
In the second part, the individual words will be combined to provide meaning in
sentences.
The most important task of semantic analysis is to get the proper meaning of the
sentence. For example, analyze the sentence “Ram is great.” In this sentence, the
speaker is talking either about Lord Ram or about a person whose name is Ram. That is
why the job, to get the proper meaning of the sentence, of semantic analyzer is
important.
Semantic Network Representation
Semantic networks are alternative of predicate logic for knowledge representation. In Semantic
networks, we can represent our knowledge in the form of graphical networks. This network
consists of nodes representing objects and arcs which describe the relationship between those
objects. Semantic networks can categorize the object in different forms and can also link those
objects. Semantic networks are easy to understand and can be easily extended.
This representation consist of mainly two types of relations:
1. IS-A relation (Inheritance)
2. Kind-of-relation
pf3
pf4
pf5

Partial preview of the text

Download notes of natural langauge and more Cheat Sheet Natural Language Processing (NLP) in PDF only on Docsity!

UNIT-5 SEMANTICS-KNOWLEDGE REPRESENTATION

Semantic Analysis

The purpose of semantic analysis is to draw exact meaning, or you can say dictionary meaning from the text. The work of semantic analyzer is to check the text for meaningfulness. We already know that lexical analysis also deals with the meaning of the words, then how is semantic analysis different from lexical analysis? Lexical analysis is based on smaller token but on the other side semantic analysis focuses on larger chunks. That is why semantic analysis can be divided into the following two parts −

Studying meaning of individual word

It is the first part of the semantic analysis in which the study of the meaning of individual words is performed. This part is called lexical semantics.

Studying the combination of individual words

In the second part, the individual words will be combined to provide meaning in sentences. The most important task of semantic analysis is to get the proper meaning of the sentence. For example, analyze the sentence “Ram is great.” In this sentence, the speaker is talking either about Lord Ram or about a person whose name is Ram. That is why the job, to get the proper meaning of the sentence, of semantic analyzer is important.

Semantic Network Representation

Semantic networks are alternative of predicate logic for knowledge representation. In Semantic networks, we can represent our knowledge in the form of graphical networks. This network consists of nodes representing objects and arcs which describe the relationship between those objects. Semantic networks can categorize the object in different forms and can also link those objects. Semantic networks are easy to understand and can be easily extended. This representation consist of mainly two types of relations:

  1. IS-A relation (Inheritance)
  2. Kind-of-relation

Example: Following are some statements which we need to represent in the form of nodes and arcs. Statements:

  1. Jerry is a cat.
  2. Jerry is a mammal
  3. Jerry is owned by Priya.
  4. Jerry is brown colored.
  5. All Mammals are animal. In the above diagram, we have represented the different type of knowledge in the form of nodes and arcs. Each object is connected with another object by some relation. Drawbacks in Semantic representation:
  6. Semantic networks take more computational time at runtime as we need to traverse the complete network tree to answer some questions. It might be possible in the worst case scenario that after traversing the entire tree, we find that the solution does not exist in this network.
  7. Semantic networks try to model human-like memory (Which has 1015 neurons and links) to store the information, but in practice, it is not possible to build such a vast semantic network.
  8. These types of representations are inadequate as they do not have any equivalent quantifier, e.g., for all, for some, none, etc.
  9. Semantic networks do not have any standard definition for the link names.
  10. These networks are not intelligent and depend on the creator of the system.

SEMANTIC NETS October 5th, 2010 | Author: R obin A semantic net (or semantic network) is a knowledge representation technique used for propositional information. So it is also called a propositional net. Semantic nets convey meaning. They are two dimensional representations of knowledge. Mathematically a semantic net can be defined as a labelled directed graph. Semantic nets consist of nodes, links (edges) and link labels. In the semantic network diagram, nodes appear as circles or ellipses or rectangles to represent objects such as physical objects, concepts or situations. Links appear as arrows to express the relationships between objects, and link labels specify particular relations. Relationships provide the basic structure for organizing knowledge. The objects and relations involved need not be so concrete. As nodes are associated with other nodes semantic nets are also referred to as associative nets.

Figure: A Semantic Network In the above figure all the objects are within ovals and connected using labelled arcs. Note that there is a link between Jill and FemalePersons with label MemberOf. Simlarly there is a MemberOf link between Jack and MalePersons and SisterOf link between Jill and Jack. The MemberOf link between Jill and FemalePersons indicates that Jill belongs to the category of female persons. INHERITANCE REASONING Unless there is a specific evidence to the contrary, it is assumed that all members of a class (category) will inherit all the properties of their superclasses. So semantic network allows us to perform inheritance reasoning. For example Jill inherits the property of having two legs as she belongs to the category of FemalePersons which in turn belongs to the category of Persons which has a boxed Legs link with value 2. Semantic nets allows multiple inheritance. So an object can belong to more than one category and a category can be a subset of more than one another category. INVERSE LINKS Semantic network allows a common form of inference known as inverse links. For example we can have a HasSister link which is the inverse of SisterOf link.The inverse links make the job of inference algorithms much easier to answer queries such as who the sister of Jack is. On discovering that HasSister is the inverse of SisterOf the inference algorithm can follow that link HasSister from Jack to Jill and answer the query.