Skip to main content

COMBO wrapper for spaCy

Project description

Current PyPI packages

spaCy-COMBO

COMBO wrapper for spaCy

Basic Usage

>>> import spacy_combo
>>> nlp=spacy_combo.load("en_ewt")
>>> doc=nlp("I saw a horse yesterday which had no name.")
>>> for t in doc:
...   print("\t".join([str(t.i+1),t.orth_,t.lemma_,t.pos_,t.tag_,"_",str(0 if t.head==t else t.head.i+1),t.dep_,"_","_" if t.whitespace_ else "SpaceAfter=No"]))
...
1	I	I	PRON	PRON_Case=Nom|Number=Sing|Person=1|PronType=Prs	_	2	nsubj	_	_
2	saw	see	VERB	VERB_Mood=Ind|Tense=Past|VerbForm=Fin	_	0	ROOT	_	_
3	a	a	DET	DET_Definite=Ind|PronType=Art	_	4	det	_	_
4	horse	horse	NOUN	NOUN_Number=Sing	_	2	obj	_	_
5	yesterday	yesterday	NOUN	NOUN_Number=Sing	_	2	obl:tmod	_	_
6	which	which	PRON	PRON_PronType=Rel	_	7	nsubj	_	_
7	had	have	VERB	VERB_Mood=Ind|Tense=Past|VerbForm=Fin	_	4	acl:relcl	_	_
8	no	no	DET	DET	_	9	det	_	_
9	name	name	NOUN	NOUN_Number=Sing	_	7	obj	_	SpaceAfter=No
10	.	.	PUNCT	PUNCT	_	2	punct	_	SpaceAfter=No
>>> import deplacy
>>> deplacy.render(doc)
I         PRON  <══════════════╗   nsubj
saw       VERB  ═══════════╗═╗═╝═╗ ROOT
a         DET   <════════╗      det
horse     NOUN  ═══════╗═╝<     obj
yesterday NOUN  <══════║═════╝    obl:tmod
which     PRON  <════╗           nsubj
had       VERB  ═══╗═╝<          acl:relcl
no        DET   <               det
name      NOUN  ═╝<              obj
.         PUNCT <════════════════╝ punct

spacy_combo.load(treebank) loads spaCy Language pipeline for COMBO. Available treebanks are shown in COMBO page.

Installation

pip version 20.0 (or higher) required:

pip install spacy_combo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spacy_combo-0.5.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file spacy_combo-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: spacy_combo-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.44.0 CPython/3.7.6

File hashes

Hashes for spacy_combo-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 370ceca5c35b8b8d7b6df479f6a6dda6b2651f8e459610baf1acd2b94010abe4
MD5 525b8f17be4abb1e2edb0882a6119901
BLAKE2b-256 4d02b2040f707423d1f9acaa524f6711c6e0587e57066dbaa29d6fbc8d35b2fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page