0% found this document useful (0 votes)
4 views8 pages

NLP Unit-2

The document provides an overview of Natural Language Processing (NLP) with a focus on Natural Language Understanding, knowledge representation techniques, and semantic networks. It discusses various types of semantic networks, their components, and their applications in AI, including machine translation and database interfaces. Additionally, it highlights the advantages of semantic networks and machine translation in improving communication, efficiency, and accessibility in various fields.

Uploaded by

arrchanna
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views8 pages

NLP Unit-2

The document provides an overview of Natural Language Processing (NLP) with a focus on Natural Language Understanding, knowledge representation techniques, and semantic networks. It discusses various types of semantic networks, their components, and their applications in AI, including machine translation and database interfaces. Additionally, it highlights the advantages of semantic networks and machine translation in improving communication, efficiency, and accessibility in various fields.

Uploaded by

arrchanna
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Natural language processing (Dr. A.P.J.

Abdul Kalam Technical University)


BOE-089

UNIT-2

Introduction to Natural Language Understanding: The study of Language,


Applications of NLP, Evaluating Language Understanding Systems, Different levels of
Language Analysis, Representations and Understanding, Organization of Natural
language Understanding Systems, Linguistic Background: An outline of English syntax.
NATURAL LANGUAGE PROCESSING UNIT 2

Introduction to semantics and knowledge representation


A semantic network is a form of knowledge representation that visually illustrates how concepts
are related to each other. In AI, it helps in structuring and organizing data in a way that machines
can interpret, process, and use it for decision-making. The nodes in a semantic network represent
concepts, and the edges define the relationships between these concepts, such as "is a," "part of,"
or "related to."

Knowledge Representation Techniques in Artificial Intelligence


1. Logical Representation: Logical representation is one of the most formal and rigorous
methods for knowledge representation in AI. It uses formal logic to encode knowledge in a
way that allows for precise and unambiguous reasoning.
2. Semantic Networks: Semantic networks are a graphical way of representing knowledge,
where concepts are nodes and relationships are edges. They are highly intuitive and are
often used to represent hierarchical and associative relationships.
3. Production Rules: Production rules are another popular method of knowledge
representation in AI, particularly in expert systems. These rules are expressed as "if-then"
statements that define actions to be taken when certain conditions are met.
4. Frames Representation: Frames are data structures that capture stereotypical knowledge
about objects, situations, or events, similar to how objects are used in object-oriented
programming. A frame consists of a set of attributes (slots) and their associated values.

Types of Semantic Networks


1. Definitional Networks
Definitional networks are used to represent hierarchical relationships, often used in taxonomies
or ontologies. They define concepts by their relationships to more general or more specific
concepts.
In a definitional network, "Dog" might be defined as a type of "Mammal," which is in turn a
type of "Animal."
2. Assertional Networks
Assertional networks represent specific facts or assertions about individual instances of
concepts. They often describe properties or attributes of specific entities.
An assertional network might represent the fact that "Rex is a Dog" and "Rex has Brown Fur."
3. Implicational Networks
Implicational networks focus on representing logical implications between concepts. They are
used to infer new knowledge from existing relationships.
If "All Dogs are Mammals" and "Rex is a Dog," an implicational network can infer that "Rex is
a Mammal."
4. Executable Networks
Executable networks are designed to represent procedural knowledge, where the relationships
include actions or sequences that can be executed by an AI system.
An executable network might represent the steps in a recipe, such as "Add Water to Pot"
followed by "Boil Water."
5. Learning Networks
Learning networks are dynamic and evolve as the AI system learns new information. They
update relationships and nodes based on new data or experiences.
In a learning network, an AI might update its understanding of "Dog" as it encounters new
breeds or characteristics.
6. Hybrid Networks
Hybrid networks combine elements from two or more of the above types, allowing for more
complex and versatile representations of knowledge.
A hybrid network might integrate definitional and assertional aspects, representing both the
general concept of "Dog" and specific instances like "Rex."
BTech CSE VIII
NATURAL LANGUAGE PROCESSING UNIT 2

Components of Semantic Networks


1. Lexical Components
• Nodes: The fundamental units of a semantic network, representing concepts, entities, or
objects within the domain of knowledge. Examples include "Dog," "Animal," or "Tree."
• Labels: Descriptive names or identifiers associated with the nodes, providing a way to refer
to the concepts they represent.
2. Structural Components
• Edges/Links: The connections between nodes, representing relationships such as "is a,"
"part of," "causes," or "associated with."
• Types of Relationships: These can include hierarchical relationships (e.g., "is a"),
associative relationships (e.g., "related to"), and functional relationships (e.g., "causes" or
"results in").
3. Semantic Components
• Meanings of Nodes: The specific meanings or interpretations of the nodes within the
context of the network.
• Interpretation of Relationships: The understanding of what the edges or links between
nodes signify in real-world terms, ensuring the relationships are meaningful and accurately
reflect the domain.
4. Procedural Part
• Inference Rules: Rules that allow the network to derive new knowledge from existing
relationships. For example, if "Dog is a Mammal" and "Mammal is an Animal," the network
can infer that "Dog is an Animal."
• Query Mechanisms: Procedures for retrieving information from the network based on
specific queries or criteria.
• Update Mechanisms: Rules and processes for adding, modifying, or removing nodes and
links as new information is introduced.

Working of Semantic Networks


The working of semantic networks involves several processes that allow AI systems to
represent, infer, and reason about knowledge:
1. Knowledge Representation: The first step in working with a semantic network is to define
the concepts (nodes) and the relationships (edges) between them. This involves creating a
network that accurately reflects the domain of knowledge.
2. Inference and Reasoning: AI systems can traverse the network to make inferences based
on the relationships between nodes. This process involves following the edges between
nodes to derive new information or answer queries.
3. Querying the Network: The network can be queried to retrieve specific information.
Queries can be made to find relationships between concepts, identify categories, or extract
particular data points.
4. Updating the Network: As new information becomes available, the network can be
updated by adding, modifying, or deleting nodes and edges. This keeps the network accurate
and reflective of the most current knowledge.
5. Reasoning Mechanisms: Semantic networks often use reasoning mechanisms such as
forward chaining (starting from known facts and applying inference rules to derive new
facts) and backward chaining (starting with a goal and working backward to see if known
facts can support it).
Examples of Semantic Networks in AI
Semantic networks are a powerful tool for representing relationships and classifications across
various domains. Here are some examples illustrating how semantic networks can be applied in
different fields to organize and understand complex information.
1. Technology Stack Classification
2. Nodes: Frontend, Backend, HTML, CSS, JavaScript, Python, Django, API
BTech CSE VIII
NATURAL LANGUAGE PROCESSING UNIT 2
• Links: “is a” relation, “uses” relation
• Labels: Web Development, Framework, Language
In this semantic network, different components of a technology stack are represented. "HTML,"
"CSS," and "JavaScript" are linked to "Frontend" with an "is a" relation, while "Python" and
"Django" are linked to "Backend." The "uses" relation connects "API" to both "Frontend" and
"Backend," indicating its role in web development.
3. Food Hierarchy
• Nodes: Fruit, Apple, Banana, Animal, Lion
• Links: “eaten by” relation
• Labels: Herbivore, Carnivore, Predator
This semantic network models a food hierarchy. "Apple" and "Banana" are connected to
"Fruit," and "Lion" is connected to "Animal" with an "is a" relation. The "eaten by" link
connects "Fruit" to "Herbivore" and "Animal" to "Carnivore," illustrating the dietary
relationships in the food chain.
4. Programming Concepts
• Nodes: Programming Language, Python, Java, Data Types, Integer
• Links: “is a” relation, “has” relation
• Labels: High-Level Language, Variable, Numeric Type
This example demonstrates a semantic network in the domain of programming. "Python" and
"Java" are linked to "Programming Language" with an "is a" relation, indicating they are types
of programming languages. "Data Types" are linked to "Integer" with a "has" relation, and both
are connected to "Numeric Type," showing the classification of data types in programming.

Difference Between Semantic Networks and Frames


Semantic networks and frames are both used for knowledge representation but differ in their
structure and approach:
Aspect Semantic Networks Frames

Graphical representation with Data structures with slots and


Representation
nodes and edges. values.

Nodes (concepts), edges Slots (attributes) and values


Components
(relationships). (fillers).

Structured, often hierarchical, but


Hierarchical or associative
Structure focused on specific entities or
network of concepts.
scenarios.

Represents stereotypical
Represents relationships between
Purpose knowledge about objects or
concepts, often used for reasoning.
situations.

Used to model structured


Used in knowledge representation,
Usage knowledge, like objects, events, or
reasoning, and inference.
scenarios.

More flexible in representing More rigid, with predefined slots


Flexibility
complex relationships. and values.

“Dog is a Mammal” and


A frame for “Car” might have slots
Example “Mammal is an Animal”
for “Make,” “Model,” “Color.”
relationship.

BTech CSE VIII


NATURAL LANGUAGE PROCESSING UNIT 2

Aspect Semantic Networks Frames

Handling of Does not inherently handle default Can include default values for
Default Values values. slots, which can be overridden.

Typically involves simple


Reasoning Supports inferencing through
procedural attachments for
Capability relationships (e.g., inheritance).
reasoning.

Can be more complex to modify


Ease of Easier to modify specific frames by
due to interconnected
Modification adjusting slots and values.
relationships.
Applications of Semantic Networks in AI
Semantic networks are used in various AI applications, such as:
1. Natural Language Processing (NLP): In NLP, semantic networks help in understanding
the meaning of words and sentences by representing the relationships between different
words and concepts.
2. Expert Systems: In expert systems, semantic networks are used to represent the knowledge
of human experts, enabling the system to make decisions or provide recommendations based
on that knowledge.
3. Ontology Development: Ontologies, which define the structure of knowledge in a
particular domain, often use semantic networks to represent the relationships between
concepts within that domain.
4. Information Retrieval: Semantic networks enhance information retrieval by allowing
systems to understand the context and relationships between different pieces of information,
leading to more accurate search results.
5. Machine Learning: In some machine learning applications, semantic networks are used to
improve the interpretability of models by providing a structured representation of the
knowledge the model has learned.
Advantages of Semantic Networks
• Intuitive Representation: Semantic networks provide a clear and intuitive way to represent
knowledge, making it easier for both humans and machines to understand complex
relationships.
• Flexibility: They can represent various types of relationships and are flexible enough to be
applied across different domains and applications.
• Support for Reasoning: Semantic networks facilitate reasoning by enabling AI systems to
infer new knowledge based on existing relationships.

Machine Translation
It is a sub-field of computational linguistics that focuses on developing systems capable of
automatically translating text or speech from one language to another. In Natural Language
Processing (NLP), the goal of machine translation is to produce translations that are not only
grammatically correct but also convey the meaning of the original content accurately.

1. Rule-Based Machine Translation


Rule-based machine translation relies on these resources to ensure precise translation of specific
content. The process involves the software parsing input text, generating a transitional
representation, and then converting it into the target language with reference to grammar rules
and dictionaries.
2. Statistical Machine Translation
Rather than depending on linguistic rules, statistical machine translation utilizes machine learning
for text translation. M achine learning algorithms examine extensive human
BTech CSE VIII
NATURAL LANGUAGE PROCESSING UNIT 2
translations, identifying statistical patterns. When tasked with translating a new source text, the
software intelligently guesses based on the statistical likelihood of specific words or phrases
being associated with others in the target language.
3. Neural Machine Translation (NMT)
A neural network, inspired by the human brain, is a network of interconnected nodes
functioning as an information system. Input data passes through these nodes to produce an
output. Neural machine translation software utilizes neural networks to process vast datasets,
with each node contributing a specific change from source text to target text until the final result
is obtained at the output node.
4. Hybrid Machine Translation
Hybrid machine translation tools integrate multiple machine translation models within a single
software application, leveraging a combination of approaches to enhance the overall
effectiveness of a singular translation model. This process typically involves the incorporation
of rule-based and statistical machine translation subsystems, with the ultimate translation output
being a synthesis of the results generated by each subsystem.

Benefits of Machine translation in Natural Language Processing (NLP)


1. Improved communication: Machine translation makes it easier for people who speak
different languages to communicate with each other, breaking down language barriers and
facilitating international cooperation.
2. Cost savings: Machine translation is typically faster and less expensive than human
translation, making it a cost-effective solution for businesses and organizations that need to
translate large amounts of text.
3. Increased accessibility: Machine translation can make digital content more accessible to
users who speak different languages, improving the user experience and expanding the
reach of digital products and services.
4. Improved efficiency: Machine translation can streamline the translation process, allowing
businesses and organizations to quickly translate large amounts of text and improving
overall efficiency.
5. Language learning: Machine translation can be a valuable tool for language learners,
helping them to understand the meaning of unfamiliar words and phrases and improving
their language skills.

Application of Machine Translation


1. Cross-border communication: Machine translation allows people from different countries
to communicate with each other more easily, breaking down language barriers and
facilitating international cooperation.
2. Localization: Machine translation can be used to quickly and efficiently translate websites,
software, and other digital content into different languages, making them more accessible to
users around the world.
3. Business: Machine translation can be used by businesses to translate documents, contracts,
and other important materials, enabling them to work with partners and customers from
around the world.
4. Education: Machine translation can be used in education to help students learn new
languages and improve their language skills.
5. Government: Machine translation can be used by governments to translate official
documents and communications, improving accessibility and transparency.

BTech CSE VIII


NATURAL LANGUAGE PROCESSING UNIT 2

Database interface
A database management system (DBMS) interface is a user interface that allows for the ability
to input queries to a database without using the query language itself. User-friendly interfaces
provided by DBMS may include the following:
Menu-Based Interfaces
These interfaces present the user with lists of options (called menus) that lead the user through
the formation of a request. The basic advantage of using menus is that they remove the tension
of remembering specific commands and syntax of any query language. The query is basically
composed step by step by collecting or picking options from a menu that is shown by the
system. Pull-down menus are a very popular technique in Web-based interfaces. They are also
often used in browsing interfaces which allow a user to look through the contents of a database
in an exploratory and unstructured manner.
Forms-Based Interfaces
A forms-based interface displays a form to each user. Users can fill out all of the form entries to
insert new data, or they can fill out only certain entries, in which case the DBMS will redeem
the same type of data for other remaining entries. These types of forms are usually designed or
created and programmed for users that have no expertise in operating systems. Many DBMS’s
have form specification languages which are special languages that help specify such forms.
Example: SQL Forms is a form-based language that specifies queries using a form designed in
conjunction with the relational database schema.
Graphical User Interface
A GUI typically displays a schema to the user in diagrammatic form. The user then can specify
a query by manipulating the diagram. In many cases, GUI utilise both menus and forms. Most
GUI use a pointing device such as a mouse, to pick a certain part of the displayed schema
diagram.
Natural Language Interfaces
These interfaces accept requests written in English or some other language and attempt to
understand them. A Natural language interface has its own schema, which is similar to the
database conceptual schema as well as a dictionary of important words.
The natural language interface refers to the words in its schema as well as to the set of standard
words in a dictionary to interpret the request. If the interpretation is successful, the interface
generates a high-level query corresponding to the natural language and submits it to the DBMS
for processing, otherwise, a dialogue is started with the user to clarify any provided condition or
request. The main disadvantage of this is that the capabilities of this type of interface are not
that advance.
Speech Input and Output Interfaces
There is limited use of speech be it for a query or an answer to a question or being a result of a
request it is becoming commonplace. Applications with limited vocabulary such as inquiries for
telephone directory, flight arrival/departure, and bank account information are allowed speech
for input and output to enable ordinary folks to access this information.
The Speech input is detected using predefined words and used to set up the parameters that are
supplied to the queries. For output, a similar conversion from text or numbers into speech takes
place.
Interface for Parametric Users
Interfaces for Parametric Users contain some commands that can be handled with a minimum of
keystrokes. It is generally used in bank transactions for transferring money. These operations
are performed repeatedly.
Interfaces for Database Administrators (DBA)
Most database system contains privileged commands that can be used only by the DBA’s staff.
These include commands for creating accounts, setting system parameters, granting account
authorization, changing a schema, and reorganizing the storage structures of databases.

BTech CSE VIII

You might also like