{ "info": { "author": "Flyaway", "author_email": "flyaway1217@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools" ], "description": "PYEVALB\n=========\n\nEVEVALB is a python version of Evalb_ which is used to score the bracket tree banks.\n\nInstallation\n=============\n::\n\n pip install PYEVALB\n\nExamples\n=========\n\nScore two corpus\n----------------\n\n.. code:: python\n\n from PYEVALB import scorer\n\n gold_path = 'gold_corpus.txt'\n test_path = 'test_corpus.txt'\n result_path = 'result.txt'\n\n scorer.evalb(gold_path, test_path, result_path)\n\nAnd the result would be:\n\n.. code::\n\n ID | length | state | recall | prec | matched_brackets | gold_brackets | test_brackets | cross_brackets | words | correct_tags | tag_accracy \n ---:|-------:|------:|-------:|-----:|-----------------:|--------------:|--------------:|---------------:|------:|-------------:|------------:\n 0| 44| 0| 0.57| 0.61| 31| 54| 51| 16| 44| 43| 0.98\n 1| 13| 0| 0.64| 0.60| 9| 14| 15| 3| 13| 12| 0.92\n 2| 29| 0| 0.97| 0.97| 29| 30| 30| 0| 29| 29| 1.00\n 3| 20| 0| 0.80| 0.80| 20| 25| 25| 4| 20| 20| 1.00\n 4| 19| 0| 0.91| 1.00| 21| 23| 21| 0| 19| 19| 1.00\n 5| 71| 0| 0.67| 0.68| 52| 78| 77| 15| 71| 65| 0.92\n 6| 16| 0| 0.61| 0.69| 11| 18| 16| 0| 16| 14| 0.88\n 7| 27| 0| 0.92| 0.96| 24| 26| 25| 0| 27| 26| 0.96\n 8| 19| 0| 1.00| 1.00| 20| 20| 20| 0| 19| 19| 1.00\n 9| 41| 0| 0.80| 0.78| 32| 40| 41| 5| 41| 39| 0.95\n\n =================================================================================================================================================\n Number of sentence:\t10.00\n Number of Error sentence:\t0.00\n Number of Skip sentence:\t0.00\n Number of Valid sentence:\t10.00\n Bracketing Recall:\t75.91\n Bracketing Precision:\t77.57\n Bracketing FMeasure:\t76.73\n Complete match:\t10.00\n Average crossing:\t4.30\n No crossing:\t50.00\n Tagging accuracy:\t95.65\n\nScore two trees\n---------------\n\n.. code:: python\n\n from PYEVALB import scorer\n from PYEVALB import parser\n\n gold = '(IP (NP (PN \u8fd9\u91cc)) (VP (ADVP (AD \u4fbf)) (VP (VV \u4ea7\u751f) (IP (NP (QP (CD \u4e00) (CLP (M \u4e2a))) (DNP (NP (JJ \u7ed3\u6784\u6027)) (DEG \u7684)) (NP (NN \u76f2\u70b9))) (PU \uff1a) (IP (VP (VV \u81ed\u5473\u76f8\u6295) (PU \uff0c) (VV \u7269\u4ee5\u7c7b\u805a)))))) (PU \u3002))'\n\n test = '(IP (IP (NP (PN \u8fd9\u91cc)) (VP (ADVP (AD \u4fbf)) (VP (VV \u4ea7\u751f) (NP (QP (CD \u4e00) (CLP (M \u4e2a))) (DNP (ADJP (JJ \u7ed3\u6784\u6027)) (DEG \u7684)) (NP (NN \u76f2\u70b9)))))) (PU \uff1a) (IP (NP (NN \u81ed\u5473\u76f8\u6295)) (PU \uff0c) (VP (VV \u7269\u4ee5\u7c7b\u805a))) (PU \u3002))'\n\n gold_tree = parser.create_from_bracket_string(gold)\n test_tree = parser.create_from_bracket_string(test)\n\n result = scorer.score_trees(gold_tree, test_tree)\n\n print('Recall =' + str(result.recall))\n print('Precision =' + str(result.prec))\n\nAnd the result is:\n\n.. code::\n\n Recall = 64.29\n Precision = 56.25\n\n\nTODO\n====\n\n1. Remove the dependency of pytablewriter_\n2. Add more configurations, such as limiting the length of sentence.\n\n.. _Evalb: http://nlp.cs.nyu.edu/evalb/\n.. _pytablewriter: https://github.com/thombashi/pytablewriter/blob/master/README.rst\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/flyaway1217/PYEVALB", "keywords": "score bracket tree banks", "license": "GNU", "maintainer": "", "maintainer_email": "", "name": "PYEVALB", "package_url": "https://pypi.org/project/PYEVALB/", "platform": "", "project_url": "https://pypi.org/project/PYEVALB/", "project_urls": { "Homepage": "https://github.com/flyaway1217/PYEVALB" }, "release_url": "https://pypi.org/project/PYEVALB/0.1.3/", "requires_dist": [ "pytablewriter (>=0.10.2)" ], "requires_python": "", "summary": "Scoring tools for bracket tree banks.", "version": "0.1.3" }, "last_serial": 2402541, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "39dcfe408468aedb97ab33d7aeb3cc15", "sha256": "155aeb12340520d0b05080739393f3104c36ef7e8765da6ab6b8e028925448ff" }, "downloads": -1, "filename": "PYEVALB-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "39dcfe408468aedb97ab33d7aeb3cc15", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12399, "upload_time": "2016-10-16T03:25:52", "url": "https://files.pythonhosted.org/packages/03/41/361bfb7fbc1c09c260e04ce06ae175d8e4e3579f8c5dda2976bebea55340/PYEVALB-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bdf48db4ae26356b575f5cfef6be295f", "sha256": "290aae7bf2f4939af03158a54e40c0f78d11eca5c83c9153be25155925f47fd0" }, "downloads": -1, "filename": "PYEVALB-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bdf48db4ae26356b575f5cfef6be295f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22419, "upload_time": "2016-10-16T03:25:54", "url": "https://files.pythonhosted.org/packages/e8/d8/c2cb6a556182215b1e908c47271e5021946094e87e7ecdc84bbf78e32a37/PYEVALB-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "74c1eaca02e3decf8495ea425ea1aeff", "sha256": "9d740c9887cfbc2c5867bc080dacf9460f1be517d84847b302507bd0aa93367a" }, "downloads": -1, "filename": "PYEVALB-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "74c1eaca02e3decf8495ea425ea1aeff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12767, "upload_time": "2016-10-16T03:56:49", "url": "https://files.pythonhosted.org/packages/90/43/063720103784caddce991504a892fb7a69d4ac7d8c04fe33b6ffc20474a1/PYEVALB-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aaf3fc1e8319b0a941c470e321544025", "sha256": "f9623b6ad447c7dfadf920e0a7afcab92908ede6e953a34ca8d2d114b3485947" }, "downloads": -1, "filename": "PYEVALB-0.1.1.tar.gz", "has_sig": false, "md5_digest": "aaf3fc1e8319b0a941c470e321544025", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22812, "upload_time": "2016-10-16T03:56:52", "url": "https://files.pythonhosted.org/packages/f1/7c/92e7ac1b8a41296075576d16a331acec659fc91f3f94bf4dd17f22904c5e/PYEVALB-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "52fd7ca4b8a4ec2e422900ceffa29638", "sha256": "218f66e81c9b41433b348a5221ec2e7f28f668f47e82151e42c034ca1ea874f2" }, "downloads": -1, "filename": "PYEVALB-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "52fd7ca4b8a4ec2e422900ceffa29638", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13071, "upload_time": "2016-10-16T16:27:58", "url": "https://files.pythonhosted.org/packages/f9/12/5a156aa3463b39092f73525b4568bc9d6390d9f13bab297283cddadd4656/PYEVALB-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "502de80264b7cc4e6cfaa6b78d688791", "sha256": "af2c3086bed95e1e22f2bf0315b789cef1234a9cfe11d9c3197490f990cc7507" }, "downloads": -1, "filename": "PYEVALB-0.1.2.tar.gz", "has_sig": false, "md5_digest": "502de80264b7cc4e6cfaa6b78d688791", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23057, "upload_time": "2016-10-16T16:32:04", "url": "https://files.pythonhosted.org/packages/51/0c/904e1510b77813903cd9f7de9d8cd739f0da8d732b65ecca79f85e051024/PYEVALB-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "af670b998726ae2179d798f299776801", "sha256": "8387340b969ad31c48d73e6af3bacec6930abc1b1d74085d227410df4d08e7a4" }, "downloads": -1, "filename": "PYEVALB-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "af670b998726ae2179d798f299776801", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13073, "upload_time": "2016-10-16T16:43:33", "url": "https://files.pythonhosted.org/packages/ff/2a/7ef00e374e0378ad939b3e544c79418b9d61f29cead690201b391a3c8a61/PYEVALB-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1122784d3f014093e660e12babdc5a0", "sha256": "8991587bd33ac852781218779901c0f86af5bb1ccb17f1901045dcc7878dce7e" }, "downloads": -1, "filename": "PYEVALB-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e1122784d3f014093e660e12babdc5a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23049, "upload_time": "2016-10-16T16:43:35", "url": "https://files.pythonhosted.org/packages/3d/e9/7ad269e7891de4565dd255771ab943e7ea72582ed467d53893698034d070/PYEVALB-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "af670b998726ae2179d798f299776801", "sha256": "8387340b969ad31c48d73e6af3bacec6930abc1b1d74085d227410df4d08e7a4" }, "downloads": -1, "filename": "PYEVALB-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "af670b998726ae2179d798f299776801", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13073, "upload_time": "2016-10-16T16:43:33", "url": "https://files.pythonhosted.org/packages/ff/2a/7ef00e374e0378ad939b3e544c79418b9d61f29cead690201b391a3c8a61/PYEVALB-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1122784d3f014093e660e12babdc5a0", "sha256": "8991587bd33ac852781218779901c0f86af5bb1ccb17f1901045dcc7878dce7e" }, "downloads": -1, "filename": "PYEVALB-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e1122784d3f014093e660e12babdc5a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23049, "upload_time": "2016-10-16T16:43:35", "url": "https://files.pythonhosted.org/packages/3d/e9/7ad269e7891de4565dd255771ab943e7ea72582ed467d53893698034d070/PYEVALB-0.1.3.tar.gz" } ] }