diff --git a/hazm/dependency_parser.py b/hazm/dependency_parser.py index 39d6cb9f..572f2a88 100644 --- a/hazm/dependency_parser.py +++ b/hazm/dependency_parser.py @@ -133,7 +133,7 @@ def parse_tagged_sents( raise Exception("MaltParser parsing failed: %s" % " ".join(cmd)) return ( - DependencyGraph(item) + DependencyGraph(item, top_relation_label='root') for item in open(output_file.name, encoding="utf8").read().split("\n\n") # noqa: SIM115, PTH123 if item.strip() )