mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 05:37:03 +03:00
e597110d31
<!--- Provide a general summary of your changes in the title. --> ## Description The new website is implemented using [Gatsby](https://www.gatsbyjs.org) with [Remark](https://github.com/remarkjs/remark) and [MDX](https://mdxjs.com/). This allows authoring content in **straightforward Markdown** without the usual limitations. Standard elements can be overwritten with powerful [React](http://reactjs.org/) components and wherever Markdown syntax isn't enough, JSX components can be used. Hopefully, this update will also make it much easier to contribute to the docs. Once this PR is merged, I'll implement auto-deployment via [Netlify](https://netlify.com) on a specific branch (to avoid building the website on every PR). There's a bunch of other cool stuff that the new setup will allow us to do – including writing front-end tests, service workers, offline support, implementing a search and so on. This PR also includes various new docs pages and content. Resolves #3270. Resolves #3222. Resolves #2947. Resolves #2837. ### Types of change enhancement ## Checklist <!--- Before you submit the PR, go over this checklist and make sure you can tick off all the boxes. [] -> [x] --> - [x] I have submitted the spaCy Contributor Agreement. - [x] I ran the tests, and all new and existing tests passed. - [x] My changes don't require a change to the documentation, or if they do, I've added all required information.
25 lines
1.1 KiB
Markdown
25 lines
1.1 KiB
Markdown
---
|
|
title: GoldCorpus
|
|
teaser: An annotated corpus, using the JSON file format
|
|
tag: class
|
|
source: spacy/gold.pyx
|
|
new: 2
|
|
---
|
|
|
|
This class manages annotations for tagging, dependency parsing and NER.
|
|
|
|
## GoldCorpus.\_\_init\_\_ {#init tag="method"}
|
|
|
|
Create a `GoldCorpus`. IF the input data is an iterable, each item should be a
|
|
`(text, paragraphs)` tuple, where each paragraph is a tuple
|
|
`(sentences, brackets)`, and each sentence is a tuple
|
|
`(ids, words, tags, heads, ner)`. See the implementation of
|
|
[`gold.read_json_file`](https://github.com/explosion/spaCy/tree/master/spacy/gold.pyx)
|
|
for further details.
|
|
|
|
| Name | Type | Description |
|
|
| ----------- | --------------------------- | ------------------------------------------------------------ |
|
|
| `train` | unicode / `Path` / iterable | Training data, as a path (file or directory) or iterable. |
|
|
| `dev` | unicode / `Path` / iterable | Development data, as a path (file or directory) or iterable. |
|
|
| **RETURNS** | `GoldCorpus` | The newly constructed object. |
|