{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Text Processing :: Linguistic" ], "description": "A scikit-learn compliant implementation of Monroe et al.'s Fightin' Words analysis method.\n\nFeatures\n--------\n\n- Computes a :code:`(word, z-score)` result for a pair of text corpora.\n- Works with scikit-learn estimators and pipelines.\n\nInstallation\n------------\n\nDistributed via PyPI:\n\n.. code:: bash\n\n pip install fightin-words\n\n\nUsage\n-----\n\n:code:`fightin-words` implements :code:`FWExtractor`, which inherits from the scikit-learn :code:`BaseEstimator` and :code:`TransformerMixin`.\n\nExample:\n\n.. code:: python\n\n import fightin-words as fw\n import sklearn.feature_extraction.text as sk_text\n\n # Strings/text corpora to be compared\n l1 = 'The quick brown fox jumps over the lazy pig'\n l2 = 'The lazy purple pig jumps over the lazier donkey'\n\n # Extractor configuration parameters\n prior = 0.05\n cv = sk_text.CountVectorizer(max_features=15000)\n\n fw.FWExtractor(prior, cv).fit_transform([l1, l2])\n\nNote that to maintain parity with scikit-learn conventions, :code:`fit_transform` takes in *one* variable (the canonical `X` for samples/features). Therefore the two strings to be compared should be marshaled into a single sequence-type (list or tuple) variable.\n\n:code:`prior` and :code:`cv` do not need to be specified. :code:`prior` defaults to 0.01, and :code:`cv` defaults to a naively initialized scikit-learn :code:`CountVectorizer`. If a list of precomputed priors is specified, it is expected that the user also passes in a vectorizer that is responsible for producing a vocabulary whose dimensionality matches the precomputed priors---we do not check for that.\n\nCredits\n-------\n\nThe `original implementation `_ by Jack Hessel at the Department of Computer Science, Cornell University. This version heavily borrows from it for the core computation. A more eloquent description of the algorithm is available there as well.\n\nMonroe, B. L., Colaresi, M. P., & Quinn, K. M. (2008). Fightin'words: Lexical feature selection and evaluation for identifying the content of political conflict. *Political Analysis*, 16(4), 372\u2013403.\n\n.. code:: tex\n\n @article{monroe2008fightin,\n title={Fightin' words: Lexical feature selection and evaluation for identifying the content of political conflict},\n author={Monroe, Burt L and Colaresi, Michael P and Quinn, Kevin M},\n journal={Political Analysis},\n volume={16},\n number={4},\n pages={372--403},\n year={2008},\n publisher={SPM-PMSAPSA}\n }\n\nLICENSE\n-------\n\nThe MIT License (MIT)\nCopyright (c) 2019 Kenneth Lim\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/kenlimmj/fightin-words/tarball/1.0.5", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kenlimmj/fightin-words", "keywords": "nlp,fightin words,fightin,words", "license": "", "maintainer": "Kenneth Lim", "maintainer_email": "me@kenlimmj.com", "name": "fightin-words", "package_url": "https://pypi.org/project/fightin-words/", "platform": "", "project_url": "https://pypi.org/project/fightin-words/", "project_urls": { "Download": "https://github.com/kenlimmj/fightin-words/tarball/1.0.5", "Homepage": "https://github.com/kenlimmj/fightin-words" }, "release_url": "https://pypi.org/project/fightin-words/1.0.5/", "requires_dist": [ "scikit-learn", "numpy" ], "requires_python": "", "summary": "An implementation of Monroe et. al's Fightin' Words Analysis", "version": "1.0.5" }, "last_serial": 4922500, "releases": { "1.0.4": [], "1.0.5": [ { "comment_text": "", "digests": { "md5": "2cef6941e2764196feeba42178ea6247", "sha256": "cb7f265e3294ed70186ca6426326e8f2172c0b7d822db5a82bc952813a5d39f6" }, "downloads": -1, "filename": "fightin_words-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2cef6941e2764196feeba42178ea6247", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6312, "upload_time": "2019-03-10T19:58:59", "url": "https://files.pythonhosted.org/packages/c0/e1/ca8926b7146171f3fa0b1fd27693418f0a5094ba686ee00e9692668a4198/fightin_words-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "800ace8db41d415d397f9d4ee8cc78a5", "sha256": "177a0ebe57f142800e69801f7ff481fbf6303f8e620522ab9382fa820b16010a" }, "downloads": -1, "filename": "fightin_words-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "800ace8db41d415d397f9d4ee8cc78a5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6311, "upload_time": "2019-03-10T19:59:01", "url": "https://files.pythonhosted.org/packages/16/bb/cc527167c39b1cae2925e58a717b496b9b42c11d9cefab03c936c9296711/fightin_words-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b849987e0ca65311a15ac6cb22bce37c", "sha256": "d7bb79a7ac4aa15b5c0a6cc8fdccd5bc69c78778a56fc34e33b11d17b08fb1b9" }, "downloads": -1, "filename": "fightin-words-1.0.5.tar.gz", "has_sig": false, "md5_digest": "b849987e0ca65311a15ac6cb22bce37c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5290, "upload_time": "2019-03-10T19:59:02", "url": "https://files.pythonhosted.org/packages/35/cc/641312506c1df923069bc7233325b78a7f47ed2d241ce9dc977da01c97a3/fightin-words-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2cef6941e2764196feeba42178ea6247", "sha256": "cb7f265e3294ed70186ca6426326e8f2172c0b7d822db5a82bc952813a5d39f6" }, "downloads": -1, "filename": "fightin_words-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2cef6941e2764196feeba42178ea6247", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6312, "upload_time": "2019-03-10T19:58:59", "url": "https://files.pythonhosted.org/packages/c0/e1/ca8926b7146171f3fa0b1fd27693418f0a5094ba686ee00e9692668a4198/fightin_words-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "800ace8db41d415d397f9d4ee8cc78a5", "sha256": "177a0ebe57f142800e69801f7ff481fbf6303f8e620522ab9382fa820b16010a" }, "downloads": -1, "filename": "fightin_words-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "800ace8db41d415d397f9d4ee8cc78a5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6311, "upload_time": "2019-03-10T19:59:01", "url": "https://files.pythonhosted.org/packages/16/bb/cc527167c39b1cae2925e58a717b496b9b42c11d9cefab03c936c9296711/fightin_words-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b849987e0ca65311a15ac6cb22bce37c", "sha256": "d7bb79a7ac4aa15b5c0a6cc8fdccd5bc69c78778a56fc34e33b11d17b08fb1b9" }, "downloads": -1, "filename": "fightin-words-1.0.5.tar.gz", "has_sig": false, "md5_digest": "b849987e0ca65311a15ac6cb22bce37c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5290, "upload_time": "2019-03-10T19:59:02", "url": "https://files.pythonhosted.org/packages/35/cc/641312506c1df923069bc7233325b78a7f47ed2d241ce9dc977da01c97a3/fightin-words-1.0.5.tar.gz" } ] }