{ "info": { "author": "Hironsan", "author_email": "hiroki.nakayama.py@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# seqeval\nseqeval is a Python framework for sequence labeling evaluation.\nseqeval can evaluate the performance of chunking tasks such as named-entity recognition, part-of-speech tagging, semantic role labeling and so on.\n\nThis is well-tested by using the Perl script [conlleval](https://www.clips.uantwerpen.be/conll2002/ner/bin/conlleval.txt),\nwhich can be used for measuring the performance of a system that has processed the CoNLL-2000 shared task data.\n\n## Support features\nseqeval supports following formats:\n* IOB1\n* IOB2\n* IOE1\n* IOE2\n* IOBES\n\nand supports following metrics:\n\n| metrics | description |\n|---|---|\n| accuracy_score(y\\_true, y\\_pred) | Compute the accuracy. |\n| precision_score(y\\_true, y\\_pred) | Compute the precision. |\n| recall_score(y\\_true, y\\_pred) | Compute the recall. |\n| f1_score(y\\_true, y\\_pred) | Compute the F1 score, also known as balanced F-score or F-measure. |\n| classification_report(y\\_true, y\\_pred, digits=2) | Build a text report showing the main classification metrics. `digits` is number of digits for formatting output floating point values. Default value is `2`. |\n\n## Usage\nBehold, the power of seqeval:\n\n```python\n>>> from seqeval.metrics import accuracy_score\n>>> from seqeval.metrics import classification_report\n>>> from seqeval.metrics import f1_score\n>>> \n>>> y_true = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]\n>>> y_pred = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]\n>>>\n>>> f1_score(y_true, y_pred)\n0.50\n>>> accuracy_score(y_true, y_pred)\n0.80\n>>> classification_report(y_true, y_pred)\n precision recall f1-score support\n\n MISC 0.00 0.00 0.00 1\n PER 1.00 1.00 1.00 1\n\n micro avg 0.50 0.50 0.50 2\n macro avg 0.50 0.50 0.50 2\n```\n\n### Keras Callback\n\nSeqeval provides a callback for Keras:\n\n```python\nfrom seqeval.callbacks import F1Metrics\n\nid2label = {0: '', 1: 'B-LOC', 2: 'I-LOC'}\ncallbacks = [F1Metrics(id2label)]\nmodel.fit(x, y, validation_data=(x_val, y_val), callbacks=callbacks)\n```\n\n## Installation\nTo install seqeval, simply run:\n\n```\n$ pip install seqeval[cpu]\n```\n\nIf you want to install seqeval on GPU environment, please run:\n\n```bash\n$ pip install seqeval[gpu]\n```\n\n## Requirement\n\n* numpy >= 1.14.0\n* tensorflow(optional)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chakki-works/seqeval", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "test-travis-neko", "package_url": "https://pypi.org/project/test-travis-neko/", "platform": "", "project_url": "https://pypi.org/project/test-travis-neko/", "project_urls": { "Homepage": "https://github.com/chakki-works/seqeval" }, "release_url": "https://pypi.org/project/test-travis-neko/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Testing framework for sequence labeling", "version": "0.0.2" }, "last_serial": 5351759, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "31d359b3c9eed21d892f1cb636e5e993", "sha256": "135c0a5f431a8827960bbfb7580e5dfe40fb542dcb32d43273cf8f18fe15838c" }, "downloads": -1, "filename": "test-travis-neko-0.0.2.tar.gz", "has_sig": false, "md5_digest": "31d359b3c9eed21d892f1cb636e5e993", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4949, "upload_time": "2019-06-03T10:08:45", "url": "https://files.pythonhosted.org/packages/0a/ee/09277de208562ce2ae3c65fd74d68e0ecc99903e94de5287755255c05329/test-travis-neko-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "31d359b3c9eed21d892f1cb636e5e993", "sha256": "135c0a5f431a8827960bbfb7580e5dfe40fb542dcb32d43273cf8f18fe15838c" }, "downloads": -1, "filename": "test-travis-neko-0.0.2.tar.gz", "has_sig": false, "md5_digest": "31d359b3c9eed21d892f1cb636e5e993", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4949, "upload_time": "2019-06-03T10:08:45", "url": "https://files.pythonhosted.org/packages/0a/ee/09277de208562ce2ae3c65fd74d68e0ecc99903e94de5287755255c05329/test-travis-neko-0.0.2.tar.gz" } ] }