spacy-ixakat


Namespacy-ixakat JSON
Version 0.6.8 PyPI version JSON
download
home_pagehttps://github.com/KoichiYasuoka/spaCy-ixaKat
SummaryixaKat wrapper for spaCy
upload_time2024-07-30 01:12:52
maintainerNone
docs_urlNone
authorKoichi Yasuoka
requires_python>=3.6
licenseMIT
keywords ixakat 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-ixakat.svg)](https://pypi.org/project/spacy-ixakat/)

# spaCy-ixaKat

[ixaKat](http://ixa2.si.ehu.es/ixakat/ixa-pipe-dep-eu.php) wrapper for [spaCy](https://spacy.io)

## Basic Usage

```py
>>> import spacy_ixakat
>>> nlp=spacy_ixakat.load()
>>> doc=nlp("Euskaldun izatea lan extra bat izatea da.")
>>> 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	Euskaldun	euskaldun	PROPN	ADJ	_	2	obl	_	_
2	izatea	izan	VERB	ADI_SIN	_	7	csubj	_	_
3	lan	lan	NOUN	IZE_ARR	_	6	obl	_	_
4	extra	extra	NOUN	ADJ	_	3	nmod	_	_
5	bat	bat	NUM	DET_DZH	_	3	nummod	_	_
6	izatea	izate	VERB	IZE_ARR	_	7	ccomp	_	_
7	da	izan	VERB	ADT	_	0	ROOT	_	SpaceAfter=No
8	.	.	PUNCT	PUNT_PUNT	_	7	punct	_	_
>>> import deplacy
>>> deplacy.render(doc)
Euskaldun PROPN <╗           obl
izatea    VERB  ═╝<══════╗   csubj
lan       NOUN  ═╗═╗<╗   ║   obl
extra     NOUN  <╝ ║ ║   ║   nmod
bat       NUM   <══╝ ║   ║   nummod
izatea    VERB  ═════╝<╗ ║   ccomp
da        VERB  ═══════╝═╝═╗ ROOT
.         PUNCT <══════════╝ punct
```

`spacy_ixakat.load(convUD=True)` loads spaCy Language pipeline for ixaKat. `convUD=False` disables the conversion into Universal Dependencies and forces the pipeline to return `str` of CoNLL.

```py
>>> import spacy_ixakat
>>> nlp=spacy_ixakat.load(convUD=False)
>>> doc=nlp("Euskaldun izatea lan extra bat izatea da.")
>>> print(doc)
1	Euskaldun	euskaldun	ADJ	ADJ	KAS=ZERO|CLUSTER=01010111|CLUSTERM=0101|ATZIZKIA=Null	2	ncmod	_	_
2	izatea	izan	ADI	ADI_SIN	KAS=ABS|ERL=KONPL|ADM=ADIZE|CLUSTER=0110100|CLUSTERM=0110|ATZIZKIA=Null	7	xcomp_subj	_	_
3	lan	lan	IZE	IZE_ARR	KAS=ZERO|CLUSTER=1011110111010|CLUSTERM=1011|ATZIZKIA=Null	6	ncmod	_	_
4	extra	extra	ADJ	ADJ	KAS=ZERO|CLUSTER=01111110100|CLUSTERM=0111|ATZIZKIA=Null	3	ncmod	_	_
5	bat	bat	DET	DET_DZH	CLUSTER=1011010|CLUSTERM=1011|ATZIZKIA=Null	3	detmod	_	_
6	izatea	izate	IZE	IZE_ARR	KAS=ABS|NUM=S|CLUSTER=0110100|CLUSTERM=0110|ATZIZKIA=a	7	ncpred	_	_
7	da	izan	ADT	ADT	ASP=PNT|MDN=A1|DADUDIO=NOR|NOR=HURA|CLUSTER=0110100|CLUSTERM=0110|ATZIZKIA=Null	0	ROOT	_	SpaceAfter=No
8	.	.	PUNT	PUNT_PUNT	_	7	PUNC	_	_


>>> import deplacy
>>> deplacy.render(doc)
Euskaldun ADJ  <╗         ncmod
izatea    ADI  ═╝<══════╗ xcomp_subj
lan       IZE  ═╗═╗<╗   ║ ncmod
extra     ADJ  <╝ ║ ║   ║ ncmod
bat       DET  <══╝ ║   ║ detmod
izatea    IZE  ═════╝<╗ ║ ncpred
da        ADT  ═╗═════╝═╝ ROOT
.         PUNT <╝         PUNC
```

## Installation for Linux (Debian, Ubuntu, Kali)

```sh
sudo apt update
sudo apt install python3-pip python3-dev default-jre-headless curl libncursesw5
pip3 install spacy_ixakat --user
```

## Installation for Linux (CentOS)

```sh
sudo yum update
sudo yum install python3-pip python3-devel java-1.8.0-openjdk-headless curl ncurses
pip3 install spacy_ixakat --user
```

## Installation for Google Colaboratory

Try [notebook](https://colab.research.google.com/github/KoichiYasuoka/spaCy-ixaKat/blob/master/spacy_ixakat.ipynb).


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/KoichiYasuoka/spaCy-ixaKat",
    "name": "spacy-ixakat",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "ixaKat spaCy",
    "author": "Koichi Yasuoka",
    "author_email": "yasuoka@kanji.zinbun.kyoto-u.ac.jp",
    "download_url": "https://files.pythonhosted.org/packages/33/3b/ce04980b9dadaef3ca2e9f37d90cd757c45a2c9edc50ec9de944b8fc2c02/spacy_ixakat-0.6.8.tar.gz",
    "platform": null,
    "description": "[![Current PyPI packages](https://badge.fury.io/py/spacy-ixakat.svg)](https://pypi.org/project/spacy-ixakat/)\n\n# spaCy-ixaKat\n\n[ixaKat](http://ixa2.si.ehu.es/ixakat/ixa-pipe-dep-eu.php) wrapper for [spaCy](https://spacy.io)\n\n## Basic Usage\n\n```py\n>>> import spacy_ixakat\n>>> nlp=spacy_ixakat.load()\n>>> doc=nlp(\"Euskaldun izatea lan extra bat izatea da.\")\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\tEuskaldun\teuskaldun\tPROPN\tADJ\t_\t2\tobl\t_\t_\n2\tizatea\tizan\tVERB\tADI_SIN\t_\t7\tcsubj\t_\t_\n3\tlan\tlan\tNOUN\tIZE_ARR\t_\t6\tobl\t_\t_\n4\textra\textra\tNOUN\tADJ\t_\t3\tnmod\t_\t_\n5\tbat\tbat\tNUM\tDET_DZH\t_\t3\tnummod\t_\t_\n6\tizatea\tizate\tVERB\tIZE_ARR\t_\t7\tccomp\t_\t_\n7\tda\tizan\tVERB\tADT\t_\t0\tROOT\t_\tSpaceAfter=No\n8\t.\t.\tPUNCT\tPUNT_PUNT\t_\t7\tpunct\t_\t_\n>>> import deplacy\n>>> deplacy.render(doc)\nEuskaldun PROPN <\u2557           obl\nizatea    VERB  \u2550\u255d<\u2550\u2550\u2550\u2550\u2550\u2550\u2557   csubj\nlan       NOUN  \u2550\u2557\u2550\u2557<\u2557   \u2551   obl\nextra     NOUN  <\u255d \u2551 \u2551   \u2551   nmod\nbat       NUM   <\u2550\u2550\u255d \u2551   \u2551   nummod\nizatea    VERB  \u2550\u2550\u2550\u2550\u2550\u255d<\u2557 \u2551   ccomp\nda        VERB  \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u2550\u255d\u2550\u2557 ROOT\n.         PUNCT <\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d punct\n```\n\n`spacy_ixakat.load(convUD=True)` loads spaCy Language pipeline for ixaKat. `convUD=False` disables the conversion into Universal Dependencies and forces the pipeline to return `str` of CoNLL.\n\n```py\n>>> import spacy_ixakat\n>>> nlp=spacy_ixakat.load(convUD=False)\n>>> doc=nlp(\"Euskaldun izatea lan extra bat izatea da.\")\n>>> print(doc)\n1\tEuskaldun\teuskaldun\tADJ\tADJ\tKAS=ZERO|CLUSTER=01010111|CLUSTERM=0101|ATZIZKIA=Null\t2\tncmod\t_\t_\n2\tizatea\tizan\tADI\tADI_SIN\tKAS=ABS|ERL=KONPL|ADM=ADIZE|CLUSTER=0110100|CLUSTERM=0110|ATZIZKIA=Null\t7\txcomp_subj\t_\t_\n3\tlan\tlan\tIZE\tIZE_ARR\tKAS=ZERO|CLUSTER=1011110111010|CLUSTERM=1011|ATZIZKIA=Null\t6\tncmod\t_\t_\n4\textra\textra\tADJ\tADJ\tKAS=ZERO|CLUSTER=01111110100|CLUSTERM=0111|ATZIZKIA=Null\t3\tncmod\t_\t_\n5\tbat\tbat\tDET\tDET_DZH\tCLUSTER=1011010|CLUSTERM=1011|ATZIZKIA=Null\t3\tdetmod\t_\t_\n6\tizatea\tizate\tIZE\tIZE_ARR\tKAS=ABS|NUM=S|CLUSTER=0110100|CLUSTERM=0110|ATZIZKIA=a\t7\tncpred\t_\t_\n7\tda\tizan\tADT\tADT\tASP=PNT|MDN=A1|DADUDIO=NOR|NOR=HURA|CLUSTER=0110100|CLUSTERM=0110|ATZIZKIA=Null\t0\tROOT\t_\tSpaceAfter=No\n8\t.\t.\tPUNT\tPUNT_PUNT\t_\t7\tPUNC\t_\t_\n\n\n>>> import deplacy\n>>> deplacy.render(doc)\nEuskaldun ADJ  <\u2557         ncmod\nizatea    ADI  \u2550\u255d<\u2550\u2550\u2550\u2550\u2550\u2550\u2557 xcomp_subj\nlan       IZE  \u2550\u2557\u2550\u2557<\u2557   \u2551 ncmod\nextra     ADJ  <\u255d \u2551 \u2551   \u2551 ncmod\nbat       DET  <\u2550\u2550\u255d \u2551   \u2551 detmod\nizatea    IZE  \u2550\u2550\u2550\u2550\u2550\u255d<\u2557 \u2551 ncpred\nda        ADT  \u2550\u2557\u2550\u2550\u2550\u2550\u2550\u255d\u2550\u255d ROOT\n.         PUNT <\u255d         PUNC\n```\n\n## Installation for Linux (Debian, Ubuntu, Kali)\n\n```sh\nsudo apt update\nsudo apt install python3-pip python3-dev default-jre-headless curl libncursesw5\npip3 install spacy_ixakat --user\n```\n\n## Installation for Linux (CentOS)\n\n```sh\nsudo yum update\nsudo yum install python3-pip python3-devel java-1.8.0-openjdk-headless curl ncurses\npip3 install spacy_ixakat --user\n```\n\n## Installation for Google Colaboratory\n\nTry [notebook](https://colab.research.google.com/github/KoichiYasuoka/spaCy-ixaKat/blob/master/spacy_ixakat.ipynb).\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "ixaKat wrapper for spaCy",
    "version": "0.6.8",
    "project_urls": {
        "Homepage": "https://github.com/KoichiYasuoka/spaCy-ixaKat",
        "Source": "https://github.com/KoichiYasuoka/spaCy-ixaKat",
        "Tracker": "https://github.com/KoichiYasuoka/spaCy-ixaKat/issues",
        "ixaKat": "http://ixa2.si.ehu.es/ixakat"
    },
    "split_keywords": [
        "ixakat",
        "spacy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "333bce04980b9dadaef3ca2e9f37d90cd757c45a2c9edc50ec9de944b8fc2c02",
                "md5": "d7127b2f90a8c8b166ef5f6c182dfee4",
                "sha256": "7ad64d120e5ff8852a86a93844964b10f3df436a727f22cfcea1e5422f785974"
            },
            "downloads": -1,
            "filename": "spacy_ixakat-0.6.8.tar.gz",
            "has_sig": false,
            "md5_digest": "d7127b2f90a8c8b166ef5f6c182dfee4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 82053627,
            "upload_time": "2024-07-30T01:12:52",
            "upload_time_iso_8601": "2024-07-30T01:12:52.749599Z",
            "url": "https://files.pythonhosted.org/packages/33/3b/ce04980b9dadaef3ca2e9f37d90cd757c45a2c9edc50ec9de944b8fc2c02/spacy_ixakat-0.6.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-30 01:12:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KoichiYasuoka",
    "github_project": "spaCy-ixaKat",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spacy-ixakat"
}
        
Elapsed time: 4.23902s