100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Comprehensive Summary - Computational Grammar (LIX025B05) $9.23   Add to cart

Summary

Comprehensive Summary - Computational Grammar (LIX025B05)

 2 views  0 purchase
  • Course
  • Institution

A more comprehensive in-depth summary for the course Computational Grammar or Computational Grammar.

Preview 2 out of 7  pages

  • March 23, 2024
  • 7
  • 2022/2023
  • Summary
avatar-seller
Computational Grammar
Introduction to Natural Language Processing and
Context Free Grammars
1. Ambiguity
In NLP, ambiguity is the case of multiple (more than one) meaning or interpretation to a word,
phrase, or sentence. This causes errors in language understanding.

1.1 Lexical Ambiguity
One of the main types of ambiguity in NLP is called lexical ambiguity, which refers to semantic
ambiguity. In semantic ambiguity, a word can have more than one possible meaning, in the case of a
word having multiple definitions or in the case of having different meanings in different contexts.

An example of lexical ambiguity is “I saw her duck”, in which the word “duck” can be interpreted as
possibly a verb or a noun. Another example is “The bank is closed” in which the word “bank” as a
noun can have multiple definitions such as a 1. money bank or 2. the edge of a river.

1.2 Syntactic Ambiguity
Another main type of ambiguity is syntactic, this is when the structure of a sentence (i.e.: syntax) has
multiple (more than one) possible interpretation.

An example to this is again the sentence “I saw her duck” and differs from lexical ambiguity in the
case of “her duck” vs. “duck” being either a duck as noun being in possession of the person referred
to as “her” or this being a verb because of an action of the person. Another example is “I saw the
man with the telescope”, which can be interpreted as either a man with an accompanying telescope
or the person “I” using the telescope to watch the second person “man”.

1.3 Discourse Ambiguity
The last type of ambiguity we will discuss occurs when the meaning of a sentence is unclear context-
wise leading to multiple ways for interpretation.

An example of this is “John took his car to the garage” and “John met his friend at the garage”, in
which both “his car” and “his friend” can be connected to “John” or can be derived from somewhere
else in the discourse.

2. Levels of Analysis in NLP
In NLP there are five levels of analysis to understand the structure and meaning of language. These
levels are phonology, morphology, syntax, pragmatics, and discourse.

2.1 Phonology
Phonology concerns phonemes, which are the smallest units of sound that differentiates words in a
language. For example, “cat” and “bat” are differentiated by the phoneme /k/ and /b/, respectively.

2.2 Morphology
Morphology concerns the structure of words formed into smaller units called morphemes which
deals with the word formation. For example, “jumped” is formed from the root word “jump” and the
suffix “-ed”.

, 2.3 Syntax
Syntax is the structure of sentences concerning the rules for combining words to form sentences and
deals with the relationship of words and the order in the sentence. For example, “The dog chased
the cat” is formed in the specific order: subject – verb – object.

In syntax only the rules are considered, and the meaning is ignored, it’s strictly only structural. There
are two types of syntax, 1. The word order and 2. Inflection which is the correct formation of the
words such as singular/plural.

Another important concept to syntax is grammar and parsing. Grammar defines as the set of rules
which describe what syntactic structure of sentences are allowed. Parsing is the process of producing
the syntactic structure of a sentence.

2.4 Pragmatics
Pragmatics is the study of language use in context, dealing with the use of language by a speaker
and the interpretation of this language by the listener such as by speech acts. For example, “Can
you pass the salt?” is not only a request, but also a polite way of asking a person to pass the salt.

2.5 Discourse
Discourse concerns the study of how sentences are connected and how meaning is constructed
within a discourse. For example, “he” in a sentence can cause ambiguity, but this can be resolved by
tracing this back to its origin within a larger discourse in which it appears (see Discourse ambiguity).

3. Grammatical Structure
In NLP, there are two main approaches to modelling the structure of sentences: constituency
structure and dependency structure.

3.1 Constituency Structure
A way of representing the grammatical structure of a sentence as a tree (also known as a parse tree)
is called a constituency structure. Herein, a sentence is composed of smaller units called constituents
which are further broken down into smaller constituents or words. These constituents are identified
by their function in the sentence or type of sentence they form. They are often used in tasks
involving parsing with the goal to identify the syntactic structure of a sentence (syntax).

A word is a constituent when it 1. Can be replaced by another element, for example “She read it” can
be “He read it” or “She read that”, this is called replacement, 2. Can be moved around in the
sentence and keep its structural unity, for example “The teacher read a book in the library” can
become “In the library the teacher read a book”, this is called permutation, or 3. Can be coordinated,
for example “The new teacher ate an apple” and “The new teacher and the student ate an apple”
(addition of e.g.: and/or), this is called coordination.

In case of ambiguity in the parsing of a constituency tree we want to aim for the best, correct, and/or
intended one. We can do this by probabilistic parsing in which we assign scores to trees, in other
words we want to find P(x|y): the probability of x (a word), given y (the previous word). We refer to
this probability model over sentences as a (simple form of a) language model (LM). The equation is
P(x|y) = freq(y, x) / freq(y).

3.2 Dependency Structure
Another way of representing the grammatical structure of a sentence is by defining the relationship
between words represented as dependencies. Each word is a node in the tree and the
dependencies between words are directed edges, which indicate the grammatical relationship such

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller s.2. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $9.23. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

64438 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.23
  • (0)
  Add to cart