- Scrap twitter tweets data and use twitter search API to build a dataset.
- Annotating the data and assigning the class: PI or No PI where PI = purchase intention.
- Initial survey of data which invloves looking at the type of tweets, checking for imbalance class, building word clouds and different graphical representations to visual the data.
- Use different pre processing techniques on the data to build a corpus.
- Apply different machine learing text analytical models on the dataset.
- Support Vector Machine
- Naive Bayes
- Logistic Regression
- Decision Tree
- Neural Network
- Output a list of customers who have shown purchase intention towards the product.
- Develop a website to display the summary of our work and allow users to upload their dataset and train and/or test the pre-developed models for evaluation.
- You must have python(latest version), django, numpy, pandas, nltk, textblob, sklearn, installed on your system.
- To install use folloowing syntax given below on commad prompt of Windows, here package-name corespond to django, numpy, pandas, nltk, textblob, sklearn:
- pip3 install package-name
- Use the following syntax to import textblob corpora: python -m textblob.download_corpora
- Open Python terminal on windows command promt and install nltk following library:
- import nltk
- nltk.download('stopwords')
- exit()
- All required dependencies are installed now.
- Clone and download the complete repository and UnZip it.
- Using Windows Commmand Prompt(cmd) navigate to folder PurchaseIntention2 in the cloned repository.
- Then Type "Scripts\activate" on cmd to activate the virtual environment.
- Then Type "cd djangoPIWebsite" on cmd.
- Then finally type "python manage.py runserver" to run the server.
- On browser type "localhost:8000/"
- The Web Site is running now.
- To close server press Ctrl + C on cmd to exit the server. To re run type "python manage.py runserver" on cmd.
- change working directory to "CIP\PurchaseIntention2".
- Then Type "Scripts\activate" on cmd to activate the virtual environment.
- change working directory to "CIP\PurchaseIntention2\djangoWebsite\pages".
- open python terminal in cmd by typing "python"
- Then type "import ModelTest as mt" on terminal. 5 Then type mt.output_to_results("Annotated4.csv","AnnotatedData2.csv", "TF-IDF", "Naive Bayes","90","80","70")
- Output will show prediction results and accuracy score for model tested.