Skip to content

Commit

Permalink
Setup.py and requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
aquemy committed Aug 4, 2019
1 parent faff176 commit e2593ce
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 5 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ The building chain starts from scratch and consists in the following steps:

# Installation & Usage


## NLTK packages

In order to parse and normalize the documents, the following packages from ```nltk``` have to be installed: ```stopwords```, ```averaged_perceptron_tagger``` and ```wordnet```. To install them, start ```bin/download-nltk```:
```
python bin/download-nltk
```

## Webdrivers

In order to automatically retrieve the number of documents available on HUDOC, Selenium is installed as a dependency. For Selenium to work, a webdriver is mandatory and must be manually installed. See [Selenium documentation](https://selenium-python.readthedocs.io/installation.html#drivers) for help.
Expand Down
13 changes: 8 additions & 5 deletions bin/download-nltk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

import nltk

nltk.downloader.download('maxent_ne_chunker')
nltk.downloader.download('words')
nltk.downloader.download('treebank')
nltk.downloader.download('maxent_treebank_pos_tagger')
nltk.downloader.download('punkt')
nltk.download('maxent_ne_chunker')
nltk.download('words')
nltk.download('treebank')
nltk.download('maxent_treebank_pos_tagger')
nltk.download('punkt')
nltk.download('wordnet')
nltk.download('stopwords')
nltk.download('averaged_perceptron_tagger')
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
requests
gensim
python-docx
unidecode
nltk
numpy
matplotlib
selenium
36 changes: 36 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from setuptools import setup, find_packages
from os import path
from io import open

here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

with open('requirements.txt') as f:
requirements = f.read().splitlines()

setup(
name='echr_process',
version='1.0.2',
description='European Court of Human Rights OpenData construction process',
long_description=long_description,
long_description_content_type='text/markdown', # Optional (see note above)
url='https://github.com/aquemy/ECHR-OD_process', # Optional
author='Alexandre Quemy',
author_email='[email protected]', # Optional
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
],
keywords='classification justice prediction',
install_requires=requirements,
project_urls={
'Bug Reports': 'https://github.com/aquemy/ECHR-OD_process/issues',
'Say Thanks!': 'https://saythanks.io/to/aquemy',
'Source': 'https://github.com/aquemy/ECHR-OD_process',
},
)

0 comments on commit e2593ce

Please sign in to comment.