Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing sentences #35

Open
gossminn opened this issue Nov 19, 2019 · 0 comments
Open

Missing sentences #35

gossminn opened this issue Nov 19, 2019 · 0 comments

Comments

@gossminn
Copy link

gossminn commented Nov 19, 2019

Currently, if no targets are found for a particular input sentence, no output at all will be produced for this sentence. This causes problems if you are trying to get frame annotations for some raw input, and then try to map these frame annotations back to the corresponding sentences in the input, since the number of input sentences and output sentences won't match.

The relevant code is:

def print_as_conll(gold_examples, predicted_target_dict):
"""
Creates a CoNLL object with predicted target and lexical unit.
Spits out one CoNLL for each LU.
"""
with codecs.open(out_conll_file, "w", "utf-8") as conll_file:
for gold, pred in zip(gold_examples, predicted_target_dict):
for target in sorted(pred):
result = gold.get_predicted_target_conll(target, pred[target][0]) + "\n"
conll_file.write(result)
conll_file.close()

If pred is empty for a particular instance, nothing will be written.

Would it be possible to (optionally, to not break the CONLL format) write some kind of null output (e.g. "SKIPPED_SENTENCE"), so that, when processing the output, it's easier to find which sentences are missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant