From 45de900094e71b52f0bf93a8a6c7d6d7e9a7ab6c Mon Sep 17 00:00:00 2001 From: supermirooo Date: Sat, 11 May 2019 15:21:13 +0200 Subject: [PATCH] Restructure --- LICENSE.txt | 17 ++++++++++++++++ README.md | 30 +++++++++++++++++++++++++++++ __init__.py => eazymind/__init__.py | 0 {nlp => eazymind/nlp}/__init__.py | 0 {nlp => eazymind/nlp}/eazysum.py | 0 test.py => eazymind/test.py | 0 setup.cfg | 3 +++ setup.py | 25 ++++++++++++++++++++++++ 8 files changed, 75 insertions(+) create mode 100644 LICENSE.txt create mode 100644 README.md rename __init__.py => eazymind/__init__.py (100%) rename {nlp => eazymind/nlp}/__init__.py (100%) rename {nlp => eazymind/nlp}/eazysum.py (100%) rename test.py => eazymind/test.py (100%) create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..d320af2 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,17 @@ +MIT License +Copyright (c) 2018 amr zaki +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..29db211 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# EazyMind + +**EazyMind** provides **ai-as-a-service** for **abstractive text summarizaion** , you simply provide your +1. Sentence to be summarized +2. Api key [from free registeration on eazymind website ](http://eazymind.herokuapp.com/arabic_sum) + +------------------------------------------------- +## Insatllation : +1. Regsiter a Free account on [EazyMind](http://eazymind.herokuapp.com/arabic_sum) +2. ```pip install eazymind``` + +------------------------------------------------- +## Usage : +``` +from nlp.eazysum import Summarizer + +#---key from eazymind website--- +key = "xxxxxxxxxxxxxxxxxxxxx" + +#---sentence to be summarized--- +sentence = """(CNN)The White House has instructed former + White House Counsel Don McGahn not to comply with a subpoena + for documents from House Judiciary Chairman Jerry Nadler, + teeing up the latest in a series of escalating oversight + showdowns between the Trump administration and congressional Democrats.""" + +summarizer = Summarizer(key) +print(summarizer.run(sentence)) +``` + diff --git a/__init__.py b/eazymind/__init__.py similarity index 100% rename from __init__.py rename to eazymind/__init__.py diff --git a/nlp/__init__.py b/eazymind/nlp/__init__.py similarity index 100% rename from nlp/__init__.py rename to eazymind/nlp/__init__.py diff --git a/nlp/eazysum.py b/eazymind/nlp/eazysum.py similarity index 100% rename from nlp/eazysum.py rename to eazymind/nlp/eazysum.py diff --git a/test.py b/eazymind/test.py similarity index 100% rename from test.py rename to eazymind/test.py diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..9d5f797 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +# Inside of setup.cfg +[metadata] +description-file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..07bbe9b --- /dev/null +++ b/setup.py @@ -0,0 +1,25 @@ +from distutils.core import setup +setup( + name = 'eazymind', # How you named your package folder (MyLib) + packages = ['eazymind'], # Chose the same as "name" + version = '0.0.1', # Start with a small number and increase it with every change you make + license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository + description = 'AI Library providing ai-as-a-service for abstractive text summarization , just your text to be summarized and key obtained from free registeration on eazymind and a summary would be provided , get key from http://eazymind.herokuapp.com/arabic_sum', # Give a short description about your library + author = 'amr zaki', # Type in your name + author_email = 'theamrzaki@hotmail.com', # Type in your E-Mail + url = 'https://github.com/theamrzaki/eazymind', # Provide either the link to your github or to your website + download_url = 'https://github.com/user/reponame/archive/v_01.tar.gz', # I explain this later on + keywords = ['nlp', 'text', 'summarization' , 'ai' ,'natural language processing'], # Keywords that define your package best + install_requires=[], + classifiers=[ + 'Development Status :: 3 - Alpha', # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package + 'Intended Audience :: Developers', # Define that your audience are developers + 'Topic :: Software Development :: Build Tools', + 'License :: OSI Approved :: MIT License', # Again, pick a license + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', #Specify which pyhton versions that you want to support + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + ], +) \ No newline at end of file