{ "info": { "author": "Ashyam Zubair", "author_email": "ashyamzubair@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Word to Number\nThis is a slightly modified version of Akshay Nagpal's [w2n](https://github.com/akshaynagpal/w2) package which converts number in words to numeric value. This one is specifically for the **Indian Number System**.\nThis module converts number in words to numeric value. (eg. eighty four -> 84).\nIt uses **Indian Number System** (i.e. lakhs and crores).\nBelow is the installation, usage and other details of this module.\n\n## Installation\n### Manual\n* Download the **word_to_num.py**\n* Paste it in your project location\n* Import and use\n### Using pip\nPlease ensure that you have **updated pip** to the latest version before installing word2number.\n\n```\n pip install WordToNum\n```\n\n## Usage\n\nImport the module\n```\n from WordToNum.word_to_num import WordToNum\n```\nInstantiate the object\n```\n wtn = WordToNum()\n```\nThen you can use the **to_num** method from this class to convert a string to numeric digits, as shown below.\n```\nwtn.to_num('two lakhs three thousand nine hundred and eighty four')\n203984\n```\n```\nwtn.to_num('one hundred thirty-five'))\n135\n```\nIt also supports decimal points\n```\nwtn.to_num('twenty six point three')\n26.3\n```\n```\nwtn.to_num('point one'))\n0.1\n```\nMost of the errors are raised\n```\nwtn.to_num('three thousand lakh'))\nValueError: Malformed number! Please enter a valid number word (eg. two lakhs twenty three thousand and forty nine)\n```\n```\nwtn.to_num('Some text'))\nValueError: No valid number words found! Please enter a valid number word (eg. two million twenty three thousand and forty nine)\n```\n## Bugs/Errors\n\nIf you find any bugs/errors in the usage of above code, please raise an issue through [Github](http://github.com/ashyamzubair/WordToNum). If you don't know how to use Github or raise an issue through it, send an email to ashyamzubair@gmail.com with a clear example that can reproduce the issue.\n\n## License\nThe MIT License (MIT)\n\nCopyright (c) 2016 Akshay Nagpal (https://github.com/akshaynagpal)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\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/ashyam95/WordToNum", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "WordToNum", "package_url": "https://pypi.org/project/WordToNum/", "platform": "", "project_url": "https://pypi.org/project/WordToNum/", "project_urls": { "Homepage": "https://github.com/ashyam95/WordToNum" }, "release_url": "https://pypi.org/project/WordToNum/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Converts word in string to actual number", "version": "0.0.4" }, "last_serial": 4327093, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "2da11936a090ecc17dc775444973b493", "sha256": "698b80f9cd8ebe5fd119d3a0822a8060a2a521ef7a58930cef474d60fee76d73" }, "downloads": -1, "filename": "WordToNum-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2da11936a090ecc17dc775444973b493", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4953, "upload_time": "2018-10-01T07:32:13", "url": "https://files.pythonhosted.org/packages/d0/40/d21d1fc3bd37e9c91d0190500e182629cba29c2aa6307938b5dbd0d0d317/WordToNum-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "04d6359f474c53f3acf54e2e5acfeb4e", "sha256": "58a31bef868d71c2083dd20d4f7eb7b030198e2ac7c6707d76045147c86d1784" }, "downloads": -1, "filename": "WordToNum-0.0.2.tar.gz", "has_sig": false, "md5_digest": "04d6359f474c53f3acf54e2e5acfeb4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4631, "upload_time": "2018-10-01T07:32:15", "url": "https://files.pythonhosted.org/packages/04/83/b771414d8de02ae3569b7665de2526b274aace550a98dc21147433dee0db/WordToNum-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "6b23645740c70e39de3db50479bfa4eb", "sha256": "31cda1983f16186bbc5423f6073d4868fa208f276ba7aa93cce78683810209e9" }, "downloads": -1, "filename": "WordToNum-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6b23645740c70e39de3db50479bfa4eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4950, "upload_time": "2018-10-01T07:39:10", "url": "https://files.pythonhosted.org/packages/1e/f1/b094ea29df1872beabd492af33afa6416dc89318a2f9538f25923ac1449e/WordToNum-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea31491c15609e7d77b4d05730bda246", "sha256": "9d8fbf7cea86c9f157ae40c466d16a10c8f22975577dc27a00260120dfbf14d9" }, "downloads": -1, "filename": "WordToNum-0.0.3.tar.gz", "has_sig": false, "md5_digest": "ea31491c15609e7d77b4d05730bda246", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4628, "upload_time": "2018-10-01T07:39:13", "url": "https://files.pythonhosted.org/packages/8e/a9/177cd0a5ae72953414ba76e29eb0b1ae8be418b4fc85a1e937711b15e8c0/WordToNum-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "1e1d8ddb060ae1c47ceff1af122ed542", "sha256": "788b48fc202206fec6ab67ce81df24df8f5ac0718d918c0612a76dc9dbad40f5" }, "downloads": -1, "filename": "WordToNum-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1e1d8ddb060ae1c47ceff1af122ed542", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4945, "upload_time": "2018-10-01T07:41:21", "url": "https://files.pythonhosted.org/packages/38/9d/2e339e24edf2ec2338bfef9c2587fcc668e7de632bcfa68d178b02aaef35/WordToNum-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "17d5ada61353886c1801edea172eb870", "sha256": "2b4601410338cf4957c8719376e0d9353b6a478449f691d2337fe7fb853e6592" }, "downloads": -1, "filename": "WordToNum-0.0.4.tar.gz", "has_sig": false, "md5_digest": "17d5ada61353886c1801edea172eb870", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4624, "upload_time": "2018-10-01T07:41:23", "url": "https://files.pythonhosted.org/packages/6a/3b/91bbd9b717e1eaeb005b40ee1709a55bef0085a11125b944515fb1b07e66/WordToNum-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e1d8ddb060ae1c47ceff1af122ed542", "sha256": "788b48fc202206fec6ab67ce81df24df8f5ac0718d918c0612a76dc9dbad40f5" }, "downloads": -1, "filename": "WordToNum-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1e1d8ddb060ae1c47ceff1af122ed542", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4945, "upload_time": "2018-10-01T07:41:21", "url": "https://files.pythonhosted.org/packages/38/9d/2e339e24edf2ec2338bfef9c2587fcc668e7de632bcfa68d178b02aaef35/WordToNum-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "17d5ada61353886c1801edea172eb870", "sha256": "2b4601410338cf4957c8719376e0d9353b6a478449f691d2337fe7fb853e6592" }, "downloads": -1, "filename": "WordToNum-0.0.4.tar.gz", "has_sig": false, "md5_digest": "17d5ada61353886c1801edea172eb870", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4624, "upload_time": "2018-10-01T07:41:23", "url": "https://files.pythonhosted.org/packages/6a/3b/91bbd9b717e1eaeb005b40ee1709a55bef0085a11125b944515fb1b07e66/WordToNum-0.0.4.tar.gz" } ] }