Skip to content

Test conll generation for multi-recipe files #18

@TheresaSchmidt

Description

@TheresaSchmidt

This piece of code needs to be tested:

if args.multi_mode:
# WIP - not yet tested
lineflag = False
with open(args.pred_file, encoding="utf-8") as f:
for line in f:
lineflag = True
j = json.loads(line)
tokens = j["words"]
tags = j["pos"]
heads = j["predicted_heads"]
heads = list(map(str, heads))
deps = j["predicted_dependencies"]
parsercolumns2conllu(args.out, tokens, tags, heads, deps, filemode="a")
if not lineflag:
raise IOError(
"Empty file"
) # we want to detect and subsequently delete empty files from the dataset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingCode that hasn't been tested (thoroughly)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions