Skip to content
Snippets Groups Projects
Unverified Commit 602041ce authored by JulianFP's avatar JulianFP
Browse files

Figer: Add random sampling

parent 5352425a
No related branches found
No related tags found
No related merge requests found
......@@ -41,8 +41,8 @@ def get_annotated_sentences(dataset, test_instances=10):
elif dataset == "Pile-NER-type":
return random.sample(pile_interface.get_annotated_sentences(), min(test_instances, len(pile_interface.get_annotated_sentences())))
elif dataset == "FIGER-coarse":
return figer_interface.get_annotated_sentences_coarse() # todo implement limiting output instances internally
return random.sample(figer_interface.get_annotated_sentences_coarse(), min(test_instances, len(figer_interface.get_annotated_sentences_coarse())))
elif dataset == "FIGER-fine":
return figer_interface.get_annotated_sentences_fine()
return random.sample(figer_interface.get_annotated_sentences_fine(), min(test_instances, len(figer_interface.get_annotated_sentences_fine())))
else:
raise Exception
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment