{ "info": { "author": "Adam Svanberg", "author_email": "asvanberg@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "Apertag: Averaged Perceptron Tagger\n===================================\n\nApertag is a sequence tagger based on an averaged perceptron model. In\norder to avoid making assumptions about what kind of sequence data you\nare labeling, or the format of your features, the input to the tagger\nis simply sequences of feature value sets. Each set of values\nrepresent an observation to receive a tag. A feature value can be any\npython type, as long as it can be hashed, but it's important to note\nthat the the values are used only in a binary fashion, i.e. either\nthey exist in the context of the item being tagged or not; the nature\nof the value has no impact on the decision.\n\nA simple example illustrating an NP-chunker:\n\n.. code-block:: python\n\n >>> t = Tagger()\n >>> t.train([[['POS=DT','WRD=the'],['POS=NN','WRD=dog']]],[['NP-B','NP-I']])\n >>> t.tag([['POS=DT','WRD=the'],['POS=NN','WRD=dog']])\n ['NP-B', 'NP-I']\n\nThere is one crucial exception to all this featuratory freedom:\nAny features wishing to make use of the actual output tags need to\nsignal this by formatting their value as a string with special\ntags that will be replaced by the corresponding tags from the\ncurrent context during tagging. The tag format is \"\", where n\nis the negative index of the tag relative to the current\nposition. For example, if you are training a POS-tagger and you\nhave a feature that looks at the current word and the previous\noutput tag, and the current word is \"dog\", the feature could be\nencoded as \":dog\". The tagger will expand this using its\npredicted label context into something like \"DT:dog\" (depending on\nyour tag set and feature format, of course).\n\nAn example illustrating a POS-tagger with output label features:\n\n.. code-block:: python\n\n >>> t = Tagger()\n >>> t.train([[['POS -1:','W:the'],['POS -1:','W:dog']]],[['DT','NN']])\n >>> t.tag([['POS -1:','W:the'],['POS -1:','W:dog']])\n ['DT', 'NN']\n\nIt is most likely a good idea to use this format for training as\nwell, even though you (hopefully) have the output tags yourself at\nthat point, to ensure the features are identical across training\nand tagging.\n\nIf you don't require output tags for any of your features, you can\nslightly increase performance (especially for non-string features)\nby setting expand_features=False.\n\nWhere do I put my columns?\n==========================\n\nThe tagger module can be run as a standalone script, which takes its\ninput as good old files of tab delimited columns, where each row is an\nobservation consisting of feature values, followed by the tag in the\nlast column. For more info run:\n\n.. code-block:: bash\n\n $ python apertag.py {train,tag} -h\n\nReferences and acknowledgments\n==============================\n\n* http://people.csail.mit.edu/mcollins/papers/tagperc.pdf\n* https://github.com/lmjohns3/py-tagger/\n* https://honnibal.wordpress.com/2013/09/11/a-good-part-of-speechpos-tagger-in-about-200-lines-of-python/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adsva/apertag", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "Apertag", "package_url": "https://pypi.org/project/Apertag/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Apertag/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/adsva/apertag" }, "release_url": "https://pypi.org/project/Apertag/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Averaged Perceptron Sequence Tagger", "version": "1.0.2" }, "last_serial": 879733, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "d47fce507fb77b3685dbdd3b02dd46fc", "sha256": "bbd12fa6bf2de0c2ef5c1475b5ade4c57ddee50536106723c9a4b4c766893c26" }, "downloads": -1, "filename": "Apertag-1.0.tar.gz", "has_sig": false, "md5_digest": "d47fce507fb77b3685dbdd3b02dd46fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6921, "upload_time": "2013-09-27T06:26:25", "url": "https://files.pythonhosted.org/packages/74/3d/ada7497d751ff6f31428444d114906bca4704032b123ba2362fb8f7ae173/Apertag-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "eab68a76eafe6bd5fcf3228c099aed04", "sha256": "d2c2a76c5caedc28ecc786a3512256f2fc9815e8c83a437252a2b59e4375f582" }, "downloads": -1, "filename": "Apertag-1.0.1.tar.gz", "has_sig": false, "md5_digest": "eab68a76eafe6bd5fcf3228c099aed04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6925, "upload_time": "2013-09-27T07:58:11", "url": "https://files.pythonhosted.org/packages/14/45/46643ff8fdfcc21e23548e46e204aef734e31203e13449a2e89cfd35d72a/Apertag-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "built for Linux-3.8.0-30-generic-x86_64-with-glibc2.7", "digests": { "md5": "509975d42a064ee44e254e55535961b1", "sha256": "2ae14d6a54edcde67a5782cae0240fb318561c3942a5fcb075700a2cc204a7b0" }, "downloads": -1, "filename": "Apertag-1.0.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "509975d42a064ee44e254e55535961b1", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 5981, "upload_time": "2013-10-03T05:32:49", "url": "https://files.pythonhosted.org/packages/98/74/cdb9f855e2628c3d89d5bda9d01e57ef445b925408e432ee906f70b35fc3/Apertag-1.0.2.linux-x86_64.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-3.8.0-30-generic-x86_64-with-glibc2.7", "digests": { "md5": "509975d42a064ee44e254e55535961b1", "sha256": "2ae14d6a54edcde67a5782cae0240fb318561c3942a5fcb075700a2cc204a7b0" }, "downloads": -1, "filename": "Apertag-1.0.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "509975d42a064ee44e254e55535961b1", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 5981, "upload_time": "2013-10-03T05:32:49", "url": "https://files.pythonhosted.org/packages/98/74/cdb9f855e2628c3d89d5bda9d01e57ef445b925408e432ee906f70b35fc3/Apertag-1.0.2.linux-x86_64.tar.gz" } ] }