← 学习库 Speech and Language Processing 本册目录

12.4.1 Example: The Penn Treebank Project

Fig. 12.7 shows sentences from the Brown and ATIS portions of the Penn Treebank. $ ^{1} $ Note the formatting differences for the part-of-speech tags; such small differences are common and must be dealt with in processing treebanks. The Penn Treebank part-of-speech tagset was defined in Ch. 5. The use of LISP-style parenthesized notation for trees is extremely common, and resembles the bracketed notation we saw above in (12.2). For those who are not familiar with it we show a standard node-and-line tree representation in Fig. 12.8.

TRACES LONG-DISTANCE DEPENDENCIES SYNTACTIC MOVEMENT

((S

(NP-SBJ (DT That) ((S

(JJ cold) (, ,) (NP-SBJ The/DT flight/NN )

(JJ empty) (NN sky) ) (VP should/MD

(VP (VBD was) (VP arrive/VB

(ADJP-PRD (JJ full) (PP-TMP at/IN

(PP (IN of) (NP eleven/CD a.m/RB )))

(NP (NN fire) (NP-TMP tomorrow/NN )))))

(CC and)

(NN light)))))

(..))

(a) (b)

Figure 127. Brand partners from the LDG Taskbook2 version of the Program (c) and

Figure 12.7 Parsed sentences from the LDC Treebank3 version of the Brown (a) at. ATIS (b) corpora.

Fig. 12.9 shows a tree from the Wall Street Journal. This tree shows another feature of the Penn Treebanks: the use of traces (-NONE-nodes) to mark long-distance dependencies or syntactic movement. For example, quotations often follow a quotative verb like say. But in this example the quotation “We would have to wait until we have collected on those assets” precedes the words he said. An empty S containing only the node -NONE- is used to mark the position after said where the quotation sentence often occurs. This empty node is marked (in Treebanks II and III) with the index 2, as is the quotation S at the beginning of the sentence. Such coindexing may make it easier for some parsers to recover the fact that this fronted or topicalized quotation is the complement of the verb said. A similar -NONE- node is used to mark the fact that there is no syntactic subject right before the verb to wait; instead, the subject is the earlier NP We. Again, they are both coindexed with the index 1.

The Penn Treebank II and Treebank III releases added further information to make it easier to recover the relationships between predicates and arguments. Certain phrases were marked with tags indicating the grammatical function of the phrase (as surface subject, logical topic, cleft, non-VP predicates) whether it appeared in particular text.

原书第 452 页
Image
Figure 12.8 The tree corresponding to the Brown corpus sentence in the previous figure.

(S(SS))

(S-TPC-2

(NP-SBJ-1 (PRP We))

(VP (MD would)

(VP (VB have)

(S

(NP-SBJ (-NONE- *-1))

(VP (TO to)

(VP (VB wait)

(SBAR-TMP (IN until)

(S

(NP-SBJ (PRP we))

(VP (VBP have)

(VP (VBN collected)

(PP-CLR (IN on)

(NP (DT those) (NNS assets))))))))))))

(.,)('')

(NP-SBJ (PRP he))

(VP (VBD said)

(S (-NONE- *T*-2))

(..))

Figure 12.9 A sentence from the Wall Street Journal portion of the LDC Penn Treebank. Note the use of the empty -NONE - nodes.
原书第 453 页
SNP VP.PRPwe | he
NP VPDTthe | that | those
"S", NP VP.JJcold | empty | full
-NONE-NNsky | fire | light | flight
DT NNNNSassets
DT NN NNSCCand
NN CC NNINof | at | until | on
CD RBCDeleven
NPDT JJ, JJ NNRBa.m
PRPVBarrive | have | wait
-NONE-VBDsaid
VPMD VPVBPhave
VBD ADJPVBNcollected
VBD SMDshould | would
VB PPTOto
VB S
VB SBAR
VBP VP
VBN VP
TO VP
SBARIN S
ADJPJJ PP
PPIN NP
Figure 12.10 A sample of the CFG grammar that would be extracted from the three treebank sentences in Fig. 12.7 and Fig. 12.9.

categories (headlines, titles), and its semantic function (temporal phrases, locations) (Marcus et al., 1994; Bies et al., 1995). Fig. 12.9 shows examples of the -SBJ (surface subject) and -TMP (temporal phrase) tags. Fig. 12.8 shows in addition the -PRD tag, which is used for predicates which are not VPs (the one in Fig. 12.8 is an ADJP). Fig. 12.19 shows the tag -UNF in NP-UNF meaning ‘unfinished or incomplete phrase’.

← 12.3.7 Coordination12.4.2 Using a Treebank as a Grammar →