Add UPOS as morphological field in ud_train

This commit is contained in:
Matthew Honnibal 2019-03-09 11:50:50 +00:00
parent bba5f57f91
commit a6d153b0a0

View File

@ -84,6 +84,7 @@ def read_data(
sent["words"].append(word)
sent["tags"].append(tag)
sent["morphology"].append(_parse_morph_string(morph))
sent["morphology"][-1].add("POS_%s" % pos)
sent["heads"].append(head)
sent["deps"].append("ROOT" if dep == "root" else dep)
sent["spaces"].append(space_after == "_")