What is the syntax?
Syntax describes how words are arranged to become a larger structure such as phrases, clauses and sentences and which words belong together in which order.
Why we care about the syntax?
We need understand the syntax before researching some topics:
- Grammer checker?
- Questions answering
- Information extraction
- Machine translation
- More applications of NLP
What is the constituent in the English syntax?
Constituent is a squence of words acting as a single unit within a hierarchical structure.
-
In “He saw the house on the hill” constituents are e.g.
house
on the hill
the house on the hill
saw the house on the hill -
Not constituents are e.g.
He saw the
house on
on the -
There is not mathematicalll precise definition of constituent, and it sometimes depends on the view of grammar.
-
Some cases can be indentified easily. For example, if a sequcen can move as a whole to a different location without affecting grammaticality (correctness) of the sentence.
-
He is taking classes to improve his English
-
To improve his English , he is taking classes
-
categories of the constituent
-
Constitent can be characterised by:
-
The left and right context in which they can occur
-
Their internal structure
-
-
Some categories are called clauses.
They present a complete proposition, typically consisting of a subject and predicate. -
There is no univerally accepted mathematically precise definition of clause.
Noun phrases (NPs)
-
NPs typically have common noun, proper noun (專有名詞) or personal pronoun (人稱代詞)
-
They can occur just before a verb as a subject, or after as a object.
eg. I prefer the morning flight
Prepositional phrases (PPs)
- PPs typically start with preposition, follow nouns or verbs, and may be omitted in whole from a sentence.
- The PP is the part of a verb phrase (VP):
I want to eat sushi with chopsticks - As the part of noun phrase (NP):
I want to eat soup with onions
Adjective phrases (APs)
- APs typically consists of adjective, possibly preceded by adverbs.
- Give me a cheap fare
- Give me the least expensive fare