-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
129 lines (96 loc) · 3.74 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
"""
Insults
---------
TLDR: This project is very similar in functionality and purpose to Google's recent `Perspective API <https://www.perspectiveapi.com/>`_ project
Usage
````````````
Save in a hello.py: ::
from insults import Insults
comment = "You are a disgusting maggot of a person."
Insults.load_model()
Insults.rate_comment(comment)
> 0.89
Install
`````````````````
With PIP and this command: ::
$ pip install insults
Links
`````
* `Perspective API website <https://www.perspectiveapi.com/>`_
* `Github Repo: <https://github.com/thundergolfer/Insults>`_
Credit
``````
* `cbrew <https://github.com/cbrew>`_ for their original data-science work in `Imperium's Kaggle Competition <https://www.kaggle.com/c/detecting-insults-in-social-commentary>`_. Code in `cbrew/Insults <https://github.com/cbrew/Insults>`_
"""
import os
from distutils.core import setup
from setuptools import find_packages
def get_pip_dependencies():
this_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_dir, 'requirements.txt'), 'r') as pip_requirements:
package_list = [package for package in pip_requirements]
return package_list
setup(
name = 'insults',
packages = find_packages(exclude=['scripts', 'docs', 'tests*']),
version = '0.1.12',
description = 'Identify insulting comments and users on social media',
long_description=__doc__,
author = 'Jonathon Belotti',
author_email = '[email protected]',
url = 'https://github.com/thundergolfer/Insults', # use the URL to the github repo
download_url = 'https://github.com/thundergolfer/Insult/tarball/0.1', # I'll explain this in a second
keywords = ['machine-learning', 'social-media', 'community', 'data-science'], # arbitrary keywords
classifiers = [],
install_requires = [
'pyparsing==1.5.6',
'python-dateutil==2.4.1',
'pytest==3.0.6',
'Pytz==2016.7',
'scikit-learn==0.18.1',
'scipy==0.18.1',
'six==1.10.0',
'pandas==0.19.2',
'futures==2.2.0',
'nltk==3.0'
],
# If there are data files included in your packages that need to be
# installed in site-packages, specify them here. If using Python 2.6 or less, then these
# have to be included in MANIFEST.in as well.
include_package_data=True,
# relative to the vfclust directory
package_data={
'Data/Estimates':
['Data/Estimates/estimates.csv'],
'Data/Final':
['Data/Final/README.md',
'Data/Final/final1.csv',
'Data/Final/final2.csv',
'Data/Final/final8.csv',
'Data/Final/final9.csv',
'Data/Final/final10.csv'
],
'Data/Inputs':
['Data/Inputs/final.csv',
'Data/Inputs/fulltrain.csv',
'Data/Inputs/sample_submission_null.csv',
'Data/Inputs/test.csv',
'Data/Inputs/test_with_solutions.csv',
'Data/Inputs/train.csv'
],
'Data/Submissions':
['Data/Submissions/submission1.csv',
'Data/Submissions/submission2.csv',
'Data/Submissions/submission3.csv'
],
'models':
['models/insult_classifier.joblib.pkl']
}
)
## FOR download_url
# The download_url is a link to a hosted file with your repository's code.
# Github will host this for you, but only if you create a git tag.
# In your repository, type:
# git tag 0.1 -m "Adds a tag so that we can put this on PyPI.".
# Then, type git tag to show a list of tags. you should see 0.1 in the list.
# Type git push --tags origin master to update your code on Github with the latest tag information. Github creates tarballs for download at https://github.com/{username}/{module_name}/tarball/{tag}.