{ "info": { "author": "yaoguai", "author_email": "lapislazulitexts@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Religion", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Text Processing :: Linguistic", "Topic :: Utilities" ], "description": "cjk-defn\n========\n\nhttps://github.com/yaoguai/cjk-defn\n\ncjk-defn is a command-line dictionary program for looking up definitions of\nterms and phrases from the CJK languages (Chinese, Japanese, and Korean).\nUnlike most other dictionaries, cjk-defn allows you to input entire lines of\ntext, and shows relevant definitions for all terms and phrases found.\n\ncjk-defn is implemented in Python 3 and released under the MIT License.\n\nFeatures include:\n\n- Get definitions for longest matching terms\n- Get definitions for each character\n- Add as many dictionaries as you like\n- Use as many dictionaries as you like\n- Dictionary data in a SQLite database\n- stdin-stdout I/O for flexibility\n- Cross-platform console application\n- Dictionary module can be imported\n\nHistory / Why?\n--------------\n\nAround 2008-2009, I wanted a program like this, but none existed at that time.\nAll tools with similar functionality were Web-based, or proprietary, or were\nlimited to traditional dictionary lookups based on a single term. For someone\nwho preferred console programs, there were no applications for this. Therefore,\nI had no choice but to make one myself.\n\nAfter playing around with different formats, I wrote a program similar to this\none, also using a SQLite back-end. However, it was limited to only a few\npre-defined dictionaries. Because the application was ugly Python 2 and tied to\nspecific dictionaries, the program stayed private for years.\n\nComing back to the project recently, I wanted to make it general enough to be\nuseful to other people, and capable of using any number of dictionaries. After\nkicking around a few designs, I went with a very simple database with just two\ntables and a handful of fields. The new program has the flexibility to work\nwith any number of dictionaries. Since it has been generalized, it may be\nuseful to others who want such a dictionary program, and prefer the power and\nflexibility of Unix tools.\n\nDictionaries\n------------\n\nBy default, the dictionary program includes no dictionaries or definitions.\nThese are added by creating the SQLite database and inserting data into it. The\nDICTIONARIES table contains basic dictionary metadata. The DEFINITIONS table is\nfor all dictionary definitions, and includes only a few standard fields.\n\nFor definitions, several free dictionaries are available, including those from\nJMdict/EDICT (Japanese-English), and CC-CEDICT (Chinese-English). Tools from\nthe \"edict-to-csv\" software package may be helpful in converting dictionary\ndata for imports.\n\nInstallation\n------------\n\nTo run this program, Python 3.x is required. Installation on a Unix-like\nplatform is advised, but Windows is possible too. If you must use Windows, then\nCygwin is the best environment.\n\nTo install the program, you can use the old::\n\n # python3 setup.py install\n\nOr you can use pip, which is the new and better way.\n\nDatabase Setup\n--------------\n\nAfter installing the program, the database should be initialized. The directory\nfor the database is located under the installation path in the following\nlocation::\n\n $(PREFIX)/var/lib/cjk-defn/\n\nIn this directory, you can run the script \"make-database\" to create the\ndatabase. Only two tables are in the database, and these are as follows::\n\n DICTIONARIES: <= Each entry is a dictionary\n DI_DICT <= Dictionary ID (letters and numbers, no spaces)\n DI_SIGIL_S <= 2-char ID for standard definitions (e.g. =Z)\n DI_SIGIL_C <= 2-char ID for character definitions (e.g. -Z)\n DI_SHORT_DESCR <= Very short description of the dictionary\n DI_LONG_DESCR <= Long description, as much as you like\n\n DEFINITIONS: <= Each entry is a dictionary definition\n DF_DICT <= Dictionary ID\n DF_FORM1 <= Standard form of the term\n DF_FORM2 <= Other form of the term\n DF_ALT <= Transliteration\n DF_DEFN <= Full definition\n\nProgram Usage\n-------------\n\nBy invoking the program with \"-h\" or \"--help\" flags, you can see usage\ninformation, and also see which dictionaries are available in the database::\n\n $ cjk-defn -h\n\nIf we see that the dictionary \"cedict\" is available, then we can use it in the\nfollowing way::\n\n $ cjk-defn cedict\n\nIf we want to include character definitions, then we should add the suffix \"/c\"\nto the end of the dictionary::\n\n $ cjk-defn cedict cedict/c\n\nYou can use any combination of dictionaries, in any order you like. If you want\nto view definitions for an entire text, you could do something like the\nfollowing::\n\n $ cat mytext.txt | cjk-defn cedict cedict/c | less\n\nIf you want to define a default set of dictionaries, you can set an environment\nvariable, and then it is no longer necessary to specify the dictionaries when\ninvoking cjk-defn::\n\n $ CJK_DEFN_DICTS='cedict cedict/c'\n $ cat mytext.txt | cjk-defn | less\n\nDocumentation\n-------------\n\nA normal manual page is included with the software, cjk-defn(1), which covers\nbasic usage information.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yaoguai/cjk-defn", "keywords": "chinese japanese korean cjk asia language dictionary", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "cjk-defn", "package_url": "https://pypi.org/project/cjk-defn/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cjk-defn/", "project_urls": { "Homepage": "https://github.com/yaoguai/cjk-defn" }, "release_url": "https://pypi.org/project/cjk-defn/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Console CJK dictionary program.", "version": "1.0.1" }, "last_serial": 2066667, "releases": { "0.9.9": [ { "comment_text": "", "digests": { "md5": "2346ee971032ab96a7f902a3baa9f71e", "sha256": "cc00340a91ddbba1a4d824002a582e460120f1502242386337c9b7ffffe6bac5" }, "downloads": -1, "filename": "cjk-defn-0.9.9.tar.gz", "has_sig": false, "md5_digest": "2346ee971032ab96a7f902a3baa9f71e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8221, "upload_time": "2016-04-01T02:56:09", "url": "https://files.pythonhosted.org/packages/28/bd/c8b977f33a015746535ff4b6cf87b0a5abb57c4432b5f340437b4f28b725/cjk-defn-0.9.9.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "b4a5415e4ef87b25f9d666f6ca0ceec7", "sha256": "e585b21b2ec17bb62569f618cfba96b29cfecf1f90f3ef8add39c14bd7c468e3" }, "downloads": -1, "filename": "cjk-defn-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b4a5415e4ef87b25f9d666f6ca0ceec7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9006, "upload_time": "2016-04-04T14:08:15", "url": "https://files.pythonhosted.org/packages/ed/5e/0ef2e2f6fda26e08778390b5acca2fee2131a5224341b7c5189649deeddc/cjk-defn-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b784e1674d16c602756632685486539b", "sha256": "db33dac4880b31ccb24ccc7fee2666e212df5ddb834efb1527b1e8cfc10c95ab" }, "downloads": -1, "filename": "cjk-defn-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b784e1674d16c602756632685486539b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9008, "upload_time": "2016-04-16T03:14:39", "url": "https://files.pythonhosted.org/packages/e8/63/4a61d0dea4e699ff8915ac7f2680967a2c1f0616ab180582426b1898d847/cjk-defn-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b784e1674d16c602756632685486539b", "sha256": "db33dac4880b31ccb24ccc7fee2666e212df5ddb834efb1527b1e8cfc10c95ab" }, "downloads": -1, "filename": "cjk-defn-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b784e1674d16c602756632685486539b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9008, "upload_time": "2016-04-16T03:14:39", "url": "https://files.pythonhosted.org/packages/e8/63/4a61d0dea4e699ff8915ac7f2680967a2c1f0616ab180582426b1898d847/cjk-defn-1.0.1.tar.gz" } ] }