A mobile chat application with emoji reactions and NLP-generated emoji suggestions.
- Install PostgreSQL major version 11. We recommend using homebrew.
- Switch to the postgres UNIX account:
sudo -i -u postgres
- Create a username and password (replace
username
with desired username):createuser username --pwprompt
- Enter password to be used for the user you just created
- To create a database (replace
database
with desired database name):createdb database
- To exit the postgres UNIX account:
exit
- Create a file named
.env
at the root of the project with the variables in.env.example
and replace with the host, user, user password and database information for the databases you'll be using for development and testing respectively.DEV_DB_HOST
andTEST_DB_HOST
default tolocalhost
so you don't have to include those variables if you plan to uselocalhost
. It is suggested that you specify separate tables forDEV_DB_NAME
andTEST_DB_NAME
since the test suites will wipe the test database clean before running each test suite. Please note that production database information is only accessible to the project owners.
npm install
OS X, Linux and Windows:
npm start
npm test
- Don't forget to define
TWITTER_USER
,TWITTER_PASS
,TWITTER_KEY
andTWITTER_SECRET
in your.env
file. Refer to the.env.example
to be sure you define the necessary environment variables. - If planning to get more data using a twitter stream, download this ChromeDriver zip file, unzip it and copy the executable into the
nlp
directory. - Create the virtual env after updating the dependencies to the latest compatible versions (NOTE: we have separate _env.yml files for MacOS and Linux OS - the latter of which works with Ubuntu):
# update dependencies specified in the yml to latest compatible versions
conda env update -f nlp/REPLACE_WITH_YOUR_OS_ENV.yml --prune
# create conda virtual environment named emote from yml
conda env create -f nlp/REPLACE_WITH_YOUR_OS_ENV.yml
- Activate the Anaconda virtual env:
conda activate emote
- To use twitter stream (live tweets; note that you must have Twitter login verification (2-factor authentication) temporarily turned off as the script uses your username and password to authenticate you along with your app key and secret to acquire the proper oauth v1.0 credentials — v2.0 is not available for streams):
python nlp/twitter.py
- To use twitter search and get 100 tweets at a time:
python nlp/twitter.py -se
python nlp/read.py
python nlp/train.py
python nlp/test_predictions.py 'message to test'
Current model pred_proba order: 😂, 😍, 😞, 😮
export FLASK_APP=nlp/app.py
python -m flask run
- Fork the repository
- Create your feature branch on the forked repo (
git checkout -b feature/fooBar
) - Commit your changes to the forked repo (
git commit -am 'Added fooBar that does x, y, z'
) - Push the branch back to your forked repo (
git push origin feature/fooBar
) - Create a pull request from your fork
- Sonam Kindy – @sonamdkindy
- Michele Larson – @mnicole
- Eric Newtoner – @ernewtoner
Distributed under the Apache v2.0 license. See the LICENSE for more information.
- README template used is located here