{ "info": { "author": "Ben Hoyle", "author_email": "benjhoyle@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Copyright (c) 2016 Ben Hoyle\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, including without limitation the rights\nto use, copy, modify, merge, publish, and distribute copies of the Software, \nand to permit persons to whom the Software is furnished to do so, subject to \nthe 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\nDescription: A bag of functions and datamodels for playing around with patent data.\n \n See ```requirements.txt``` for dependencies.\n \n ## EPO OPS Data\n \n The functions in ```patentdata.py``` help with automating applicant searches\n using the EPO OPS service.\n \n To use the EPO OPS service you need to enter your consumer key and secret in a \n ```config.ini``` file in the ```data``` directory. These should be entered as follows:\n ```\n [Login Parameters]\n C_KEY=xxxxxxxxxxxxxxxxxxxxx\n C_SECRET=bbbbbbbbbbbbbbbbbbb\n ```\n \n ## USPTO Data\n \n The functions in ```corpus.py``` can be used to help parse downloaded USPTO patent data.\n \n These functions can parse and extract the compressed files in situ without needing extraction.\n \n Download data from 2001 to 2015 [here](https://www.google.com/googlebooks/uspto-patents-applications-text-with-embedded-images.html).\n \n Initialise a corpus by passing the path of the data directory, e.g.:\n ```\n import corpus\n c = corpus.USPublications(\"/path/to/downloaded/data/2005\")\n ```\n \n This will perform a first level of file scanning. It is recommended to generate\n separate objects for each year. (There are a lot of files!)\n \n ### Lazy Retrieval Options\n \n There are a number of methods that allow you to retrieve patentdata without storing\n large arrays in memory. \n \n For example:\n ```\n xml_generator = c.iter_xml()\n ```\n creates a generator that iterates through the patent publications in the path.\n You can use this in methods such as:\n ```\n for xmldoc in xml_generator:\n xmldoc.title()\n ```\n There is also a search function that takes a publication number (e.g. 'US20050123456')\n as input and returns a Patent Doc object if the publication number exists, e.g.:\n ```\n pd = c.get_patentdoc('US20050123456')\n ```\n \n ### Quicker Methods that Create an Index of Files\n \n There are also quicker retrieval methods that use a list of all the separate patent files.\n These methods may lead to memory errors and slow performance on older machines.\n \n To get a list of all the files use the method:\n ```\n c.get_archive_list()\n ```\n \n (This can take a while - have a cup of tea.)\n \n On big collections (e.g. 15 years worth) this tends to generate memory errors.\n \n Individual publications can then be retrieved using an index. \n \n The files can be viewed using the attribute:\n ```\n c.archive_file_list\n ```\n \n And filedata for a particular file in the list may be retrieved by:\n ```\n filedata = c.read_xml([index])\n ```\n where \"[index]\" is replaced by an integer representing the index in archive_file_list.\n \n ### XMLDoc PatentDoc Objects\n \n There are two objects that may be used to play with the patent data.\n \n #### XMLDoc\n \n The first is a wrapper for XML data called XMLDoc.\n \n For example, text may be extracted by processing the filedata obtained above as XML.\n ```\n xmldoc = corpus.XMLDoc(filedata)\n xmldoc.title()\n xmldoc.description_text()\n xmldoc.claim_text()\n xmldoc.all_text() \n ```\n This text may form the input for natural language processing analysis.\n \n #### PatentDoc\n \n The PatentDoc object is independent of the underlying XML. \n \n The XMLDoc to_patentdoc() method returns a PatentDoc object from an XMLDoc object.\n \n It has some methods for natural language processing of the patent elements. \n These can be found in the ```corpus_models.py``` file in the ```models``` folder.\n For example:\n ```\n pd = c.get_patentdoc('US20050123456')\n pd = c.get_doc(i).to_patentdoc()\n \n pd.reading_time(reading_rate=100)\n pd.description.text()\n pd.claimset.get_claim(1).get_dependency_groups()\n pd.claimset.get_claim(10).split_into_features()\n ```\n \n Caveat: There may be a few bugs. I am testing (and building some tests) to squash these.\n Package will improve with time.\n \nPlatform: UNKNOWN", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/benhoyle/patentdata", "keywords": "", "license": "License", "maintainer": "", "maintainer_email": "", "name": "patentdata", "package_url": "https://pypi.org/project/patentdata/", "platform": null, "project_url": "https://pypi.org/project/patentdata/", "project_urls": { "Homepage": "https://github.com/benhoyle/patentdata" }, "release_url": "https://pypi.org/project/patentdata/0.0.7/", "requires_dist": [ "beautifulsoup4 (>=4.5.3)", "lxml (>=3.7.3)", "nltk (>=3.2.2)", "pytest (>=3.0.6)", "python-dateutil (>=2.6.0)", "python-epo-ops-client (>=2.1.0)", "requests (>=2.13.0)", "six (>=1.10.0)" ], "requires_python": "", "summary": "A bag of functions and datamodels for playing around with patent data.", "version": "0.0.7" }, "last_serial": 2895454, "releases": { "0.0.5": [ { "comment_text": "", "digests": { "md5": "8184841841f73609dafa7e65808e0507", "sha256": "0c6d3fbed10705fe5b1a2afa5a988d8853750eadd3df0a3d3a3f7af43924a37a" }, "downloads": -1, "filename": "patentdata-0.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "8184841841f73609dafa7e65808e0507", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 41265, "upload_time": "2017-05-24T08:53:38", "url": "https://files.pythonhosted.org/packages/b9/62/ec1dba70c07da719854f99b110295d9eac5fcc96e21139a2aebfd0e69aef/patentdata-0.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "277f6ecf46c456cc18c651df70be4ceb", "sha256": "e826d28fae6c8a174138bdaedc4e39661b037a22bc8bf69a8e6f9adb18dea736" }, "downloads": -1, "filename": "patentdata-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "277f6ecf46c456cc18c651df70be4ceb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 41268, "upload_time": "2017-05-24T08:53:42", "url": "https://files.pythonhosted.org/packages/f1/10/3911e76c6029a2f36134c58857a8b465e79fcc01a0f99d66694198461085/patentdata-0.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "37a47719ee8fff472ff4990583af27a4", "sha256": "388d7ecedb8d8a9c948fefa99ac5909fcb1a4ca7b02bf01c62934c8aeea79dad" }, "downloads": -1, "filename": "patentdata-0.0.5.tar.gz", "has_sig": false, "md5_digest": "37a47719ee8fff472ff4990583af27a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29038, "upload_time": "2017-05-24T08:53:47", "url": "https://files.pythonhosted.org/packages/9f/bc/5f779b270bddd1c6d5972d97f55ae6618c984ffc51b2e86ad1f6e795f4de/patentdata-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "7dbbe5eb43c74b586312f8ec4ba936f9", "sha256": "3009418b70442477959360da21727d9872ff7a2193bb58e5d6afadab7ba171cd" }, "downloads": -1, "filename": "patentdata-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7dbbe5eb43c74b586312f8ec4ba936f9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 41282, "upload_time": "2017-05-24T09:04:13", "url": "https://files.pythonhosted.org/packages/1a/51/a10e7422aa6ad66503f88d863a24d7376aeb0bd1d557f778d4975986908e/patentdata-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9495f32b87fbef05ccc0ead9d9b31e87", "sha256": "904c6893c3b107c6455902db8523ea6408519672ead4184e9775e0faf1e253d7" }, "downloads": -1, "filename": "patentdata-0.0.6.tar.gz", "has_sig": false, "md5_digest": "9495f32b87fbef05ccc0ead9d9b31e87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29036, "upload_time": "2017-05-24T09:04:15", "url": "https://files.pythonhosted.org/packages/cc/d5/c37a2e18d96e6bb05eff6326dbf4f1f3e2390d3dfb7907a257c777ab7712/patentdata-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "638af268f4975b40c7d4b4889bf78c99", "sha256": "2b11b8a6432340b64fa1955cc8814053b84ff0703899e3b83550c125870946d4" }, "downloads": -1, "filename": "patentdata-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "638af268f4975b40c7d4b4889bf78c99", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 41297, "upload_time": "2017-05-24T09:47:52", "url": "https://files.pythonhosted.org/packages/a1/ac/8297dd50ba528428abab361bb4f5385a42cf8e4617c87b768f1726172047/patentdata-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ab4c3d2dddd67663af0dbaec53492cf", "sha256": "8334e5c4ed87e02c9b7a1e6bce4dcf86166f8717dcfa33746b157df3625eca10" }, "downloads": -1, "filename": "patentdata-0.0.7.tar.gz", "has_sig": false, "md5_digest": "6ab4c3d2dddd67663af0dbaec53492cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29096, "upload_time": "2017-05-24T09:47:54", "url": "https://files.pythonhosted.org/packages/52/49/4c4cfd6265576ec2cfd4599b9504555fc1214c256e6890653e94722c9b64/patentdata-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "638af268f4975b40c7d4b4889bf78c99", "sha256": "2b11b8a6432340b64fa1955cc8814053b84ff0703899e3b83550c125870946d4" }, "downloads": -1, "filename": "patentdata-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "638af268f4975b40c7d4b4889bf78c99", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 41297, "upload_time": "2017-05-24T09:47:52", "url": "https://files.pythonhosted.org/packages/a1/ac/8297dd50ba528428abab361bb4f5385a42cf8e4617c87b768f1726172047/patentdata-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ab4c3d2dddd67663af0dbaec53492cf", "sha256": "8334e5c4ed87e02c9b7a1e6bce4dcf86166f8717dcfa33746b157df3625eca10" }, "downloads": -1, "filename": "patentdata-0.0.7.tar.gz", "has_sig": false, "md5_digest": "6ab4c3d2dddd67663af0dbaec53492cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29096, "upload_time": "2017-05-24T09:47:54", "url": "https://files.pythonhosted.org/packages/52/49/4c4cfd6265576ec2cfd4599b9504555fc1214c256e6890653e94722c9b64/patentdata-0.0.7.tar.gz" } ] }