small edits

This commit is contained in:
svlandeg 2020-10-26 11:09:25 +01:00
parent a664994a81
commit e95d9caa87

View File

@ -855,10 +855,10 @@ def score(self, examples: Iterable[Example]) -> Dict[str, Any]:
... ...
return { return {
f"rel_micro_p": prf.precision, "rel_micro_p": prf.precision,
f"rel_micro_r": prf.recall, "rel_micro_r": prf.recall,
f"rel_micro_f": prf.fscore, "rel_micro_f": prf.fscore,
} }
``` ```
This is particularly useful to see the scores on the development corpus 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] > [components.relation_extractor.model.get_candidates]
> @misc = "rel_cand_generator.v1" > @misc = "rel_cand_generator.v1"
> max_length = 20 > max_length = 20
>
> [training.score_weights]
> rel_micro_p: 0.0
> rel_micro_r: 0.0
> rel_micro_f: 1.0
> ``` > ```
```python ```python
@ -904,14 +909,11 @@ it produces, and the scores that can be calculated:
> #### config.cfg (excerpt) > #### config.cfg (excerpt)
> >
> ```ini > ```ini
> [training.score_weights]
> rel_micro_p: 0.0
> rel_micro_r: 0.0
> rel_micro_f: 1.0
> ``` > ```
```python ```python
### Factory annotations ### Factory annotations {highlight="5-11"}
from spacy.language import Language from spacy.language import Language
@Language.factory( @Language.factory(