Update universe details spacy_conll (#5871)

This commit is contained in:
Bram Vanroy 2020-08-05 14:34:12 +02:00 committed by GitHub
parent c62fd878a3
commit 9e45d064bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 12 deletions

View File

@ -1795,26 +1795,33 @@
{ {
"id": "spacy-conll", "id": "spacy-conll",
"title": "spacy_conll", "title": "spacy_conll",
"slogan": "Parse text with spaCy and gets its output in CoNLL-U format", "slogan": "Parsing to CoNLL with spaCy, spacy-stanza, and spacy-udpipe",
"description": "This module allows you to parse a text to CoNLL-U format. It contains a pipeline component for spaCy that adds CoNLL-U properties to a Doc and its sentences. It can also be used as a command-line tool.", "description": "This module allows you to parse text into CoNLL-U format. You can use it as a command line tool, or embed it in your own scripts by adding it as a custom pipeline component to a spaCy, spacy-stanfordnlp, spacy-stanza, or spacy-udpipe pipeline. It also provides an easy-to-use function to quickly initialize a parser. CoNLL-related properties are added to Doc elements, sentence Spans, and Tokens.",
"code_example": [ "code_example": [
"import spacy", "from spacy_conll import init_parser",
"from spacy_conll import ConllFormatter",
"", "",
"nlp = spacy.load('en')", "",
"conllformatter = ConllFormatter(nlp)", "# Initialise English parser, already including the ConllFormatter as a pipeline component.",
"nlp.add_pipe(conllformatter, after='parser')", "# Indicate that we want to get the CoNLL headers in the string output.",
"doc = nlp('I like cookies. Do you?')", "# `use_gpu` and `verbose` are specific to stanza (and stanfordnlp). These keywords arguments",
"conll = doc._.conll", "# are passed onto their Pipeline() initialisation",
"print(doc._.conll_str_headers)", "nlp = init_parser(\"stanza\",",
"print(doc._.conll_str)" " \"en\",",
" parser_opts={\"use_gpu\": True, \"verbose\": False},",
" include_headers=True)",
"# Parse a given string",
"doc = nlp(\"A cookie is a baked or cooked food that is typically small, flat and sweet. It usually contains flour, sugar and some type of oil or fat.\")",
"",
"# Get the CoNLL representation of the whole document, including headers",
"conll = doc._.conll_str",
"print(conll)"
], ],
"code_language": "python", "code_language": "python",
"author": "Bram Vanroy", "author": "Bram Vanroy",
"author_links": { "author_links": {
"github": "BramVanroy", "github": "BramVanroy",
"twitter": "BramVanroy", "twitter": "BramVanroy",
"website": "https://bramvanroy.be" "website": "http://bramvanroy.be"
}, },
"github": "BramVanroy/spacy_conll", "github": "BramVanroy/spacy_conll",
"category": ["standalone", "pipeline"], "category": ["standalone", "pipeline"],