mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-01 00:17:44 +03:00 
			
		
		
		
	Update universe details spacy_conll (#5871)
This commit is contained in:
		
							parent
							
								
									296f8b65b4
								
							
						
					
					
						commit
						d7926de1e5
					
				|  | @ -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"], | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user