Profiler Application using Sentiment Analysis

Overview

Profiler Application using Sentiment Analysis

Abstract

We send many posts and pictures over the time on our social channels such as Facebook, Instagram or Twitter. This phenomenon creates some unstructured data stream. On the other side, it is interesting for most people to know about their personality which may help them to know themselves better. In addition, there are times which predicting the other’s personality regarding the employment process, could lead to making a better team. The idea behind this project is to create a mobile application that helps a user to predict their own or others personality. After collecting enough data from the user, we applied sentiment analysis algorithms to this data and classified user’s personality trait according to Big Five Factor model. Then the result is presented in an interface designed and evaluated during three iterations and evaluation process based on user interface principles.

Installation

Sentiment Analysis ML Models

The prediction model is written in python. The model implementation placed in ml-model folder. First make sure that python is already installed in your machine. The python libraries used for creating our model can be installed in Terminal:

$ pip install -U scikit-learn==1.14.3
$ pip install -U numpy==1.14.3

Input Dataset: To automate personality recognition, Pennebaker and King provided a dataset of essays which are tagged with different personalities. The dataset includes 2,465 stream-of-consciousness essays. The personality categories are based on the Big Five Factor model with EXT, NEU, AGR, CON and OPN labels.

The dataset file named essays.csv is available in model folder.

For training the model by Naive Bayes algorithm, run the following command in Terminal:

$ python process_naive_bayesian.py 

Similarly, for training the model by Support Vector Machine, run the following command:

$ python process_svm_with_gridsearch.py

The output of this process, will be accuracy measurement of model by 10-fold cross validation technique. In addition, the model output file as joblib will be created by the process which is used for deployment of the model.

Special test cases

On the better evaluation of our algorithm, we tested our model against two specific cases: Donald Trump and Hillary Clinton. We used about 3000 tweets of each of these American presidential candidates in 2016. To run the test, write the following command in your Terminal:

$ python process_test.py

Deploy model in Server

You should deploy an HTTP server to serve the prediction model to mobile clients. We used the Python language with Flask library to achieve this goal. The implementation of server deployment placed in server folder. First, you need to install the following python libraries with virtualenv :

$ sudo pip install virtualenv
$ mkdir myproject
$ cd myproject
$ virtualenv venv
$ pip install -U scikit-learn==1.0.2

Now, with running the following command the server will run:

$ python server.py

iOS Application

To run the iOS application, the Xcode software should be already have setup in your macOS system.

The iOS application have used the Cocoapod as dependecy manager. Read more about it here: https://cocoapods.org

To Run the mobile application, go to the root of mobile application in ios_app folder, open your terminal and follow these steps:

Install Cocoapods

$ sudo gem install cocoapods

Run the pod file

To install the required dependecies, run the following command in your terminal:

$ pod install

Open the workspace

Open the ProfilerSA.xcworkspace file with Xcode program.

Run the application

Click on run botom at top left side of Xcode or press ⌘ + R on your keyboard.

User Interface

The implementation of interface started with creating a low-fidelity prototype. We just used papers and markers to create this paper-based interface. Before start working on a high-fidelity prototype, we should have created our colour scheme. We used “Adobe Colour CC” (https://color.adobe.com), an online tool for creating our colour set for this purpose. Although it has a complex interface, it offers professional toolset for colour mixing. In the next stage, we used an online tool named “MarvelApp” (https://marvelapp.com) for creating a high-fidelity prototype. MarvelApp provides core user interface tools and functionality needed for creating a suitable prototype, wireframes or mock-ups. The final implementation of the user interface is accessible at the following link:

You might also like...
Differific is a diffing tool that helps you compare Hashable objects using the Paul Heckel's diffing algorithm
Differific is a diffing tool that helps you compare Hashable objects using the Paul Heckel's diffing algorithm

Differific is a diffing tool that helps you compare Hashable objects using the Paul Heckel's diffing algorithm. Creating a chan

Plugin and runtime library for using protobuf with Swift

Swift Protobuf Welcome to Swift Protobuf! Apple's Swift programming language is a perfect complement to Google's Protocol Buffer ("protobuf") serializ

A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.

ZamzamKit ZamzamKit is a Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and othe

A simple Pokedex app written in Swift that implements the PokeAPI, using Combine and data driven UI.
A simple Pokedex app written in Swift that implements the PokeAPI, using Combine and data driven UI.

SwiftPokedex SwiftPokedex is a simple Pokedex app written by Viktor Gidlöf in Swift that implements the PokeAPI. For full documentation and implementa

ResponderChain is a library that passes events using the responder chain.

ResponderChain ResponderChain is a library that passes events using the responder chain.

Swift code to programmatically execute local or hosted JXA payloads without using the on-disk osascript binary

Swift code to programmatically execute local or hosted JXA payloads without using the on-disk osascript binary. This is helpful when you have Terminal access to a macOS host and want to launch a JXA .js payload without using on-disk osascript commands.

Merges a given number of PDF files into one file using the PDFKit framework

Titanium iOS PDF Merge Merges a given number of PDF files into one file using the PDFKit framework Requirements iOS 11+ Titanium SDK 9+ API's Methods

AnimeListSwiftUI - Anime quote list built with MVVM Swift 5 using Async/Await

How To In SwiftUI Async/Await AnimeListSwiftUI - Anime quote list built with MVVM Swift 5 using Async/Await Clones Clubhouse - App clone built with Sw

This is a app developed in Swift, using Object Oriented Programing, UIKit user interface programmatically, API Request and Kingfisher to load remote images

iOS NOW ⭐ This is a app developed in Swift, using Object Oriented Programing, UIKit user interface programmatically, API Request and Kingfisher to loa

Comments
  •  _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)

    _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)

    @novinfard ,

    Can you please addressed the issue which is mentioned below.

    File "process_svm_with_gridsearch.py", line 65, in dataset = build_data_cv(data_file, index) File "process_svm_with_gridsearch.py", line 33, in build_data_cv for index, line in enumerate(csvreader): _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)

    Thanks

    opened by ushadi97 0
Owner
Soheil Novinfard
iOS Develoer @ http://www.pulselive.com/
Soheil Novinfard
Project shows how to unit test asynchronous API calls in Swift using Mocking without using any 3rd party software

UnitTestingNetworkCalls-Swift Project shows how to unit test asynchronous API ca

Gary M 0 May 6, 2022
LifetimeTracker can surface retain cycle / memory issues right as you develop your application

LifetimeTracker Bar style Circular style LifetimeTracker can surface retain cycle / memory issues right as you develop your application, and it will s

Krzysztof Zabłocki 2.8k Jan 4, 2023
The simplest way to display the librarie's licences used in your application.

Features • Usage • Translation • Customisation • Installation • License Display a screen with all licences used in your application can be painful to

Florian Gabach 51 Feb 28, 2022
A macOS application displaying the thermal, voltage and current sensor values.

Sensors About A macOS application displaying the thermal, voltage and current sensor values. License Project is released under the terms of the MIT Li

Jean-David Gadina 82 Jan 3, 2023
iOS application for CA Tech Challenge ONLINE ACE created by @KS1019 and @techiro

インターン後改善したところ RepositoryのMock化を行って、ViewModelのテストを可能にした RepositoryやViewModelをコンストラクタインジェクションを使ってDI Repository自体のテストを実装できるように、URLSessionのAdapterを定義してスケジ

Kotaro Suto 1 Nov 25, 2021
An application where users can simulate trading stocks with a starting balance of fake money.

Eighth Wonder Finance Table of Contents Overview Product Spec Video Walkthrough Wireframes Schema Overview Description An application where users can

Josh Harris 0 Dec 5, 2021
Ecolande - Application realisé pendant l'Apple foundation Program.

Ecolande Application realisé pendant l'Apple foundation Program. Ecoland est l'application qui a été réalisé pendant l'Apple Foundation Program. Nous

Bilal Larose 1 Dec 31, 2021
Pavel Surový 0 Jan 1, 2022
A visual developer tool for inspecting your iOS application data structures.

Tree Dump Debugger A visual developer tool for inspecting your iOS application data structures. Features Inspect any data structure with only one line

null 8 Nov 2, 2022
An application focused on managing men's haircuts. It has never been so easy to keep the cut on time

An application focused on managing men's haircuts. It has never been so easy to keep the cut on time

Yago Marques 2 Oct 13, 2022