CHAPTER 5 part 2 Flashcards

1
Q

………………. is the process of analyzing the structure of a sentence based on grammatical rules.

A

parsing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

………………is a formal system that defines how sentences are structured

A

Context-Free Grammar (CFG)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why CFG is Important?

A

–Defines sentence structure: CFG helps define how sentences are constructed and how words are arranged within a sentence.

–Analyzing sentences: It provides the foundation for analyzing sentence structure to understand meaning.

–Sentence generation: CFG allows for the generation of grammatically correct sentences

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In a Context-Free Grammar, the language is described
using four key components, which define how sentences can
be constructed and parsed:

A

–Non-terminal symbols (N): Represent abstract syntactic categories.

–Terminal symbols (Σ):Represent the actual input tokens (e.g., words).

– Production rules (R): Define how non-terminals can be expanded into terminals or other non-terminals.

–Start symbol (S): A special non-terminal from which the grammar starts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

T/F The process of Sentence Generation starts from the start symbol (S) and recursively apply the production rules until only terminal symbols remain

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

To determine if a string of terminal symbols can be generated by a given Context-Free Grammar (CFG), and to also return the parse tree(s), we will apply both:

A

–Top-Down Parsing techniques : Start searching space of derivations for the start symbol.

–Bottom-up Parsing techniques : Start search space of reverse derivations from the terminal symbols in the string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

T/F

Top-down parsing begins with the start symbol
of a grammar and attempts to derive the input
string by recursively expanding non-terminals
using production rules.

  • It starts at the top of the parse tree and works its
    way down to the leaves.
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

T/F

  • Bottom-up parsing starts with the input string and builds the parse tree in a bottom-up manner.
  • It identifies small portions of the input string and
    combines them to form larger structures until the entire
    string is recognized.
A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

T/F Top down vs Bottom up

A

⚫ Top down never explores options that will not lead to a full parse, but can explore many options that never connect to the actual sentence.

⚫ Bottom up never explores options that do not connect to the actual sentence but can explore options that can never lead to a full parse.

⚫ Relative amounts of wasted search depend on how much the grammar branches in each direction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

the

a

that

this

A

Det (Determiner) used before nouns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

from

to

on

near

through

A

Prep (Preposition) – shows direction or relation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Examples:

book

flight

meal

money

A

Noun – a person, place, thing, or idea

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Examples:

book

include

prefer

A

Verb – action or state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Examples:

I

he

she

me

A

Pronoun – replaces a noun

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Examples:

Houston

NWA

A

Proper-Noun = specific names

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

does is, are, was, were, have, has, had, do, did, can, will, shall,

A

Aux (Auxiliary Verb) – helps the main verb