我必须列出给定句子中的子句。我正在执行自己的语法规则来解析句子中的从句。我得到的结果是:从python中的句子中提取子句
*************************************************
(S
(CLAUSE
(VP
(VP they/PRP were/VBD delivered/VBN promptly/RB)
and/CC
(VP a/DT very/RB))
(NP (NP good/JJ value/NN) and/CC (NP excellent/NN)))
(CLAUSE
(VP all/DT)
(NP (NP around/IN (NP slipper/NN)) (NP with/IN (NP traction/NN))))
./.)
*************************************************
从上面的结果中,条款应该列出来,在下面的语句中给出结果。
they were delivered promptly and a very good value and excellent
all around slipper with traction.
我使用flatten
和chomsky_normal_form
尝试,但未能获得所需的结果。如何列出单条线上的每个条款以摆脱标签?
请张贴代码和语法。 – alvas 2014-10-28 07:15:57