{ "info": { "author": "John O'Leary, Nick Budak, Gian Rominger", "author_email": "jo10@princeton.edu, nbudak@princeton.edu, gianr@princeton.edu", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: Chinese (Traditional)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Text Processing :: Linguistic", "Topic :: Text Processing :: Markup", "Topic :: Utilities" ], "description": "# DIRECT\n_Digital Intertextual Resonances in Early Chinese Texts_\n\n![CI Status](https://github.com/direct-phonology/direct/workflows/test/badge.svg)\n![Dependency Status](https://pyup.io/repos/github/direct-phonology/direct/shield.svg?t=1568910750251)\n![PyPi Version](https://img.shields.io/pypi/v/dphon.svg?style=flat)\n![Python Versions](https://img.shields.io/pypi/pyversions/dphon.svg?style=flat)\n\n## installation\n\nthis software is tested on the latest versions of macOS, windows, and ubuntu. you will need a supported version of python (above), along with `pip`.\n\n```sh\n$ pip install dphon\n```\n\nif you're on windows and are seeing incorrectly formatted output in your terminal, have a look at this [stackoverflow answer](https://stackoverflow.com/questions/49476326/displaying-unicode-in-powershell/49481797#49481797).\n\n## usage\n\nthe basic function of DIRECT is to phonologically compare two early chinese texts. you will need to have the files saved locally in utf-8 encoded plain text (`.txt`) format. to compare two texts:\n\n```sh\n$ dphon text_a.txt text_b.txt # search text b against text a\n```\n\nthe output will be a list of character sequences in text_a that have rhyming counterparts in text_b, including the texts and line numbers from which the sequences are drawn:\n\n```sh\n\u6ecb\u7ae0\u76dc\u8cca\u591a\u6709 (a: 16) # this sequence of characters from a line 16 matches\n\u6ecb\u5f70\uff0c\u76dc\u8cca\u591a\u6709 (b: 57) # this sequence of characters from b line 57\n...\n\u4e0d\u53ef\u5f97 (a: 15) # this sequence from a on line 15 matches two separate \n\u4e0d\u53ef\u8b58 (b: 15) # locations in b, and both of them are on line 15 in b\n\u4e0d\u53ef\u8b58 (b: 15)\n...\n\u89e3\u5176\u5fff (a: 15) # in this sequence, we see three separate graphic\n\u89e3\u5176\u7d1b (b: 4) # variations for the third character - one on a line 15\n\u89e3\u5176\u5206 (b: 56) # and two from b on lines 4 and 56\n```\n\nnote that the sequences ignore non-word characters, including punctuation and numbers. this means that rhymes could span across lines, which will be reflected in the output.\n\nyou can view the full list of command options with:\n```sh\n$ dphon --help\n```\n\n## methodology\n\nmatching sequences are determined by a dictionary file that represents a particular reconstruction of old chinese phonology (you can see some examples in the `data/` folder). these data structures map an input character to an arbitrary sound token (\"dummy\") that can be matched against other such tokens.\n\nthe core process of DIRECT is to accept plaintext input, tokenize it according to a particular phonological reconstruction, and search for matches amongst the tokenized text. these matches thus represent resonance: sequences that could have rhymed when they were originally read aloud, despite dissimilarity in their written forms.\n\n## development setup\n\n**python >=3.6 is required**. \n\nfirst, clone the repository:\n\n```sh\n$ git clone https://github.com/direct-phonology/direct.git\n$ cd direct\n```\n\nthen, to create and activate a virtual environment (recommended):\n\n```sh\n$ python -m venv venv\n$ source venv/bin/activate\n```\n\ninstall dependencies:\n\n```sh\n$ pip install -r requirements.txt\n$ pip install -r dev-requirements.txt\n```\n\nfinally, install the package itself in development mode:\n\n```sh\n$ pip install -e .\n```\n\nnow your changes will be automatically picked up when you run `dphon`.\n\n**pull requests should be made against the `develop` branch.**\n\n## tests\n\nunit tests are written with pytest. you can run them with:\n\n```sh\n$ pytest\n```\n\n## releases\n\n**make sure the version number in `dphon/__init__.py` is correct!**\n\nif there are any built files in `dist/` from older releases, remove them before\nyou start this process:\n\n```sh\n$ rm dist/*\n```\n\nto build a source archive and distribution for a release:\n\n```sh\n$ python setup.py sdist bdist_wheel\n```\n\nto publish the release on [test PyPI](https://test.pypi.org/) (useful for making sure everything worked):\n\n```sh\n$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n```\n\nif everything is OK, publish the package to PyPI:\n\n```sh\n$ twine upload dist/*\n```\n\n\n", "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/direct-phonology/direct", "keywords": "cli old chinese phonology linguistics", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dphon", "package_url": "https://pypi.org/project/dphon/", "platform": "", "project_url": "https://pypi.org/project/dphon/", "project_urls": { "Homepage": "https://github.com/direct-phonology/direct", "Source": "https://github.com/direct-phonology/direct", "Tracker": "https://github.com/direct-phonology/direct/issues" }, "release_url": "https://pypi.org/project/dphon/1.0.1/", "requires_dist": [ "docopt", "coverage ; extra == 'test'", "pytest ; extra == 'test'", "pytest-cov ; extra == 'test'" ], "requires_python": "", "summary": "Tools for Old Chinese phonological analysis.", "version": "1.0.1" }, "last_serial": 5863152, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ef3f9d9396028fe45d7102a2be7763f1", "sha256": "2f33470b90ebd71cb17eaf3ffd00de40e17731a77c1cec1b91674ad98003fd0b" }, "downloads": -1, "filename": "dphon-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ef3f9d9396028fe45d7102a2be7763f1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5624, "upload_time": "2019-02-08T16:52:24", "url": "https://files.pythonhosted.org/packages/c6/71/128da5452a20948e31f06b106a992916d27e7f1a4946eca43bfee84c9dd9/dphon-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4501425d837db9153ebc01bd4eae8e6b", "sha256": "cfa853b500cef0bdd14b28fa72722f1d0c4139221a9d1d7178e2693e02d78b82" }, "downloads": -1, "filename": "dphon-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4501425d837db9153ebc01bd4eae8e6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9814, "upload_time": "2019-02-08T16:52:27", "url": "https://files.pythonhosted.org/packages/36/c6/5632a4270f22b613dc1042d82777789f82d616bd607089533f690e3f9112/dphon-0.1.0.tar.gz" } ], "0.2.0.dev0": [ { "comment_text": "", "digests": { "md5": "0911d6d6603be6df1ef1d2a293a357de", "sha256": "7e95ed9767b268aef86a30b2edca5b3e8b0e68876c85bfe1e6c5423030ad4504" }, "downloads": -1, "filename": "dphon-0.2.0.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0911d6d6603be6df1ef1d2a293a357de", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5552, "upload_time": "2019-02-08T16:52:26", "url": "https://files.pythonhosted.org/packages/34/4e/e07b7fee97a97266aa5df6a541225e57c8295705bac78af2be9fe747cfda/dphon-0.2.0.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2de7b9ec503c5dead3dc6c4e2718cb59", "sha256": "8c14485971a464dee95e8f29fee57f6d10eddb6303725ae181add1f4be9281c7" }, "downloads": -1, "filename": "dphon-0.2.0.dev0.tar.gz", "has_sig": false, "md5_digest": "2de7b9ec503c5dead3dc6c4e2718cb59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7735, "upload_time": "2019-02-08T16:52:28", "url": "https://files.pythonhosted.org/packages/b2/85/5948b5dd6433394e812b77868d97eef484fc4fac71793818e2004d18ebf7/dphon-0.2.0.dev0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "c9ab7478b7261132e7d6b3e772e97cb8", "sha256": "6df72f0e3896c0e0a40304f4e70e0a5ff8c7a40a11df7cf2f7ae3e6bc2b23e6d" }, "downloads": -1, "filename": "dphon-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c9ab7478b7261132e7d6b3e772e97cb8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8314, "upload_time": "2019-08-23T19:28:36", "url": "https://files.pythonhosted.org/packages/b3/56/d0c5e0fc0041a6358a2c9aee3e3bf02bdaf047b086fd04ae5f1eb02ba89b/dphon-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ebaace4fe9af7f9bd9d44eab43615b4f", "sha256": "36f5d09e000795a58ad16afb7b1503910bdd703526bcfb63dbd25ed630a5a898" }, "downloads": -1, "filename": "dphon-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ebaace4fe9af7f9bd9d44eab43615b4f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41927, "upload_time": "2019-08-23T19:28:37", "url": "https://files.pythonhosted.org/packages/58/93/72e9911700c771466e15fda6f5282ccf86748987370cf56e44ad57550572/dphon-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ec5dd82def436edba69f7f18810bf8b6", "sha256": "3e0987f4be1db131926cbeb52b5084f281a1bf01da6e0cef0248d6408c0aafcb" }, "downloads": -1, "filename": "dphon-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ec5dd82def436edba69f7f18810bf8b6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8555, "upload_time": "2019-09-20T16:26:29", "url": "https://files.pythonhosted.org/packages/2c/6d/fa372d846180bbcaf47bba054c2220f5cafb264931fe26b85dbffa88f98d/dphon-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "097ceb96b64f6723ee93139b1e75c40c", "sha256": "b8ff20456222455fd4c78a0b50f4e850b5a52241f78dac29ffc54bf7367c0475" }, "downloads": -1, "filename": "dphon-1.0.1.tar.gz", "has_sig": false, "md5_digest": "097ceb96b64f6723ee93139b1e75c40c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43598, "upload_time": "2019-09-20T16:26:30", "url": "https://files.pythonhosted.org/packages/5d/49/4b135e1e0e8159f002bfb4d95f823de354c17b1199ec264f60c7d59a5281/dphon-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ec5dd82def436edba69f7f18810bf8b6", "sha256": "3e0987f4be1db131926cbeb52b5084f281a1bf01da6e0cef0248d6408c0aafcb" }, "downloads": -1, "filename": "dphon-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ec5dd82def436edba69f7f18810bf8b6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8555, "upload_time": "2019-09-20T16:26:29", "url": "https://files.pythonhosted.org/packages/2c/6d/fa372d846180bbcaf47bba054c2220f5cafb264931fe26b85dbffa88f98d/dphon-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "097ceb96b64f6723ee93139b1e75c40c", "sha256": "b8ff20456222455fd4c78a0b50f4e850b5a52241f78dac29ffc54bf7367c0475" }, "downloads": -1, "filename": "dphon-1.0.1.tar.gz", "has_sig": false, "md5_digest": "097ceb96b64f6723ee93139b1e75c40c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43598, "upload_time": "2019-09-20T16:26:30", "url": "https://files.pythonhosted.org/packages/5d/49/4b135e1e0e8159f002bfb4d95f823de354c17b1199ec264f60c7d59a5281/dphon-1.0.1.tar.gz" } ] }