A NLP driven script which will give you a quote according to the sentence you feed it. It pulls data from several API's and makes up a relation by f.e. sentiment of the sentence.
To run the app
- Clone this repository
git clone git@github.com:grumpyp/NLP-quote-maker.git
- Setup virtual environment if required
python -m venv venv
- Install requirements.txt
pip install -r requirements.txt
- Run app with
python app\main.py
- NLTK SentimentIntensityAnalyzer was used to gpositive/neutral/negative rating scores and normalized into a composite score.
- Entity labelling with spacy was used to attach one or more classes to each quote.
- A text box is provided for user input where text is assessed, rated, matched to existing quotes within a quote database, and outputted with associated rating score.
Main branches containing all relevant files for use/development are found in the deployment and development branch respectively. Proposed changes should be done and pulled on development branch first prior to merge with depolyment.
app
βββ src
β βββ db.py
β βββ functions.py
βββ static
β βββ css
β β βββ style.css
β βββ js
β βββ main.js
βββ templates
β βββ index.html
β βββ layout.html
βββ config.py
βββ main.py
βββ views.py
Feature Requests? Please file an issue
I am happy to see all kind of contributions!
- Setup Flask environment
- Deployment on Heroku
- Build frontend with dynamic search field
- Find API's for quotes
- Use Twitter / Reddit API
- Find features to do a rating of the sentence
- Find suitable NLP libraries
- Write inital readme