mirror of https://github.com/explosion/spaCy.git
Add +tag-model mixin to label functionality that requires model
Usage: +tag-model("vectors")
This commit is contained in:
parent
a804045597
commit
ce095fdcde
|
@ -164,6 +164,16 @@ mixin tag()
|
||||||
block
|
block
|
||||||
|
|
||||||
|
|
||||||
|
//- "Requires model" tag with tooltip and list of capabilities
|
||||||
|
...capabs - [string] Required model capabilities, e.g. "vectors".
|
||||||
|
|
||||||
|
mixin tag-model(...capabs)
|
||||||
|
- var intro = "To use this functionality, spaCy needs a model to be installed"
|
||||||
|
- var ext = capabs ? " that supports the following capabilities: " + capabs.join(', ') : ""
|
||||||
|
+tag Requires model
|
||||||
|
+help(intro + ext + ".").u-color-theme
|
||||||
|
|
||||||
|
|
||||||
//- List
|
//- List
|
||||||
type - [string] "numbers", "letters", "roman" (bulleted list if none set)
|
type - [string] "numbers", "letters", "roman" (bulleted list if none set)
|
||||||
start - [integer] start number
|
start - [integer] start number
|
||||||
|
|
Loading…
Reference in New Issue