Skip to content

Commit

Permalink
Updates README to reflect new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jackboyla committed Mar 2, 2024
1 parent 12fce38 commit 9a2250d
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ evaluator = Evaluator(true, pred, tags=['LOC', 'PER'])
# Returns overall metrics and metrics for each tag
results, results_per_tag = evaluator.evaluate()
results, results_per_tag, result_indices, result_indices_by_tag = evaluator.evaluate()
print(results)
```
Expand Down Expand Up @@ -378,6 +378,33 @@ print(results_by_tag)
}
```

```
from nervaluate import summary_report_overall_indices
print(summary_report_overall_indices(evaluation_indices=result_indices, error_schema='partial', preds=pred))
```

```
Indices for error schema 'partial':
Correct indices:
- Instance 0, Entity 0: Label=PER, Start=2, End=4
- Instance 1, Entity 0: Label=LOC, Start=1, End=2
- Instance 1, Entity 1: Label=LOC, Start=3, End=4
Incorrect indices:
- None
Partial indices:
- None
Missed indices:
- None
Spurious indices:
- None
```

### Nested lists

```
Expand All @@ -393,7 +420,7 @@ pred = [
evaluator = Evaluator(true, pred, tags=['LOC', 'PER'], loader="list")
results, results_by_tag = evaluator.evaluate()
results, results_by_tag, result_indices, result_indices_by_tag = evaluator.evaluate()
```

### CoNLL style tab delimited
Expand All @@ -406,7 +433,7 @@ pred = "word\tO\nword\tO\B-PER\nword\tI-PER\n"
evaluator = Evaluator(true, pred, tags=['PER'], loader="conll")
results, results_by_tag = evaluator.evaluate()
results, results_by_tag, result_indices, result_indices_by_tag = evaluator.evaluate()
```

Expand Down

0 comments on commit 9a2250d

Please sign in to comment.