Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

1.

a NLP:
 It stands for natural language processing, which is a part of computer science,
artificial intelligence and human language.
 It is a branch of AI that deals with interaction with human language and computers.
 Ex: Chatbots, language translation etc.
Types:
1. NLU
2. NLG

1. NLU (Natural Language Understanding):


 It is a subfield of NLP focuses on understanding and interpretation of human
language.
Types:
 Syntactic analysis: Parsing the sentence structure and identifying the parts of speech
 Semantic analysis: It focuses on understanding the meaning of words and how they
are related to each other.
 Pragmatic analysis: It focuses on understanding the context of the sentence and it’s
intended meaning.
2. NLG (Natural Language Understanding):
 It is a subfield of NLP which focuses on generating natural language text from a
structured input data.
Types:
 Rule based: Set of pre-defined rules to generate natural language text.
 Template based: Pre defined templates with a template based data to generate
natural language text.
 Machine Learning based: Use of algorithms to learn from large datasets and
generate text based patterns.

1.b  Inflection refers to the modification of a word to express different grammatical


categories such as tense, aspect, mood, number, gender, and case.
 It involves altering the form of a word to convey additional information about its
role in a sentence or its relationship to other words.
 In this sentence, "caught" is inflected to indicate past tense, while the nouns "cat"
and "mouse" remain in their base (uninflected) forms.
2.  Morphophonemic rules refer to the patterns or transformations that occur in the
sounds of words when they are combined in a sentence.
 Adding affixes(suffix/prefix) to the base/root word.

In this diagram:
 "S" represents the sentence structure, consisting of a subject (NP) and a predicate
(VP).
 The subject "The cat" (NP) contains an article ("The") and a noun ("cat").
 The predicate "caught the mouse" (VP) consists of a verb ("caught") and an object
(NP), which includes an article ("the") and a noun ("mouse").
 The morphophonemic rule applied to the verb "caught" is represented within the
structure, indicating the pronunciation change from the base form "catch" to the past
tense form "caught" due to the addition of the past tense suffix "-ed".

3. Morphological Parsing:
 Morphological parsing involves breaking down words into their constituent
morphemes, which are the smallest units of meaning or grammatical function.
 Rules:
 Lexicon:
 The lexicon is a repository of morphemes and their corresponding meanings or
grammatical functions.
 It gives the information about root word and it’s affix.
 Morphotactic Rules:
 Morphotactic rules govern the allowable combinations and order of morphemes
within a word. They specify the valid morphological structures in a language.
 Orthographic Rules:
 Orthographic rules define the correct spelling conventions for morphemes and
words within a language. They ensure consistency in written representations.

 Word: "unhappiness"
 Morphological Parsing:
 Lexicon:
"un-" (prefix): negation or reversal
"happy" (stem): feeling or emotion
"-ness" (suffix): state or quality
 Morphotactic Rules:
The prefix "un-" can attach to the beginning of a word to denote negation.
The suffix "-ness" typically attaches to adjectives to form abstract nouns indicating
a state or quality.
 Orthographic Rules:
Orthographic rules dictate the spelling conventions, ensuring that the prefix, stem,
and suffix are spelled correctly according to standard conventions.

4. LFG (Lexial Functional Grammer):


 Lexical-Functional Grammar (LFG) is a theory of grammar that focuses on the
separation of syntactic structure from semantic interpretation.
Considering the Ex: She Loves her job.
1. Lexicon:
 The lexicon contains information about individual words, including their
grammatical category (e.g., noun, verb, pronoun) and any subcategorization
requirements (i.e., what types of phrases they can combine with).
Example:
 "She" (pronoun, third-person singular)
 "loves" (verb, third-person singular present tense)
 "her" (pronoun, possessive)
 "job" (noun)
2.Functional Structures:
 Functional structures describe how words relate to each other in a sentence. They
include grammatical functions like subject, object, and verb, as well as semantic
roles like agent, theme, and recipient.
Example:
 Subject (SUBJ): "She"
 Verb (COMP): "loves"
 Object (OBJ): "her job"
5. Phrase Structure Grammer:
 Context-Free Grammar (CFG) is a formal grammar defined by a set of production
rules that describe all possible syntactic structures of a language. It consists of a set
of terminal symbols, a set of non-terminal symbols, a start symbol, and a set of
production rules.
 It is represented in the form of G(V,T,P,S)
1. Non-terminal Symbols (V):
 Non-terminal symbols are placeholders that represent syntactic categories
or structures. They can be thought of as variables in the grammar.
 Examples: S (sentence), NP (noun phrase), VP (verb phrase), Det
(determiner), Noun (noun), Verb (verb)
2. Terminal Symbols (T):
 Terminal symbols are actual words or symbols in the language being
described by the grammar. They cannot be further decomposed into smaller
syntactic units.
 Examples: "the" (determiner), "cat" (noun), "chased" (verb)
3. Production Rules (P):
 Production rules specify how non-terminal symbols can be expanded into
sequences of terminal and/or non-terminal symbols. They define the
syntactic structure of the language.
 Production rule notation: A → β, where A is a non-terminal symbol and β is
a sequence of terminal and/or non-terminal symbols.
Examples:
 S → NP VP (a sentence consists of a noun phrase followed by a verb
phrase)
 NP → Det Noun (a noun phrase consists of a determiner followed by a
noun)
4. Start Symbol (S):
 The start symbol is a special non-terminal symbol that represents the top-
level structure of the language. It serves as the starting point for generating
sentences or deriving syntactic structures.
 Example: S (sentence)
6.

7.
8.

You might also like