You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
1.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

The phrase-level parser
red, white and blue three and twenty blackbirds
simple pronoun noun groups, €.g., he.
4.7 Some examples
Figure 4-5 shows an example of the phrase-level parse produced by the parser.
The text is a portion of a computer-taught course at Stanford. The paragraphs
parsed here are taken from the end of a section about predicate calculus.
PARSER: NOUN GROUP: MOST OF THE EXERCISES
PARSER: VERB GROUP: ARE
PARSER: NOUN GROUP: TRANSLATIONS
PARSER: UNCLASSIFIED: .
PARSER: VERB GROUP: THERE ARE
PARSER: NOUN GROUP: SEVERAL IMPORTANT CHANGES
PARSER: PREPOSITIONAL PHRASE: IN THE WAY
PARSER: NOUN GROUP: THE QUANTIFIER RULES
PARSER: VERB GROUP: WILL WORK
PARSER: PREPOSITIONAL PHRASE: FOR THE REMAINDER OF THE
COURSE
PARSER: UNCLASSIFIED: .
PARSER: UNCLASSIFIED: .
PARSER: UNCLASSIFIED: FIRST
PARSER: UNCLASSIFIED: ,
PARSER: NOUN GROUP: THE PROGRAM
PARSER: VERB GROUP: WILL INFORM
PARSER: NOUN GROUP: YOQOU
PARSER: UNCLASSIFIED: IMMEDIATELY
PARSER: UNCLASSIFIED: IF
PARSER: NOUN GROUP: A QUANTIFIER INFERENCE
PARSER: VERB GROUP: VIOLATES
PARSER: NOUN GROUP: ANY OF THE RESTRICTIONS
PARSER: UNCLASSIFIED: .
PARSER: UNCLASSIFIED: .
PARSER: UNCLASSIFIED: .
PARSER: NOUN GROUP: THAT WAY
PARSER: NOUN GROUP: AN OVERSIGHT
PARSER: VERB GROUP: WONT COST
PARSER: NOUN GROUP: YOQU
PARSER: NOUN GROUP: A LOT OF WORK
PARSER: UNCLASSIFIED: .
PARSER: UNCLASSIFIED: .
PARSER: UNCLASSIFIED: .
PARSER: NOUN GROUP: YOU
PARSER: VERB GROUP: CAN'T USE
PARSER: NOUN GROUP: AMBIGUOUS NAMES
PARSER: PREPOSITIONAL PHRASE: WITH A SHARP
PARSER: PREPOSITIONAL PHRASE: IN THEM
PARSER: UNCLASSIFIED: ANYMORE
PARSER: UNCLASSIFIED: .
PARSER: UNCLASSIFIED: .
PARSER: <EOF>
Figure 4-5: Example of PARSER operation
51