我有一棵树:
(S
(WH-QUERY Which)
(FLIGHT-NP
(FLIGHT-CNP
(FLIGHT-CNP (FLIGHT-N flight))
(FLIGHT-DEST to (CITY-NP (CITY-NAME Hue) (CITY-N city)))))
(FLIGHT-VP
(FLIGHT-V arrives)
(FLIGHT-TIME (P-TIME at) (TIME-MOD 20:00HR))))
我想通过 nltk 中的标签获取特定节点。例如,我有标签“CITY-NAME”,我想获取节点(CITY-NAM Hue)。我怎样才能做到这一点?