diff --git a/website/_includes/_page-docs.jade b/website/_includes/_page-docs.jade index ec2751c4d..26b82381f 100644 --- a/website/_includes/_page-docs.jade +++ b/website/_includes/_page-docs.jade @@ -6,9 +6,17 @@ include _sidebar main.o-main.o-main--sidebar.o-main--aside article.o-content - +h(1)=title - if tag - +tag=tag + +grid.o-no-block + +grid-col(source ? "two-thirds" : "full") + +h(1)=title + if tag + +tag=tag + + if source + +grid-col("third").u-text-right + .o-inline-list + +button(gh("spacy", source), false, "secondary").u-text-tag Source #[+icon("code", 14)] + if ALPHA +infobox("⚠️ You are viewing the spaCy v2.0 alpha docs") diff --git a/website/docs/api/_data.json b/website/docs/api/_data.json index f3f996846..f6a6a7e31 100644 --- a/website/docs/api/_data.json +++ b/website/docs/api/_data.json @@ -24,7 +24,8 @@ "Vocab": "vocab", "StringStore": "stringstore", "GoldParse": "goldparse", - "GoldCorpus": "goldcorpus" + "GoldCorpus": "goldcorpus", + "Binder": "binder" }, "Other": { "Annotation Specs": "annotation" @@ -47,62 +48,74 @@ "spacy": { "title": "spaCy top-level functions", + "source": "spacy/__init__.py", "next": "displacy" }, "displacy": { "title": "displaCy", "tag": "module", + "source": "spacy/displacy", "next": "util" }, "util": { "title": "Utility Functions", + "source": "spacy/util.py", "next": "cli" }, "cli": { - "title": "Command Line Interface" + "title": "Command Line Interface", + "source": "spacy/cli" }, "language": { "title": "Language", - "tag": "class" + "tag": "class", + "source": "spacy/language.py" }, "doc": { "title": "Doc", - "tag": "class" + "tag": "class", + "source": "spacy/tokens/doc.pyx" }, "token": { "title": "Token", - "tag": "class" + "tag": "class", + "source": "spacy/tokens/token.pyx" }, "span": { "title": "Span", - "tag": "class" + "tag": "class", + "source": "spacy/tokens/span.pyx" }, "lexeme": { "title": "Lexeme", - "tag": "class" + "tag": "class", + "source": "spacy/lexeme.pyx" }, "vocab": { "title": "Vocab", - "tag": "class" + "tag": "class", + "source": "spacy/vocab.pyx" }, "stringstore": { "title": "StringStore", - "tag": "class" + "tag": "class", + "source": "spacy/strings.pyx" }, "matcher": { "title": "Matcher", - "tag": "class" + "tag": "class", + "source": "spacy/matcher.pyx" }, "dependenyparser": { @@ -122,7 +135,8 @@ "tokenizer": { "title": "Tokenizer", - "tag": "class" + "tag": "class", + "source": "spacy/tokenizer.pyx" }, "tagger": { @@ -132,11 +146,18 @@ "goldparse": { "title": "GoldParse", - "tag": "class" + "tag": "class", + "source": "spacy/gold.pyx" }, "goldcorpus": { "title": "GoldCorpus", + "tag": "class", + "source": "spacy/gold.pyx" + }, + + "binder": { + "title": "Binder", "tag": "class" }, diff --git a/website/docs/api/binder.jade b/website/docs/api/binder.jade new file mode 100644 index 000000000..5e3e7d36c --- /dev/null +++ b/website/docs/api/binder.jade @@ -0,0 +1,5 @@ +//- 💫 DOCS > API > BINDER + +include ../../_includes/_mixins + ++under-construction diff --git a/website/docs/api/language.jade b/website/docs/api/language.jade index a22bee5f1..9e45a89d9 100644 --- a/website/docs/api/language.jade +++ b/website/docs/api/language.jade @@ -382,6 +382,11 @@ p Load state from a binary string. +cell #[code Vocab] +cell A container for the lexical types. + +row + +cell #[code tokenizer] + +cell #[code Tokenizer] + +cell The tokenizer. + +row +cell #[code make_doc] +cell #[code lambda text: Doc] diff --git a/website/docs/api/tokenizer.jade b/website/docs/api/tokenizer.jade index 87e1ac81e..8d933f75b 100644 --- a/website/docs/api/tokenizer.jade +++ b/website/docs/api/tokenizer.jade @@ -198,93 +198,6 @@ p | attributes. The #[code ORTH] fields of the attributes must | exactly match the string when they are concatenated. -+h(2, "to_disk") Tokenizer.to_disk - +tag method - +tag-new(2) - -p Save the current state to a directory. - -+aside-code("Example"). - tokenizer.to_disk('/path/to/tokenizer') - -+table(["Name", "Type", "Description"]) - +row - +cell #[code path] - +cell unicode or #[code Path] - +cell - | A path to a directory, which will be created if it doesn't exist. - | Paths may be either strings or #[code Path]-like objects. - -+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. - -+aside-code("Example"). - from spacy.tokenizer import Tokenizer - tokenizer = Tokenizer(nlp.vocab) - tokenizer = tokenizer.from_disk('/path/to/tokenizer') - -+table(["Name", "Type", "Description"]) - +row - +cell #[code path] - +cell unicode or #[code Path] - +cell - | A path to a directory. Paths may be either strings or - | #[code Path]-like objects. - - +footrow - +cell returns - +cell #[code Tokenizer] - +cell The modified #[code Tokenizer] object. - -+h(2, "to_bytes") Tokenizer.to_bytes - +tag method - -p Serialize the current state to a binary string. - -+aside-code("Example"). - tokenizer_bytes = tokenizer.to_bytes() - -+table(["Name", "Type", "Description"]) - +row - +cell #[code **exclude] - +cell - - +cell Named attributes to prevent from being serialized. - - +footrow - +cell returns - +cell bytes - +cell The serialized form of the #[code Tokenizer] object. - -+h(2, "from_bytes") Tokenizer.from_bytes - +tag method - -p Load state from a binary string. - -+aside-code("Example"). - fron spacy.tokenizer import Tokenizer - tokenizer_bytes = tokenizer.to_bytes() - new_tokenizer = Tokenizer(nlp.vocab) - new_tokenizer.from_bytes(tokenizer_bytes) - -+table(["Name", "Type", "Description"]) - +row - +cell #[code bytes_data] - +cell bytes - +cell The data to load from. - - +row - +cell #[code **exclude] - +cell - - +cell Named attributes to prevent from being loaded. - - +footrow - +cell returns - +cell #[code Tokenizer] - +cell The #[code Tokenizer] object. - +h(2, "attributes") Attributes +table(["Name", "Type", "Description"])