From 5a221f79c29a832d849f712c21881eefcb226c62 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Fri, 31 Jul 2020 14:00:21 +0200 Subject: [PATCH] Revert "Remove keyword-only from Scorer API docs" [ci skip] This reverts commit 7a6ac47dc16232b50b5774e6722a98ee05ddaabd. --- website/docs/api/scorer.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/docs/api/scorer.md b/website/docs/api/scorer.md index 52be3f6c7..2f37843a0 100644 --- a/website/docs/api/scorer.md +++ b/website/docs/api/scorer.md @@ -94,6 +94,7 @@ Scores a single token attribute. | -------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `examples` | `Iterable[Example]` | The `Example` objects holding both the predictions and the correct gold-standard annotations. | | `attr` | `str` | The attribute to score. | +| _keyword-only_ | | | | `getter` | `Callable` | Defaults to `getattr`. If provided, `getter(token, attr)` should return the value of the attribute for an individual `Token`. | | **RETURNS** | `Dict[str, float]` | A dictionary containing the score `{attr}_acc`. | @@ -114,6 +115,7 @@ format. | -------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `examples` | `Iterable[Example]` | The `Example` objects holding both the predictions and the correct gold-standard annotations. | | `attr` | `str` | The attribute to score. | +| _keyword-only_ | | | | `getter` | `Callable` | Defaults to `getattr`. If provided, `getter(token, attr)` should return the value of the attribute for an individual `Token`. | | **RETURNS** | `Dict` | A dictionary containing the per-feature PRF scores under the key `{attr}_per_feat`. | @@ -132,6 +134,7 @@ Returns PRF scores for labeled or unlabeled spans. | -------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | `examples` | `Iterable[Example]` | The `Example` objects holding both the predictions and the correct gold-standard annotations. | | `attr` | `str` | The attribute to score. | +| _keyword-only_ | | | | `getter` | `Callable` | Defaults to `getattr`. If provided, `getter(doc, attr)` should return the `Span` objects for an individual `Doc`. | | **RETURNS** | `Dict` | A dictionary containing the PRF scores under the keys `{attr}_p`, `{attr}_r`, `{attr}_f` and the per-type PRF scores under `{attr}_per_type`. | @@ -160,6 +163,7 @@ Calculate the UAS, LAS, and LAS per type scores for dependency parses. | --------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `examples` | `Iterable[Example]` | The `Example` objects holding both the predictions and the correct gold-standard annotations. | | `attr` | `str` | The attribute containing the dependency label. | +| _keyword-only_ | | | | `getter` | `Callable` | Defaults to `getattr`. If provided, `getter(token, attr)` should return the value of the attribute for an individual `Token`. | | `head_attr` | `str` | The attribute containing the head token. | | `head_getter` | `callable` | Defaults to `getattr`. If provided, `head_getter(token, attr)` should return the head for an individual `Token`. | @@ -195,6 +199,7 @@ depends on the scorer settings: | ---------------- | ------------------- | ------------------------------------------------------------------------------------------------------- | | `examples` | `Iterable[Example]` | The `Example` objects holding both the predictions and the correct gold-standard annotations. | | `attr` | `str` | The attribute to score. | +| _keyword-only_ | | | | `getter` | `Callable` | Defaults to `getattr`. If provided, `getter(doc, attr)` should return the cats for an individual `Doc`. | | labels | `Iterable[str]` | The set of possible labels. Defaults to `[]`. | | `multi_label` | `bool` | Whether the attribute allows multiple labels. Defaults to `True`. |