0% found this document useful (0 votes)
35 views7 pages

Disadvantages of Natural Language Processing

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)
35 views7 pages

Disadvantages of Natural Language Processing

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

Module 14

Natural Language Processing

NLP stands for Natural Language Processing, which is a part of Computer Science, Human
language, and Artificial Intelligence. It is the technology that is used by machines to understand,
analyse, manipulate, and interpret human's languages.

Advantages of NLP
o NLP helps users to ask questions about any subject and get a direct response within seconds.
o NLP offers exact answers to the question means it does not offer unnecessary and unwanted
information.
o NLP helps computers to communicate with humans in their languages.
o It is very time efficient.
o Most of the companies use NLP to improve the efficiency of documentation processes,
accuracy of documentation, and identify the information from large databases.

Disadvantages of NLP

A list of disadvantages of NLP is given below:


o NLP may not show context.
o NLP is unpredictable
o NLP may require more keystrokes.
o NLP is unable to adapt to the new domain, and it has a limited function that's why NLP is built
for a single and specific task only.

Components of NLP

There are the following two components of NLP -

1. Natural Language Understanding (NLU)

Natural Language Understanding (NLU) helps the machine to understand and analyse human
language by extracting the metadata from content such as concepts, entities, keywords, emotion,
relations, and semantic roles.

NLU mainly used in Business applications to understand the customer's problem in both spoken and
written language.

NLU involves the following tasks -


o It is used to map the given input into useful representation.
o It is used to analyze different aspects of the language.

2. Natural Language Generation (NLG)


Natural Language Generation (NLG) acts as a translator that converts the computerized data into
natural language representation. It mainly involves Text planning, Sentence planning, and Text
Realization.

Phases of NLP

There are the following five phases of NLP:

1. Lexical Analysis and Morphological

The first phase of NLP is the Lexical Analysis. This phase scans the source code as a stream of
characters and converts it into meaningful lexemes. It divides the whole text into paragraphs,
sentences, and words.

2. Syntactic Analysis (Parsing)

Syntactic Analysis is used to check grammar, word arrangements, and shows the relationship among
the words.

Example: Agra goes to the Poonam


In the real world, Agra goes to the Poonam, does not make any sense, so this sentence is rejected by
the Syntactic analyzer.
3. Semantic Analysis

Semantic analysis is concerned with the meaning representation. It mainly focuses on the literal
meaning of words, phrases, and sentences.

4. Discourse Integration

Discourse Integration depends upon the sentences that proceeds it and also invokes the meaning of
the sentences that follow it.

5. Pragmatic Analysis

Pragmatic is the fifth and last phase of NLP. It helps you to discover the intended effect by applying a
set of rules that characterize cooperative dialogues.

For Example: "Open the door" is interpreted as a request instead of an order.

Why NLP is difficult?

NLP is difficult because Ambiguity and Uncertainty exist in the language.

Ambiguity

There are the following three ambiguity -


o Lexical Ambiguity

Lexical Ambiguity exists in the presence of two or more possible meanings of the sentence within a
single word.

Example:

Manya is looking for a match.

In the above example, the word match refers to that either Manya is looking for a partner or Manya
is looking for a match. (Cricket or other match)
o Syntactic Ambiguity

Syntactic Ambiguity exists in the presence of two or more possible meanings within the sentence.

Example:

I saw the girl with the binocular.

In the above example, did I have the binoculars? Or did the girl have the binoculars?
o Referential Ambiguity

Referential Ambiguity exists when you are referring to something using the pronoun.
Example: Kiran went to Sunita. She said, "I am hungry."
In the above sentence, you do not know that who is hungry, either Kiran or Sunita.
Grammars:
Grammar is defined as the rules for forming well-structured sentences.
While describing the syntactic structure of well-formed programs, Grammar plays a very
essential and important role. In simple words, Grammar denotes syntactical rules that are used
for conversation in natural languages.

2. Different Types of Grammar in NLP

• Context-Free Grammar (CFG)


• Constituency Grammar (CG)
• Dependency Grammar (DG)

A context-free grammar (CFG) is a list of rules that define the set of all well-formed sentences in a
language. Each rule has a left-hand side, which identifies a syntactic category, and a right-hand side,
which defines its alternative component parts, reading from left to right.

Constituency grammar is drawn from a set of languages called context-free languages (CFL) and
consists of a set of rules or productions stating how a constituent can be segmented into smaller
constituents, up to the level of individual words.

Constituency grammar is defined by four parameters:


• A set of non-terminals (aka variables), each denoting a set of strings.
• A finite set of terminal symbols (lexicon), constituting the alphabet of the language
considered.
• A non-terminal starting symbol.
• A list of rules called productions that recursively define the structure of the language. Each
rule has the form A → s, where:
1) "A" is a non-terminal (variable) symbol on the left-hand side of the rule.
2) "s" is a sequence of terminals and non-terminals that might be empty

Dependency grammar is a fundamental concept in natural language processing (NLP) that allows
us to understand how words connect within sentences. It provides a framework for representing
sentence structure based on word-to-word relationships.

• Think of a sentence as a puzzle and each word in the sentence as a puzzle piece. Dependency
grammar helps us comprehend how these puzzle pieces fit together. This perspective has
been used in linguistics for a long time, for example, to understand the grammar of the
Sanskrit language.

Parsing
Parsing is the process of examining the grammatical structure and relationships inside a given
sentence or text in natural language processing (NLP). It involves analyzing the text to determine the
roles of specific words, such as nouns, verbs, and adjectives, as well as their interrelationships.

Parsing Techniques in NLP


Top-Down Parsing

• A parse tree is a tree that defines how the grammar was utilized to construct the sentence.
Using the top-down approach, the parser attempts to create a parse tree from the root node
S down to the leaves.
• The procedure begins with the assumption that the input can be derived from the selected
start symbol S.
• The next step is to find the tops of all the trees that can begin with S by looking at the
grammatical rules with S on the left-hand side, which generates all the possible trees.
• Top-down parsing is a search with a specific objective in mind.
• It attempts to replicate the initial creation process by rederiving the sentence from the start
symbol, and the production tree is recreated from the top down.
• Top-down, left-to-right, and backtracking are prominent search strategies that are used in
this method.
• The search begins with the root node labeled S, i.e., the starting symbol, expands the internal
nodes using the next productions with the left-hand side equal to the internal node, and
continues until leaves are part of speech (terminals).
• If the leaf nodes, or parts of speech, do not match the input string, we must go back to the
most recent node processed and apply it to another production.

Let’s consider the grammar rules:

Sentence = S = Noun Phrase (NP) + Verb Phrase (VP) + Preposition Phrase (PP)

Take the sentence: “John is playing a game”, and apply Top-down parsing

If part of the speech does not match the input string, backtrack to the node NP.
Part of the speech verb does not match the input string, backtrack to the node S, since PNoun is
matched.

The top-down technique has the advantage of never wasting time investigating trees that cannot
result in S, which indicates it never examines subtrees that cannot find a place in some rooted tree.

Bottom-Up Parsing

• Bottom-up parsing begins with the words of input and attempts to create trees from the
words up, again by applying grammar rules one at a time.
• The parse is successful if it builds a tree rooted in the start symbol S that includes all of the
input. Bottom-up parsing is a type of data-driven search. It attempts to reverse the
manufacturing process and return the phrase to the start symbol S.
• It reverses the production to reduce the string of tokens to the beginning Symbol, and the
string is recognized by generating the rightmost derivation in reverse.
• The goal of reaching the starting symbol S is accomplished through a series of reductions;
when the right-hand side of some rule matches the substring of the input string, the substring
is replaced with the left-hand side of the matched production, and the process is repeated
until the starting symbol is reached.
• Bottom-up parsing can be thought of as a reduction process. Bottom-up parsing is the
construction of a parse tree in postorder.
Considering the grammatical rules stated above and the input sentence “John is playing a game”,

The bottom-up parsing operates as follows:

Common questions

Powered by AI

Top-down and bottom-up parsing strategies differ mainly in their approach to construction of parse trees. Top-down parsing begins with the root node and expands downward using production rules, focusing on whether the input follows from a start symbol . This method benefits from not exploring non-starting subtrees, which yields efficiency in parsing . Bottom-up parsing starts with the input's actual words, constructing parse trees from leaves upward. It involves reducing input strings to the start symbol by applying grammatical rules in reverse order . This method can be seen as a reduction approach and ensures that the parse tree covers all parts of the input, potentially preventing oversight of necessary derivations . Both strategies have their unique advantages depending on the system's requirements for flexibility and efficiency in parsing complex sentences.

Constituency grammar and dependency grammar differ primarily in the way they represent sentence structures. Constituency grammar is based on the hierarchical structure of sentences, breaking them down into constituents like phrases and subphrases that follow context-free grammar rules . Dependency grammar, in contrast, focuses on the direct relationships between individual words without considering higher-level structures, representing these as a collection of word-to-word connections . These differences have significant implications for NLP applications. Constituency grammar is often used for languages with relatively rigid syntactic structures, whereas dependency grammar is more adaptable to free word order languages, allowing for flexible parsing. This distinction influences the choice of grammatical model in tasks like syntactic parsing and language modeling, impacting the system's effectiveness in handling diverse linguistic phenomena.

Ambiguity poses significant challenges to Natural Language Processing (NLP) as it can create multiple interpretations of a sentence, leading to confusion and errors in NLP system outputs. The three main types of ambiguity are lexical, syntactic, and referential. Lexical ambiguity involves words having multiple meanings, such as "match" which could mean a game or a suitable partner . Syntactic ambiguity occurs when a sentence can be parsed in multiple ways, affecting the determination of grammatical relations . Referential ambiguity arises when it's unclear which antecedent a pronoun refers to, thus complicating dialogue interpretation . These ambiguities can significantly impact the performance of NLP systems by complicating tasks like text analysis, machine translation, and sentiment analysis, where precise and unambiguous understanding is crucial.

Natural Language Processing (NLP) is considered difficult mainly due to language's inherent ambiguity and uncertainty, which exists at every level of linguistic analysis from phonology to semantics and pragmatics . Challenges include ambiguities like lexical, syntactic, and referential, which can complicate disambiguation efforts. Potential strategies to overcome these difficulties involve using large datasets to train machine learning models that can identify patterns in language use, developing sophisticated algorithms that can more effectively interpret context and nuance, and leveraging multi-layered models like neural networks capable of complex pattern recognition to handle diverse linguistic inputs. Additionally, integrating contextual and semantic understanding approaches can help improve the robustness and adaptability of NLP systems.

The primary components of Natural Language Processing (NLP) are Natural Language Understanding (NLU) and Natural Language Generation (NLG). NLU helps machines understand and analyze human language by extracting metadata such as concepts, entities, keywords, emotions, relations, and semantic roles from the content. It is mainly used in business applications to understand customer issues in both spoken and written forms . On the other hand, NLG functions as a translator, converting computerized data into a natural language representation, involving text planning, sentence planning, and text realization . Together, these components allow machines to understand human language input and produce human-like language output, thereby facilitating effective human-computer interaction.

Pragmatic analysis plays a critical role in understanding natural language by focusing on the intended effects of communication and the underlying meaning beyond the literal interpretation. It applies a set of cooperative dialogue rules to interpret utterances as intended actions or sentiments rather than just direct statements. For instance, "Open the door" can be understood as a request instead of an order . Pragmatic analysis is the last phase of NLP because it requires the integration of previous analyses (syntactic, semantic, discourse) to accurately ascertain implied meanings and speaker intentions, thereby facilitating a deeper understanding of context-dependent situations . Its placement at the end reflects its role in synthesizing insights gained from earlier stages to produce a comprehensive interpretation.

Natural Language Generation (NLG) can enhance automated reporting and content creation in business applications by converting complex data into easily understandable narratives, thereby enabling quick and insightful decision-making. It allows automated systems to produce human-readable reports from data, which can be particularly useful in areas such as financial reporting, customer support, and market analysis . NLG involves text planning to decide the content structure, sentence planning for organizing linguistically coherent sentences, and text realization to convert data into natural language. These capabilities can improve the efficiency, consistency, and personalization of business communications, ultimately enhancing user engagement and operational productivity.

Syntactic analysis contributes to understanding language structure in NLP by checking the grammar, analyzing word arrangements, and identifying relationships among words. It ensures that sentences are structurally sound according to grammatical rules, reducing ambiguity and error in text interpretation . However, its limitations include the inability to interpret the meaning behind grammatically correct sentences when the syntax is correct but semantics are misleading or incorrect, such as in the sentence "Agra goes to the Poonam" which is syntactically valid but semantically nonsensical .

The key phases of Natural Language Processing (NLP) include lexical analysis, syntactic analysis, semantic analysis, discourse integration, and pragmatic analysis. Lexical analysis is the first phase, where the input is divided into lexemes or meaningful units . Syntactic analysis follows, focusing on grammar and the arrangement of words to ensure structural correctness . Semantic analysis seeks to understand the literal meaning of these structures . Discourse integration ensures that each sentence is contextualized within previous or following sentences, enhancing overall coherence . Finally, pragmatic analysis interprets sentences based on intended effects and communicative context, providing a comprehensive understanding of the text . These phases together facilitate the transformation of raw text into meaningful insights.

Dependency grammar enriches our understanding of sentence structure in NLP by focusing on the relationships between words in a sentence, rather than the phrase structure relations. It represents sentences as directed networks where words are nodes connected by dependencies indicating syntactic relations . This approach allows the analysis of how words directly depend on one another rather than belonging to hierarchical phrase structures. Dependency grammar is useful in languages with free word order, such as Sanskrit, where it helps to comprehend how words interact despite their positions in a sentence . It offers a more flexible representation of linguistic structure that can be highly effective in computational applications like parsing and syntactic analysis.

You might also like