Metadata-Version: 2.1
Name: patent-parsing-tools
Version: 0.9.2
Summary: patent-parsing-tools is a library providing tools for generating training and test set from Google's USPTO data helpful with for testing machine learning algorithms
Home-page: https://bitbucket.org/ml-patents/patent-parsing-tools
Author: Michal Dul, Piotr Przetacznik, Krzysztof Strojny
Author-email: piotr.przetacznik@gmail.com
License: MIT
Keywords: deeplearning dbn rbm rsm backpropagation precission recall
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: lxml
Requires-Dist: nltk
Requires-Dist: stemming
Requires-Dist: Sphinx
Requires-Dist: requests
Requires-Dist: numpy
Requires-Dist: Theano
Requires-Dist: mypy
Requires-Dist: pytest

patent-parsing-tools
====================

[![Build Status](https://travis-ci.org/pprzetacznik/patent-parsing-tools.svg?branch=master)](https://travis-ci.org/pprzetacznik/patent-parsing-tools)
[![Documentation Status](https://readthedocs.org/projects/patent-parsing-tools/badge/?version=latest)](https://patent-parsing-tools.readthedocs.io/en/latest/?badge=latest)
![patent-parsing-tools CI](https://github.com/pprzetacznik/patent-parsing-tools/workflows/patent-parsing-tools%20CI/badge.svg)

## Documentation

[Read the docs](https://patent-parsing-tools.readthedocs.io/en/latest/)

## System requirements:

```Bash
sudo yum install python-devel libxslt-devel libxml2-devel
```

## Python requirements:

```Bash
pip install -r requirements.txt
```

## Running:

Collecting and serializing data:
```Bash
python -m patent_parsing_tools.supervisor [working_directory] [train_destination] [test_destination] [year_from] [year_to]
```

Eg.
```Bash
python -m patent_parsing_tools.supervisor patents/working_directory patents/train_destination patents/test_destination 2014 2015
```

Generating dictionary with train set:
```Bash
python -m patent_parsing_tools.bow.dictionary_maker [train_directory] [max_parsed_patents] [dict_max_size] [dictionary_name]
```

Eg.
```Bash
python -m patent_parsing_tools.bow.dictionary_maker patents/train_destination 1000000000 4096 dictionary.txt
```

Generate bag of words with train set and test set:
```Bash
python -m patent_parsing_tools.bow.bag_of_words [directory_with_serialized_patents] [destination_directory] [dictionary.txt] [package_size > 1024]
```

Eg.
```Bash
python -m patent_parsing_tools.bow.bag_of_words patents/train_destination patents/final_dataset_train dictionary.txt 1048576
python -m patent_parsing_tools.bow.bag_of_words patents/test_destination patents/final_dataset_test dictionary.txt 1048576
```

## Running tests

```Bash
python -m unittest discover .
```


