From e95d9caa878a39070ed47af3b390e161d6486f40 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Mon, 26 Oct 2020 11:09:25 +0100 Subject: [PATCH] small edits --- website/docs/usage/layers-architectures.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/website/docs/usage/layers-architectures.md b/website/docs/usage/layers-architectures.md index d91fd6bf1..db0b81112 100644 --- a/website/docs/usage/layers-architectures.md +++ b/website/docs/usage/layers-architectures.md @@ -855,10 +855,10 @@ def score(self, examples: Iterable[Example]) -> Dict[str, Any]: ... return { - f"rel_micro_p": prf.precision, - f"rel_micro_r": prf.recall, - f"rel_micro_f": prf.fscore, - } + "rel_micro_p": prf.precision, + "rel_micro_r": prf.recall, + "rel_micro_f": prf.fscore, + } ``` This is particularly useful to see the scores on the development corpus @@ -886,6 +886,11 @@ assigns it a name and lets you create the component with > [components.relation_extractor.model.get_candidates] > @misc = "rel_cand_generator.v1" > max_length = 20 +> +> [training.score_weights] +> rel_micro_p: 0.0 +> rel_micro_r: 0.0 +> rel_micro_f: 1.0 > ``` ```python @@ -904,14 +909,11 @@ it produces, and the scores that can be calculated: > #### config.cfg (excerpt) > > ```ini -> [training.score_weights] -> rel_micro_p: 0.0 -> rel_micro_r: 0.0 -> rel_micro_f: 1.0 + > ``` ```python -### Factory annotations +### Factory annotations {highlight="5-11"} from spacy.language import Language @Language.factory(