Return Doc if noun chunks merger component if Doc is not parsed

This commit is contained in:
ines 2018-04-09 14:51:02 +02:00
parent e2f13ec722
commit 987ee27af7

View File

@ -79,7 +79,7 @@ def merge_noun_chunks(doc):
RETURNS (Doc): The Doc object with merged noun chunks.
"""
if not doc.is_parsed:
return
return doc
spans = [(np.start_char, np.end_char, np.root.tag, np.root.dep)
for np in doc.noun_chunks]
for start, end, tag, dep in spans: