Add version tag mixin to label new features

This commit is contained in:
ines 2017-05-26 12:42:36 +02:00
parent 10ca6d1507
commit ea9474f71c
9 changed files with 31 additions and 1 deletions

View File

@ -178,7 +178,7 @@ mixin label()
//- Tag
mixin tag()
span.u-text-tag.u-text-tag--spaced(aria-hidden="true")
span.u-text-tag.u-text-tag--spaced(aria-hidden="true")&attributes(attributes)
block
@ -192,6 +192,17 @@ mixin tag-model(...capabs)
+help(intro + ext + ".").u-color-theme
//- "New" tag to label features new in a specific version
By using a separate mixin with a version ID, it becomes easy to quickly
enable/disable tags without having to modify the markup in the docs.
version - [string or integer] version number, without "v" prefix
mixin tag-new(version)
- var version = (typeof version == 'number') ? version.toFixed(1) : version
+tag(data-tooltip="This feature is new and was introduced in spaCy v#{version}.")
| v#{version}
//- List
type - [string] "numbers", "letters", "roman" (bulleted list if none set)
start - [integer] start number

View File

@ -10,6 +10,7 @@ p
+h(2, "serve") displacy.serve
+tag method
+tag-new(2)
p
| Serve a dependency parse tree or named entity visualization to view it
@ -71,6 +72,7 @@ p
+h(2, "render") displacy.render
+tag method
+tag-new(2)
p Render a dependency parse tree or named entity visualization.

View File

@ -255,6 +255,7 @@ p
+h(2, "to_disk") Doc.to_disk
+tag method
+tag-new(2)
p Save the current state to a directory.
@ -271,6 +272,7 @@ p Save the current state to a directory.
+h(2, "from_disk") Doc.from_disk
+tag method
+tag-new(2)
p Loads state from a directory. Modifies the object in place and returns it.

View File

@ -8,6 +8,7 @@ p
+h(2, "init") GoldCorpus.__init__
+tag method
+tag-new(2)
p Create a #[code GoldCorpus].

View File

@ -118,6 +118,7 @@ p Match a stream of documents, yielding them in turn.
+h(2, "len") Matcher.__len__
+tag method
+tag-new(2)
p
| Get the number of rules added to the matcher. Note that this only returns
@ -138,6 +139,7 @@ p
+h(2, "contains") Matcher.__contains__
+tag method
+tag-new(2)
p Check whether the matcher contains rules for a match ID.
@ -159,6 +161,7 @@ p Check whether the matcher contains rules for a match ID.
+h(2, "add") Matcher.add
+tag method
+tag-new(2)
p
| Add a rule to the matcher, consisting of an ID key, one or more patterns, and
@ -200,6 +203,7 @@ p
+h(2, "remove") Matcher.remove
+tag method
+tag-new(2)
p
| Remove a rule from the matcher. A #[code KeyError] is raised if the match
@ -219,6 +223,7 @@ p
+h(2, "get") Matcher.get
+tag method
+tag-new(2)
p
| Retrieve the pattern stored for a key. Returns the rule as an

View File

@ -104,6 +104,7 @@ p
+h(2, "to_disk") StringStore.to_disk
+tag method
+tag-new(2)
p Save the current state to a directory.
@ -120,6 +121,7 @@ p Save the current state to a directory.
+h(2, "from_disk") Tokenizer.from_disk
+tag method
+tag-new(2)
p Loads state from a directory. Modifies the object in place and returns it.

View File

@ -200,6 +200,7 @@ p
+h(2, "to_disk") Tokenizer.to_disk
+tag method
+tag-new(2)
p Save the current state to a directory.
@ -216,6 +217,7 @@ p Save the current state to a directory.
+h(2, "from_disk") Tokenizer.from_disk
+tag method
+tag-new(2)
p Loads state from a directory. Modifies the object in place and returns it.

View File

@ -76,6 +76,7 @@ p
+h(2, "resolve_model_path") util.resolve_model_path
+tag function
+tag-new(2)
p Resolve a model name or string to a model path.
@ -169,6 +170,7 @@ p
+h(2, "is_in_jupyter") util.is_in_jupyter
+tag function
+tag-new(2)
p
| Check if user is running spaCy from a #[+a("https://jupyter.org") Jupyter]
@ -221,6 +223,7 @@ p
+h(2, "prints") util.prints
+tag function
+tag-new(2)
p
| Print a formatted, text-wrapped message with optional title. If a text

View File

@ -159,6 +159,7 @@ p
+h(2, "to_disk") Vocab.to_disk
+tag method
+tag-new(2)
p Save the current state to a directory.
@ -175,6 +176,7 @@ p Save the current state to a directory.
+h(2, "from_disk") Vocab.from_disk
+tag method
+tag-new(2)
p Loads state from a directory. Modifies the object in place and returns it.