spacy-combo


Namespacy-combo JSON
Version 0.8.1 PyPI version JSON
download
home_pagehttps://github.com/KoichiYasuoka/spaCy-COMBO
SummaryCOMBO wrapper for spaCy
upload_time2024-11-20 03:31:13
maintainerNone
docs_urlNone
authorKoichi Yasuoka
requires_python>=3.6
licenseMIT
keywords nlp combo spacy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Current PyPI packages](https://badge.fury.io/py/spacy-combo.svg)](https://pypi.org/project/spacy-combo/)

# spaCy-COMBO

[COMBO](https://github.com/360er0/COMBO) wrapper for [spaCy](https://spacy.io)

## Basic Usage

```py
>>> 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](https://github.com/360er0/COMBO#trained-models).

## Installation

pip version 20.0 (or higher) required:

```sh
pip install spacy_combo
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/KoichiYasuoka/spaCy-COMBO",
    "name": "spacy-combo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "NLP COMBO spaCy",
    "author": "Koichi Yasuoka",
    "author_email": "yasuoka@kanji.zinbun.kyoto-u.ac.jp",
    "download_url": null,
    "platform": null,
    "description": "[![Current PyPI packages](https://badge.fury.io/py/spacy-combo.svg)](https://pypi.org/project/spacy-combo/)\n\n# spaCy-COMBO\n\n[COMBO](https://github.com/360er0/COMBO) wrapper for [spaCy](https://spacy.io)\n\n## Basic Usage\n\n```py\n>>> import spacy_combo\n>>> nlp=spacy_combo.load(\"en_ewt\")\n>>> doc=nlp(\"I saw a horse yesterday which had no name.\")\n>>> for t in doc:\n...   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\"]))\n...\n1\tI\tI\tPRON\tPRON_Case=Nom|Number=Sing|Person=1|PronType=Prs\t_\t2\tnsubj\t_\t_\n2\tsaw\tsee\tVERB\tVERB_Mood=Ind|Tense=Past|VerbForm=Fin\t_\t0\tROOT\t_\t_\n3\ta\ta\tDET\tDET_Definite=Ind|PronType=Art\t_\t4\tdet\t_\t_\n4\thorse\thorse\tNOUN\tNOUN_Number=Sing\t_\t2\tobj\t_\t_\n5\tyesterday\tyesterday\tNOUN\tNOUN_Number=Sing\t_\t2\tobl:tmod\t_\t_\n6\twhich\twhich\tPRON\tPRON_PronType=Rel\t_\t7\tnsubj\t_\t_\n7\thad\thave\tVERB\tVERB_Mood=Ind|Tense=Past|VerbForm=Fin\t_\t4\tacl:relcl\t_\t_\n8\tno\tno\tDET\tDET\t_\t9\tdet\t_\t_\n9\tname\tname\tNOUN\tNOUN_Number=Sing\t_\t7\tobj\t_\tSpaceAfter=No\n10\t.\t.\tPUNCT\tPUNCT\t_\t2\tpunct\t_\tSpaceAfter=No\n>>> import deplacy\n>>> deplacy.render(doc)\nI         PRON  <\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557   nsubj\nsaw       VERB  \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\u2550\u2557\u2550\u255d\u2550\u2557 ROOT\na         DET   <\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557 \u2551 \u2551   \u2551 det\nhorse     NOUN  \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\u2550\u255d<\u255d \u2551   \u2551 obj\nyesterday NOUN  <\u2550\u2550\u2550\u2550\u2550\u2550\u2551\u2550\u2550\u2550\u2550\u2550\u255d   \u2551 obl:tmod\nwhich     PRON  <\u2550\u2550\u2550\u2550\u2557 \u2551         \u2551 nsubj\nhad       VERB  \u2550\u2550\u2550\u2557\u2550\u255d<\u255d         \u2551 acl:relcl\nno        DET   <\u2557 \u2551             \u2551 det\nname      NOUN  \u2550\u255d<\u255d             \u2551 obj\n.         PUNCT <\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d punct\n```\n\n`spacy_combo.load(treebank)` loads spaCy Language pipeline for COMBO. Available treebanks are shown in [COMBO page](https://github.com/360er0/COMBO#trained-models).\n\n## Installation\n\npip version 20.0 (or higher) required:\n\n```sh\npip install spacy_combo\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "COMBO wrapper for spaCy",
    "version": "0.8.1",
    "project_urls": {
        "COMBO": "https://github.com/360er0/COMBO",
        "Homepage": "https://github.com/KoichiYasuoka/spaCy-COMBO",
        "Source": "https://github.com/KoichiYasuoka/spaCy-COMBO",
        "Tracker": "https://github.com/KoichiYasuoka/spaCy-COMBO/issues"
    },
    "split_keywords": [
        "nlp",
        "combo",
        "spacy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55685a23f8caede487ee189732e237c2f4fcd73f784c3a8bfc7585d8c0e850c8",
                "md5": "77f7969cd6011569f4c98b8889e2b72a",
                "sha256": "88128fa5857d70d70a436e199dd8a4109eee18a057b8703706439530e80842c2"
            },
            "downloads": -1,
            "filename": "spacy_combo-0.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77f7969cd6011569f4c98b8889e2b72a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 19090,
            "upload_time": "2024-11-20T03:31:13",
            "upload_time_iso_8601": "2024-11-20T03:31:13.710931Z",
            "url": "https://files.pythonhosted.org/packages/55/68/5a23f8caede487ee189732e237c2f4fcd73f784c3a8bfc7585d8c0e850c8/spacy_combo-0.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 03:31:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KoichiYasuoka",
    "github_project": "spaCy-COMBO",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spacy-combo"
}
        
Elapsed time: 0.40809s