spacy-coptic


Namespacy-coptic JSON
Version 0.8.1 PyPI version JSON
download
home_pagehttps://github.com/KoichiYasuoka/spaCy-Coptic
SummaryCoptic NLP wrapper for spaCy
upload_time2024-11-20 05:21:17
maintainerNone
docs_urlNone
authorKoichi Yasuoka
requires_python>=3.6
licenseMIT
keywords coptic 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-coptic.svg)](https://pypi.org/project/spacy-coptic/)

# spaCy-Coptic

[Coptic NLP](https://corpling.uis.georgetown.edu/coptic-nlp/) wrapper for [spaCy](https://spacy.io)

## Basic Usage

```py
>>> import spacy_coptic
>>> nlp=spacy_coptic.load()
>>> doc=nlp("ⲙⲟⲟϣⲉ ϩⲱⲥ ϣⲏⲣⲉ ⲙ̄ⲡⲟⲩⲟⲉⲓⲛ")
>>> 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	ⲙⲟⲟϣⲉ	ⲙⲟⲟϣⲉ	VERB	V	_	0	ROOT	_	_
2	ϩⲱⲥ	ϩⲱⲥ	CCONJ	CONJ	_	3	mark	_	_
3	ϣⲏⲣⲉ	ϣⲏⲣⲉ	NOUN	N	_	1	advcl	_	_
4	ⲙ̄	ⲛ	ADP	PREP	_	6	case	_	SpaceAfter=No
5	ⲡ	ⲡ	DET	ART	_	6	det	_	SpaceAfter=No
6	ⲟⲩⲟⲉⲓⲛ	ⲟⲩⲟⲉⲓⲛ	NOUN	N	_	3	nmod	_	_
>>> import deplacy
>>> deplacy.render(doc,WordRight=True)
 ROOT ╔═════════ VERB  ⲙⲟⲟϣⲉ
 mark ║ ╔══════> CCONJ ϩⲱⲥ
advcl ╚>╚═╔═════ NOUN  ϣⲏⲣⲉ
 case     ║ ╔══> ADP   ⲙ̄
  det     ║ ║ ╔> DET   ⲡ
 nmod     ╚>╚═╚═ NOUN  ⲟⲩⲟⲉⲓⲛ
```

`spacy_coptic.load(api)` loads spaCy Language pipeline for Coptic NLP WebAPI. If you have already installed [coptic-nlp](https://github.com/CopticScriptorium/coptic-nlp) and you have `coptic_nlp.py` in the current directory, you can try the pipeline locally just as:

```py
>>> import spacy_coptic
>>> from coptic_nlp import nlp_coptic
>>> nlp=spacy_coptic.load(nlp_coptic)
>>> doc=nlp("ⲙⲟⲟϣⲉ ϩⲱⲥ ϣⲏⲣⲉ ⲙ̄ⲡⲟⲩⲟⲉⲓⲛ")
```

## Installation

```sh
pip3 install spacy_coptic --user
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/KoichiYasuoka/spaCy-Coptic",
    "name": "spacy-coptic",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "Coptic 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-coptic.svg)](https://pypi.org/project/spacy-coptic/)\n\n# spaCy-Coptic\n\n[Coptic NLP](https://corpling.uis.georgetown.edu/coptic-nlp/) wrapper for [spaCy](https://spacy.io)\n\n## Basic Usage\n\n```py\n>>> import spacy_coptic\n>>> nlp=spacy_coptic.load()\n>>> doc=nlp(\"\u2c99\u2c9f\u2c9f\u03e3\u2c89 \u03e9\u2cb1\u2ca5 \u03e3\u2c8f\u2ca3\u2c89 \u2c99\u0304\u2ca1\u2c9f\u2ca9\u2c9f\u2c89\u2c93\u2c9b\")\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\t\u2c99\u2c9f\u2c9f\u03e3\u2c89\t\u2c99\u2c9f\u2c9f\u03e3\u2c89\tVERB\tV\t_\t0\tROOT\t_\t_\n2\t\u03e9\u2cb1\u2ca5\t\u03e9\u2cb1\u2ca5\tCCONJ\tCONJ\t_\t3\tmark\t_\t_\n3\t\u03e3\u2c8f\u2ca3\u2c89\t\u03e3\u2c8f\u2ca3\u2c89\tNOUN\tN\t_\t1\tadvcl\t_\t_\n4\t\u2c99\u0304\t\u2c9b\tADP\tPREP\t_\t6\tcase\t_\tSpaceAfter=No\n5\t\u2ca1\t\u2ca1\tDET\tART\t_\t6\tdet\t_\tSpaceAfter=No\n6\t\u2c9f\u2ca9\u2c9f\u2c89\u2c93\u2c9b\t\u2c9f\u2ca9\u2c9f\u2c89\u2c93\u2c9b\tNOUN\tN\t_\t3\tnmod\t_\t_\n>>> import deplacy\n>>> deplacy.render(doc,WordRight=True)\n ROOT \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 VERB  \u2c99\u2c9f\u2c9f\u03e3\u2c89\n mark \u2551 \u2554\u2550\u2550\u2550\u2550\u2550\u2550> CCONJ \u03e9\u2cb1\u2ca5\nadvcl \u255a>\u255a\u2550\u2554\u2550\u2550\u2550\u2550\u2550 NOUN  \u03e3\u2c8f\u2ca3\u2c89\n case     \u2551 \u2554\u2550\u2550> ADP   \u2c99\u0304\n  det     \u2551 \u2551 \u2554> DET   \u2ca1\n nmod     \u255a>\u255a\u2550\u255a\u2550 NOUN  \u2c9f\u2ca9\u2c9f\u2c89\u2c93\u2c9b\n```\n\n`spacy_coptic.load(api)` loads spaCy Language pipeline for Coptic NLP WebAPI. If you have already installed [coptic-nlp](https://github.com/CopticScriptorium/coptic-nlp) and you have `coptic_nlp.py` in the current directory, you can try the pipeline locally just as:\n\n```py\n>>> import spacy_coptic\n>>> from coptic_nlp import nlp_coptic\n>>> nlp=spacy_coptic.load(nlp_coptic)\n>>> doc=nlp(\"\u2c99\u2c9f\u2c9f\u03e3\u2c89 \u03e9\u2cb1\u2ca5 \u03e3\u2c8f\u2ca3\u2c89 \u2c99\u0304\u2ca1\u2c9f\u2ca9\u2c9f\u2c89\u2c93\u2c9b\")\n```\n\n## Installation\n\n```sh\npip3 install spacy_coptic --user\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Coptic NLP wrapper for spaCy",
    "version": "0.8.1",
    "project_urls": {
        "Homepage": "https://github.com/KoichiYasuoka/spaCy-Coptic",
        "Source": "https://github.com/KoichiYasuoka/spaCy-Coptic",
        "Tracker": "https://github.com/KoichiYasuoka/spaCy-Coptic/issues",
        "coptic-nlp": "https://github.com/CopticScriptorium/coptic-nlp"
    },
    "split_keywords": [
        "coptic",
        "spacy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "15c3f919acbc4d23baec453608b5beb74343adcc0061609ccbfd62c23279fc70",
                "md5": "1cc3703cda64d1180511427f1cb3a1ca",
                "sha256": "7c897c576165b0c5409059e0cc9f64333ed0fe2af3cabfad94c49cd4e78f26da"
            },
            "downloads": -1,
            "filename": "spacy_coptic-0.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1cc3703cda64d1180511427f1cb3a1ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4920,
            "upload_time": "2024-11-20T05:21:17",
            "upload_time_iso_8601": "2024-11-20T05:21:17.195973Z",
            "url": "https://files.pythonhosted.org/packages/15/c3/f919acbc4d23baec453608b5beb74343adcc0061609ccbfd62c23279fc70/spacy_coptic-0.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 05:21:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KoichiYasuoka",
    "github_project": "spaCy-Coptic",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spacy-coptic"
}
        
Elapsed time: 0.43015s