Skip to content
Snippets Groups Projects
Commit a191f4d7 authored by Thomas Wolf's avatar Thomas Wolf
Browse files

- GLiNER evaluation for all datasets except pile, with results (which are...

- GLiNER evaluation for all datasets except pile, with results (which are invalid for figer because it currently only returns one annotated entity for each sentence)
- fixed test_datasets inaccurate number of sentences error due to recent changes regarding limiting numbers of outputted instances
parent 56ea896e
No related branches found
No related tags found
No related merge requests found
Showing
with 24010 additions and 805 deletions
......@@ -4,6 +4,7 @@ Evaluates GLiNER as SotA and plots results using reusable functions in plotter.
from src.metrics import NER_metrics, read_NER_metrics
# NER_metrics("GLiNER", "CoNLL", "results", test_instances=100)
read_NER_metrics("results")
for dataset in ["CoNLL", "FIGER-coarse", "FIGER-fine"]:
NER_metrics("GLiNER", dataset, f"results_{dataset}", test_instances=1000)
print(f"\nResults {dataset}:")
read_NER_metrics(f"results_{dataset}")
......@@ -41,3 +41,5 @@ def find_entities(model_name, sentence, labels):
except Exception as e:
print(e)
return "No answer was marked, here is the model's response: " + answer
# todo find entities with NLI / MLM
......@@ -8,7 +8,7 @@ working_datasets = ["Pile-NER-type", "CoNLL", "FIGER-coarse", "FIGER-fine"]
for dataset in working_datasets:
print(dataset + ":")
labels = data_manager.get_labels(dataset)
data = data_manager.get_annotated_sentences(dataset)
data = data_manager.get_annotated_sentences(dataset, 99999999)
print("First (up to) ten labels: " + str(labels[:10]))
print("Number of distinct labels: " + str(len(labels)))
......
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