{ "info": { "author": "sfyc23", "author_email": "sfyc23@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n\u6210\u8bed\u4e0e\u6210\u8bed\u63a5\u9f99\u67e5\u8be2\u5de5\u5177\uff08Python \u7248\uff09\n=============================\n[![pypi](https://img.shields.io/badge/pypi-0.0.2-yellow.svg)](https://pypi.org/project/china-idiom/) \n![python_vesion](https://img.shields.io/badge/python-%3E3-green.svg) \n\n\n\u7528\u4e8e\u6210\u8bed\u63a5\u9f99\u3002\n\n## \u5173\u4e8e\n\n* GitHub: \n* License: MIT license \n* PyPI: \n* Python version: >= 3.5\n\n## \u7279\u6027\n\n1. \u7528\u4e8e\u73a9\u8f6c\u6210\u8bed\u63a5\u9f99\u7684\u79cd\u79cd\u65b9\u6cd5\u3002\n\n\n## \u5b89\u88c5\n\n $ pip install china-idiom\n\n## \u5347\u7ea7\n\n $ pip install -U china-idiom\n\n\n## \u4f9d\u8d56\u5e93\n\n pandas>=0.23.4\n\n## \u4f7f\u7528\u793a\u4f8b\n\n\u9996\u5148\u5bfc\u5165\u5e93 \n```\nimport china_idiom as idiom\n``` \n\n### 1. \u5224\u65ad\u4e00\u4e2a\u8bcd\u662f\u5426\u662f\u6210\u8bed\u3002 \n```\nidiom.is_idiom('\u4e00\u5fc3\u4e00\u610f')\n>>> True\n```\n\n### 2. \u641c\u7d22\u6210\u8bed \n\u529f\u80fd\u8bf4\u660e\uff1a\n``` \nsearch_idiom(word, position=0, count=1, is_detail=False)\n :param word: str,\u5173\u952e\u8bcd\n :param position: int, \u6240\u5728\u4f4d\u7f6e\uff0c\u9ed8\u8ba4\u4e3a\uff1a0\n :param count: int \uff0c\u8fd4\u56de\u6700\u5927\u6570\u91cf \u9ed8\u8ba4\u4e3a\uff1a 1\n :param is_detail: bool,\u662f\u5426\u8fd4\u56de\u8be6\u7ec6\u5185\u5bb9\uff08\u5305\u62ec\uff1a\u62fc\u97f3\uff0c\u62fc\u97f3\u7f29\u5199\uff0c\u89e3\u91ca\uff0c\u6765\u6e90\uff0c\u9020\u53e5\uff09\n :return: list\n```\n\n\u5b9e\u7528\u5f0f\u4f8b 1\uff1a\u7b80\u5355\u67e5\u8be2 \n\n```\nidiom.search_idiom(word='\u732a')\n>>> ['\u6307\u732a\u9a82\u72d7']\n```\n\n\u5b9e\u7528\u5f0f\u4f8b 2\uff1a\u67e5\u8be2\u6210\u8bed\u7b2c 2 \u4e2a\u5b57\u662f\u300e\u5fc3\u300f\u7684\u6210\u8bed\uff0c\u6700\u5927\u67e5\u8be2\u6570\u91cf\u4e3a 2, \u8fd4\u56de\u8be6\u7ec6\u5185\u5bb9\u3002 \n\n```\nidiom.search_idiom(word='\u5fc3', position=2, count=2, is_detail=True)\n>>> \n[{'word': '\u70ed\u5fc3\u5feb\u80a0',\n 'pinyin': 'r\u00e8 x\u012bn ku\u00e0i ch\u00e1ng',\n 'abbreviation': 'rxkc',\n 'explanation': '\u5f62\u5bb9\u70ed\u60c5\u76f4\u723d\u3002',\n 'derivation': '\u67ef\u5ca9\u300a\u5947\u5f02\u7684\u4e66\u7b80\u00b7\u4e1c\u65b9\u7684\u660e\u73e0\u4e09\u300b\u4e5f\u8bb8\u56e0\u4e3a\u662f\u5979\u70ed\u5fc3\u5feb\u80a0\uff0c\u7fa4\u4f17\u6709\u4e8b\u7231\u627e\u5979\u62ff\u4e3b\u610f\uff0c\u5e2e\u4e2a\u5fd9\u3002\u201d',\n 'example': '\u65e0'},\n {'word': '\u4eba\u5fc3\u5927\u5feb',\n 'pinyin': 'r\u00e9n x\u012bn d\u00e0 ku\u00e0i',\n 'abbreviation': 'rxdk',\n 'explanation': '\u5feb\u75db\u5feb\u3002\u6307\u574f\u4eba\u574f\u4e8b\u53d7\u5230\u60e9\u7f5a\u6216\u6253\u51fb\uff0c\u4f7f\u5927\u5bb6\u975e\u5e38\u75db\u5feb\u3002',\n 'derivation': '\u660e\u00b7\u6c88\u5fb7\u7b26\u300a\u4e07\u5386\u91ce\u83b7\u7f16\u00b7\u7acb\u67b7\u300b\u4e1c\u5c71\u53d7\u6069\u53cd\u566c\uff0c\u5176\u7f6a\u76d6\u6d6e\u4e8e\u8bf8\u9f99\u5149\u3002\u5f53\u65f6\u4eba\u5fc3\u5927\u5feb\uff0c\u4f50\u4ee5\u6b64\u5f97\u7f19\u7ec5\u95fb\u58f0\uff0c\u7136\u4ea6\u4e0d\u4e91\u7acb\u67b7\u3002\u201d',\n 'example': '\u65e0'}]\n```\n\n### 3. \u6210\u8bed\u63a5\u9f99 \n\n\u529f\u80fd\u8bf4\u660e\uff1a \n\n```\ndef next_idioms_solitaire(word, count=1, heteronym=True, smaller=False):\n \"\"\"\n :param word: str, \u6210\u8bed\n :param count: int, \u8fd4\u56de\u6570\u91cf\n :param heteronym: bool,\u662f\u5426\u53ef\u4ee5\u4f7f\u7528\u540c\u97f3\u5b57\n :param smaller: bool, \u662f\u5426\u9009\u62e9\u5c3d\u53ef\u80fd\u7684\u5c11\u7684\u540e\u7eed\n :return: list\n \"\"\"\n```\n\n\u5f0f\u4f8b\u4ee3\u7801 1 : \n```\nidiom.next_idioms_solitaire('\u4e00\u751f\u4e00\u4e16')\n>>> ['\u901d\u5c06\u53bb\u6c5d']\n```\n\n\u5f0f\u4f8b\u4ee3\u7801 2 \uff1a\n\n```\nidiom.next_idioms_solitaire('\u4e00\u751f\u4e00\u4e16', count=3, heteronym=False)\n>>> ['\u4e16\u6001\u708e\u51c9', '\u4e16\u4ee3\u4e66\u9999', '\u4e16\u4e0a\u65e0\u96be\u4e8b']\n```\n\u4ee3\u7801\u8bf4\u660e\uff1a\u83b7\u53d6\u53ef\u63a5\u300e\u4e00\u751f\u4e00\u4e16\u300f\u7684\u6210\u8bed\u3002\u8fd4\u56de\u6700\u5927\u6570\u91cf\u4e3a 3\u3002\u4e0d\u80fd\u7528\u4e8e\u540c\u97f3\u5b57\u3002 \n\n### 4. \u5224\u65ad\u4e24\u4e2a\u6210\u8bed\u662f\u5426\u80fd\u63a5\u9f99\u3002\n\n\u793a\u4f8b\u4ee3\u7801\uff1a\n\n```\nidiom.is_idiom_solitaire('\u4e00\u751f\u4e00\u4e16', '\u901d\u5c06\u53bb\u6c5d')\n>>> True\n\nidiom.is_idiom_solitaire('\u4e00\u751f\u4e00\u4e16', '\u751f\u751f\u4e16\u4e16')\n>>> False\n\n```\n\n### 5. \u81ea\u52a8\u63a5\u9f99\u6a21\u5f0f\u3002 \n\n\u8f93\u5165\u4e00\u4e2a\u6c49\u5b57\u6216\u8005\u6210\u8bed\uff0c\u7a0b\u5e8f\u81ea\u52a8\u8f93\u51fa\u4e00\u7ec4\u6210\u8bed\u63a5\u9f99\u7684\u7ed3\u679c\u3002 \n\n\u529f\u80fd\u8bf4\u660e\uff1a \n\n```\ndef auto_idioms_solitaire(word, max_count=10, heteronym=True):\n \"\"\"\n \u81ea\u52a8\u63a5\u9f99\u6a21\u5f0f - \u8f93\u5165\u4e00\u4e2a\u6c49\u5b57\u6216\u8005\u6210\u8bed\uff0c\u7a0b\u5e8f\u81ea\u52a8\u8f93\u51fa\u4e00\u7ec4\u6210\u8bed\u63a5\u9f99\u7684\u7ed3\u679c\u3002\n :param word: str \u8d77\u59cb\u6c49\u5b57\u6216\u8005\u6210\u8bed\u3002\n :param max_count: int, \u6700\u5927\u957f\u5ea6\u3002\u9ed8\u8ba4\u6700\u5927\u957f\u5ea6\uff1a20\u3002\n :param heteronym: bool, \u662f\u5426\u53ef\u4ee5\u7528\u540c\u97f3\u5b57\u3002\u9ed8\u8ba4 True\u3002\n :return: list\n \"\"\"\n```\n\n\u793a\u4f8b\u4ee3\u7801\uff1a \n```\nidiom.auto_idioms_solitaire('\u4e00\u751f\u4e00\u4e16')\n>>>\n[\"\u4e00\u751f\u4e00\u4e16\", \"\u9002\u5fc3\u5a31\u76ee\", \"\u76ee\u5154\u987e\u72ac\", \"\u72ac\u9a6c\u4e4b\u529b\", \"\u7acb\u65f6\u4e09\u523b\", \"\u523b\u610f\u7ecf\u8425\", \"\u8747\u7caa\u70b9\u7389\", \"\u9b3b\u9a7d\u7a83\u4ef7\", \"\u9a7e\u8f7b\u5c31\u719f\", \"\u719f\u8def\u8f7b\u8f99\"]\n```\n\n## \u8d44\u6e90\u6587\u4ef6\n\n* \u6e90\u6570\u636e\u6765\u6e90\uff1ahttps://github.com/pwxcoo/chinese-xinhua\u3002 \n\n \u7ecf\u8fc7\u5927\u91cf\u8f83\u6b63\u540e\uff0c\u5f97\u5230\u4e0b\u4e00\u4efd\u6570\u636e\uff1a \n\n* [idiom.csv](https://github.com/sfyc23/China-idiom/blob/master/china_idiom/idiom.csv)\n\n\n## Lincese\n\n MIT License\n\n Copyright (c) 2019 Thunder Bouble\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/sfyc23/China-idiom", "keywords": "China,idiom,\u6210\u8bed,\u6210\u8bed\u63a5\u9f99,\u6210\u8bed\u5927\u5168", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "china-idiom", "package_url": "https://pypi.org/project/china-idiom/", "platform": "", "project_url": "https://pypi.org/project/china-idiom/", "project_urls": { "Homepage": "https://github.com/sfyc23/China-idiom" }, "release_url": "https://pypi.org/project/china-idiom/0.0.2/", "requires_dist": [ "pandas (>=0.23.4)" ], "requires_python": ">=3.6.0", "summary": "\u6210\u8bed\u4e0e\u6210\u8bed\u63a5\u9f99\u67e5\u8be2\u5de5\u5177", "version": "0.0.2" }, "last_serial": 5963821, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "726a48a34c58019c7a16edc27d393fb0", "sha256": "f2cfc3b0cfb626cc7becbe457a7d94859c0fedd509c5f555526acdacb1851a75" }, "downloads": -1, "filename": "china_idiom-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "726a48a34c58019c7a16edc27d393fb0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 4272396, "upload_time": "2019-10-12T09:24:53", "url": "https://files.pythonhosted.org/packages/98/0f/d2abc6c5b9d9d4129a16ac440b61953bcbc01e67ac4c0bc38cdaa7c4d87d/china_idiom-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf9b2487f537f098fa11ebc4cac18169", "sha256": "992d3068305952a8dfc3290c798bf90c0d68d1d2b0ba3d99bf1273946b59b7ee" }, "downloads": -1, "filename": "china_idiom-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cf9b2487f537f098fa11ebc4cac18169", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 6339, "upload_time": "2019-10-12T09:24:56", "url": "https://files.pythonhosted.org/packages/57/09/d75a4a8d39b99ca57e5c2e319edebfbaec2c26dfed79ac2365c0928b9dc0/china_idiom-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "aa944ce61e8a4fdb924eec7831216774", "sha256": "9ee79b99c3e917249b08816f9949fe08ec251ddb962db3ab1d7b7dc6a435f0ac" }, "downloads": -1, "filename": "china_idiom-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "aa944ce61e8a4fdb924eec7831216774", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 4274274, "upload_time": "2019-10-12T10:23:38", "url": "https://files.pythonhosted.org/packages/00/50/cf97e01b4be769d62166a213c816169ec2a0f8811075570496e7a506ef44/china_idiom-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03f9de1ec7a95a761a23e5270df56dae", "sha256": "b2fc3bfd060667d736ac8e4d31a66844134d33b4d7a156dac622496abcbb068e" }, "downloads": -1, "filename": "china_idiom-0.0.2.tar.gz", "has_sig": false, "md5_digest": "03f9de1ec7a95a761a23e5270df56dae", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 4258129, "upload_time": "2019-10-12T10:23:42", "url": "https://files.pythonhosted.org/packages/60/1c/96388960906bd1351440feabb9d292ca8221b7cd8c0b39a02e07f5a971c8/china_idiom-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aa944ce61e8a4fdb924eec7831216774", "sha256": "9ee79b99c3e917249b08816f9949fe08ec251ddb962db3ab1d7b7dc6a435f0ac" }, "downloads": -1, "filename": "china_idiom-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "aa944ce61e8a4fdb924eec7831216774", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 4274274, "upload_time": "2019-10-12T10:23:38", "url": "https://files.pythonhosted.org/packages/00/50/cf97e01b4be769d62166a213c816169ec2a0f8811075570496e7a506ef44/china_idiom-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03f9de1ec7a95a761a23e5270df56dae", "sha256": "b2fc3bfd060667d736ac8e4d31a66844134d33b4d7a156dac622496abcbb068e" }, "downloads": -1, "filename": "china_idiom-0.0.2.tar.gz", "has_sig": false, "md5_digest": "03f9de1ec7a95a761a23e5270df56dae", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 4258129, "upload_time": "2019-10-12T10:23:42", "url": "https://files.pythonhosted.org/packages/60/1c/96388960906bd1351440feabb9d292ca8221b7cd8c0b39a02e07f5a971c8/china_idiom-0.0.2.tar.gz" } ] }