From 8274dffad629357116fa03870162f19ab0672ca1 Mon Sep 17 00:00:00 2001 From: ines Date: Thu, 1 Jun 2017 12:51:36 +0200 Subject: [PATCH] Update NER training draft --- website/docs/usage/training-ner.jade | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/website/docs/usage/training-ner.jade b/website/docs/usage/training-ner.jade index b2c9213b6..3d732b16d 100644 --- a/website/docs/usage/training-ner.jade +++ b/website/docs/usage/training-ner.jade @@ -8,22 +8,23 @@ p | particularly useful as a "quick and dirty solution", if you have only a | few corrections or annotations. -+under-construction - +h(2, "improving-accuracy") Improving accuracy on existing entity types p | To update the model, you first need to create an instance of - | #[+api("goldparse") #[code spacy.gold.GoldParse]], with the entity labels - | you want to learn. You will then pass this instance to the - | #[+api("entityrecognizer#update") #[code EntityRecognizer.update()]] - | method. + | #[+api("goldparse") #[code GoldParse]], with the entity labels + | you want to learn. You'll usually need to provide many examples to + | meaningfully improve the system — a few hundred is a good start, although + | more is better. + ++image + include ../../assets/img/docs/training-loop.svg + .u-text-right + +button("/assets/img/docs/training-loop.svg", false, "secondary").u-text-tag View large graphic p - | You'll usually need to provide many examples to meaningfully improve the - | system — a few hundred is a good start, although more is better. You - | should avoid iterating over the same few examples multiple times, or the - | model is likely to "forget" how to annotate other examples. If you + | You should avoid iterating over the same few examples multiple times, or + | the model is likely to "forget" how to annotate other examples. If you | iterate over the same few examples, you're effectively changing the loss | function. The optimizer will find a way to minimize the loss on your | examples, without regard for the consequences on the examples it's no @@ -39,6 +40,8 @@ p +h(2, "example") Example ++under-construction + +code. import random from spacy.lang.en import English