From 7c701784e58f2ca140a1ef2b1dd6ee4efc1095a4 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 30 Sep 2019 12:01:09 +0200 Subject: [PATCH] Update models.js --- website/src/templates/models.js | 42 ++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/website/src/templates/models.js b/website/src/templates/models.js index 4713f4b34..1466235e4 100644 --- a/website/src/templates/models.js +++ b/website/src/templates/models.js @@ -218,7 +218,7 @@ const Model = ({ name, langId, langName, baseUrl, repo, compatibility, hasExampl )} - + {accuracy && accuracy.map(({ label, items }, i) => !items ? null : ( @@ -260,6 +260,46 @@ const Model = ({ name, langId, langName, baseUrl, repo, compatibility, hasExampl ].join('\n')} )} + {labels && ( + +

+ The statistical components included in this model package assign the + following labels. The labels are specific to the corpus that the model was + trained on. To see the description of a label, you can use{' '} + + spacy.explain + + . +

+ + + {Object.keys(labels).map(pipe => { + const labelNames = labels[pipe] || [] + const help = LABEL_SCHEME_META[pipe] + return ( + + + + + ) + })} + +
+ + + {labelNames.map((label, i) => ( + <> + {i > 0 && ', '} + + {label} + + + ))} +
+
+ )} ) }