Personality Prediction System ThroughCV Analysis

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 35

PERSONALITY PREDICTION THROUGH RESUME

Submitted in partial fulfillment of the requirements for


the award of
Bachelor of Engineering degree in Computer Science and Engineering

by

A VIKAS (Reg.no.37110056)
K SATYA SAI (Reg. No. 37110361)

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING SCHOOL OF COMPUTING

SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
Accredited with Grade “A” by NAAC
JEPPIAAR NAGAR, RAJIV GANDHI
SALAI, CHENNAI – 600 119

MARCH - 2021
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
Accredited with “A” grade by NAAC
Jeppiaar Nagar, Rajiv Gandhi Salai, Chennai – 600 119
www.sathyabama.ac.in

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

BONAFIDE CERTIFICATE

This is to certify that this project report is the bonafide work of ATLURI VIKAS(Reg. No.
37110056) and KONGARA SATYA SAI(Reg. No.37110361) who carried out the project
entitled “PERSONALITY PREDICTION THROUGH RESUME” under my supervision from
August 2020 to March 2021.

Internal Guide
Dr. S.

Murugan,M.E.,Ph.d., Head

of the Department

Submitted for Viva voce Examination held on

ii
Internal Examiner External Examiner

iii
DECLARATION

I ATLURI VIKAS here by declare that the Project Reportentitled “PERSONALITY PREDICTION
THROUGH RESUME” is done by me under the guidance of Dr. S. Murugan,M.E.,Ph.d., Department
of Computer Science and Engineering at Sathyabama Institute of Science and Technology is submitted
in partial fulfillmentof the requirements for the award of Bachelor of Engineering degree in
ComputerScience and Engineering.

DATE:

PLACE: CHENNAI SIGNATURE OF THE CANDIDATE

iv
ACKNOWLEDGEMENT

I am pleased to acknowledge my sincere thanks to Board of Management of


SATHYABAMA for their kind encouragement in doing this project and for completing it
successfully. I am grateful to them.

I convey my thanks to Dr. T. Sasikala, M.E., Ph.D., Dean, School of Computing, Dr.
S. Vigneswari, M.E., Ph.D., and Dr. L. Lakshmanan, M.E., Ph.D., Heads of the
Department of Computer Science and Engineering for providing me necessary support
and details at the right time during the progressive reviews.

I would like to express my sincere and deep sense of gratitude to my Project Guide Dr. S.
Murugan,M.E.,Ph.d., Professor, for her valuable guidance,suggestions and constant
encouragement paved way for the successful completion of my project work.

I wish to express my thanks to all Teaching and Non-teaching staff members of the
Department of Computer Science and Engineering who were helpful in many
ways for the completion of the project.

v
ABSTRACT

A recruitment process requires an eligibility check, an aptitude evaluation and a


psychometric analysis of prospective candidates. The work puts forward an application
where the system allows employers to post new job offerings and registered candidates
can apply. The application estimates applicant’s emotional aptitude through a
psychometric analysis based on a test whereas the professional standard is verified via
technical aptitude test. OCEAN Model is used to assess emotional quotient and predict
the personality traits. Machine learning techniques such as Logistic Regression are used
for modelling the personality predictor. The details of the candidates are kept secure by
using a password encryption algorithm. The passwords are only known to the required
individuals. The system outputs whether the candidate has been selected for the
interview process via dashboard and SMS alerts. A list of candidates is generated for
the employer in order to keep track of the shortlisted candidates along with their scores.

Keywords: Machine Learning, Password Encryption, Big Five Model, Recruitment, CV


Analysis, Personality Prediction.

v
TABLE OF CONTENTS

ABSTRACT v
LIST OF FIGURES vii

CHAPTER No. TITLE PAGE No.


1. INTRODUCTION
1.1 About the project 1
2. SYSTEM ANALYSIS
2.1 Literature Survey 3
2.2 Proposed system 4
3 REQUIREMENT SPECIFICATIONS
3.1 System Framework 6
3.2 Hardware And Software Specification 6
3.3 Technologies used 6
4 ARCHITECTURE
4.1 Architecture 8
4.2 Proposed system architecture 9
4.3 The Big Five Personality Model 10
4.4 Security regime 11
5 DESIGN AND IMPLEMENTATION
5.1 Employee Grading Module 12
5.2 Naïve Bayes 12
5.3 Support Vector Regression 13
5.4 Data set collection 14
5.5 Result Analysis 14
CONCLUSION 16
SCREEN SHOTS 17
SOURCE CODE 19
REFERENCE 27

v
LIST OF FIGURES

FIGURE No. FIGURE NAME PAGE No.


1 Flow Chart 5
2 Big Five Model 8
3 Architecture Diagram 9
4 Data Set 14
5 Landing Page 17
6 Upload Resume and Details 17
7 Result Page 18
8 Command Line Outputs 18

v
CHAPTER 1

INTRODUCTION

1.1 About the project

Selection of candidates in a recruitment drive from a vast pool of candidates is a


common issue. Traditional techniques consist organizing personality and technical
aptitude tests, group discussions and interviews. With the advancement in
technology, the way recruitments are being conducted has shifted. Knowledge
Management Systems (Online Recruitment Systems) are used to employ candidates,
by using the medium, Web 2.0 and various social media websites. Using social media
as a tool here poses newer, powerful challenges and opportunities for employers. It
also presents high efficiency, speed and attracts and targets specific, that is, relevant
job applicants from the humongous number of candidates. [1]. A set of unique
differences that are manipulated by the development of an individuals’ personal
memories, values, social relationships, attitude, skills and habits. Characteristics
revealed in a certain pattern of behavior in a different bunch of situations form a
personality trait. Finding an individual personality trait and intelligence from his or
her face plays a crucial role in inter-personal relationships but it is non-reliable.
Results show personality traits such as social interaction, capacity of mutual respect,
creativity, and many other traits cannot be just estimated by personal interactions [2].
In this approach, the escalating social media data has been used in multiple methods
composed from scratch.

A system proposed by Kessler et al. [12] separates applicants based on their


relevance by analyzing unstructured text documents (job offers) and categorizes.
Another XML-based multi-agent recommender system, proposed by Pasquale De
Meo [13] uses rich user profiles for support. The proposed system was a multi-agent
recommender system which used XML for exploiting user profiles to enhance
recruitment services in a personalized manner.

1
Another approach proposed by Mohammad Mehrad Sadra et al. [3] uses NLP for
standardizing resumes through a modelling language approach. Despite in great
usage, these techniques have disparities related to structure, inconsistent CV formats
and contextual information. Additionally, the applicants may show themselves in a
well-behaved manner as an online questionnaire’s responses can be manipulated for
personality inference. Also, social networking sites contain data that is usually
irrelevant for recruitment and thus shall not consist sufficient supplementary
information regarding the candidate.

In this paper, a system is proposed, which automates the eligibility check and
estimates the emotional intelligence by leveraging the potentials of the data found in
the test scripts. Various attributes of the test are processed for evaluating the
candidate’s personality in the system. The professional eligibility of a candidate is
checked based on the entries in the online CV submitted by the applicants.
Credibility is assured from the mandatory declaration of the users and also resolves
the standardization issue. The prime intention is the reduction in the time spent on
the initial recruitment phases keeping the end-goal of making the procedure more
effective at a higher stage. Overriding of the decision-making capabilities of
employers does not take place by the system. Rather, the proposed system helps in
removing the time-consuming phases and shortens the tedious process.

2
CHAPTER 2

SYSTEM ANALYSIS

2.1 LITERATURE SURVEY


In 2014 an Integrated E-Recruitment System for Automated Personality Mining and
Applicant Ranking was proposed by Faliagka et al. an automated candidate ranking
was implemented by this system. It was based on objective criteria that the candidate’s
details would be extracted from the candidate’s LinkedIn profile. The candidates’
personality traits were automatically extracted from their social presence using
linguistic analysis. The candidate’s rank was derived from individual selection criteria
using Analytical Hierarchy Process (AHP), while their weight was controlled by the
recruiter (admin). The limitations of the system were that senior positions that required
expertise and certain qualifications were screened inconsistently [1].
Liden et al. published The General Factor of Personality: The interrelations among the
Big Five personality factors (Openness, Conscientiousness, Extraversion,
Agreeableness, and Neuroticism) were analyzed in this paper to test for the existence of
a GFP. The meta-analysis provides evidence for a GFP at the highest hierarchal level
and that the GFP had a substantive component as it is related to supervisor-rated
job performance were concluded by this paper. However, it is also realized that it is
important to note that the existence of a GFP did not mean that other personality factors
that were lower in the hierarchy lost their relevance [2].

Psychometric analysis is used for choosing the right candidate as per the outcome of
psychometric test and need of an organization [5]. For psychometric analysis protocols
were proposed in using the survey data of the Alberta Context Tool. Big Five
Personality Model (also known as Five Factor Model) has been used to predict the
personality of the candidate which includes Openness, Conscientiousness,
Extraversion, Agreeableness, and Neuroticism [2, 7]. For classifying the person
Automated Personality Classification is used, which is used to classify the person from
a large number of people [4]. Recommendation using machine learning techniques
have been used for the analysis of the CV.
In literature, various evaluation tools have been used [4]. One of the approaches has
been mentioned in which use a tool called “Career Mapper” for the recommendations
of the

3
CV. It checks for the completeness of the user profile. The recommendation usually
involves the use of various filters. Content and Collaboration are among them. One of
the approaches of Content-Based Recommender is mentioned is which use Fo-DRA for
the recommendation which is based on content [1]. Collaborative Based Recommender
has a key function for the similarities among users [8, 9, 10]. Based on the above
survey technique we state some of the limitations. 1. The impact of manual interviews
and the resumes over HR has kept on increasing in recent years. It is very important to
come up with a solution that can shorten or fasten the HR department work. Therefore
a system has been implemented that recommends the candidates CV. 2. Traditional
forms of recruitment typically involve job seekers filling out physical resumes and
giving interviews with the surge in applicants lately, the number of candidates tends to
overwhelm the employers. The proposed automated candidate grading system utilizes
machine learning algorithms to build the models which test them. To overcome above
limitations we propose our system as follows.

2.2 PROPOSED SYSTEM


we propose personality evaluation and CV analysis using machine learning algorithm.
This system provides with an expert workforce for the organization which will help
the HR department to select the right candidate for the particular job profile.
In our society intelligence is highly appreciated. If you have a high IQ, you have a
better chance of being successful at school and professional life. Generally, for
prediction of personality, psychometric questions are used.
The proposed system is developed as a web application wherein the admin is first
needed to login with proper credentials followed by which they can add the questions
and can also modify them. For each question, four options along with the correct
answer is stored in the database. The candidate will register her/himself with all the
details and will also fill their own CV details into the system.
Sample aptitude test questions along with their options are shown in (Table 1). After
the test given by the candidates, the scores are stored in databases. The next test is of
personality test. There is a common myth which says that IQ tests measure
intelligence. What an IQ test actually measures is not actual intelligence, but a
person's capacity for intelligence. In this test various situations will be encountered by
the candidate ranging from strongly agree to disagree, which is provided as a drop-
down list. The factors range like openness to experience, conscientiousness. (Table
2) shows the sample
4
questions for personality test. Each question has the fix set of choices varying from
strongly agree to disagree. The proposed system is developed on the basis of the
implementation steps shown in (Figure 1).
The candidate has to undergo the registration and login process, then they can create
their profile along with CV. Followed by this process, a candidate can give tests to
get scores. The TF-IDF algorithm is used to perform the analysis as a graph in terms
of the programming skills on x-axis and the respective scores on y-axis. These scores
will help recruiters in selecting the right candidate. In the next section, we present
architectural overview of our system.

Fig 1

5
CHAPTER 3

REQUIREMENT SPECIFICATIONS

3.1 SYSTEM FRAMEWORK

The system built consists of three prime components, which are:


Job Application Component: Registration by submitting online CV and extraction of
required information and then performing an eligibility check with respect to the job
description of the position being offered.
Evaluation Component: Estimation of the emotional and technical aptitude of the
user by evaluating the test scripts. The standard used to mine the personality traits
is OCEAN.
Applicants Grading Component: Combines the personality assessment and the
eligibility criteria from the evaluation component for assigning a relevant score.
Ranking is on the basis of the relevant scores and this function is extracted from
supervised algorithms.
3.2 HARDWARE AND SOFTWARE SPECIFICATION

3.2.1 HARDWARE REQUIREMENTS

 Hard disk : 500 GB and above.


 Processor : i3 and above.
 Ram : 4GB and above.
 Webcam
3.2.1 SOFTWARE REQUIREMENTS

 Operating System : Windows 7 and above (64-bit).


 Python : 3.6

3.3 TECHNOLOGIES USED

 Python
 Convolution Neural Network (CNN)

6
CONVOLUTIONAL NEURAL NETWORKS (CNN)

INTRODUCTION
Convolutional neural networks (CNN) sound like a weird combination of

biology and mathwith a little CS sprinkled in, but these networks have been

some of the most influential innovationsin the field of computer vision.

2012 was the first year that neural nets grew to prominence as Alex

Krizhevsky used them to win that year’s ImageNet competition (basically,

the annual Olympics ofcomputer vision), dropping the classification error

record from 26% to 15%, an astounding improvement at the time. Ever

since then, a host of companies have been using deep learning at the core of

their services. Facebook uses neural nets for their automatic tagging

algorithms, Googlefor their photo search, Amazon for their product

recommendations, Pinterest for their home feed personalization, and

Instagram for their search infrastructure.

However, the classic, and arguably most popular, use case of these

networks is for image processing. Within image processing, let’s take a look

at how to use these CNNs for image classification.

7
CHAPTER 4

ARCHITECTURE

4.1 ARCHITECTURE

The never-ending amount of applications in traditional hiring tend to stun in-


charges of selecting personnel. Meticulous parameterization is required by the HR
department’s expert members for the efficient working of existing automated
grading systems. Change in criteria of hiring can make this a cumbersome and error
prone technique. Candidate ranking models in the proposed system utilize Machine
Learning algorithms (Logistic Regression). It involves ample amount of input
training data for model training consisting of previous candidate decision data.

As in Figure 1, an eligibility check is performed by the candidate evaluator system,


based on the entries in the online CV. This enables the HR infrastructure to be
associated to the system for further commercial use.

Fig 2
Figure 1. Big Five Model [1]
The main concerns here would be:
Professional Experience: It tallies the requirement mentioned by the recruiters and the
candidate’s previous work experience.
Education: Courses perceived along their education period and the scores.
Loyalty Index: Number of years spent on an average in the prior jobs.
Co-curricular Activities: The hobbies and other activities help in the psychometric

8
analysis of the candidate.

The qualifications claimed including the estimated eligibility scores are stored in the
database. The top candidates are shortlisted for interviews and the further process is
handled manually.

4.2 PROPOSED SYSTEM ARCHITECTURE

Fig 3 proposed system architecture

9
4.3 The Big Five Personality Model

Personality attributes of an individual are reflected in the way people present


themselves on social networking platforms. The Five-Factor Model (FFM) uses such
information for segregation into OCEAN traits, classifications which can be
eventually utilized by other respective teams. Allegedly, deeper knowledge of
personality data to extract specific information continues to be a hot research topic.
The OCEAN model checks for the personality on the basis of agreeableness,
openness, extraversion, conscientiousness and neuroticism. Although FFM is used
vastly, it poses certain issues.

Prediction and classification of individuals based on behavior is a research area


and FFM(OCEAN) is frequently used. Complexity due to different interpretations is
one of the challenges proposed [4]. The factors are explained below [1]:
Openness to experiences shows the degree of intellectual curiosity for creativity and
acceptance of new ideology and liking for variety and novelty. High levels show
novelty seeking and broad interests, while low levels say preference for conventionality
and familiarity (data driven and expedient).

Conscientiousness is for people who are organized, disciplined, meticulous and


punctual. Low level is perceived as spontaneous and flexible, but can be unreliable
and tawdry. High level is seen as obsessive and stubborn.
Extroversion is for amicable, adventurous and talkative people while introversion is for
reserved and timid ones.

Agreeableness shows friendly nature, trusting and how helpful a person is. Low
levels suggest competitiveness while high levels show submissive or naïve nature.
Neuroticism judge emotions handling ability. Low levels show better grip on one’s
emotions whereas high levels show sensitivity and anxiety.

1
4.4 Security regime
The proposed system uses its own password encryption algorithm. When the
user registers, the password is sent to the database after encryption. The encryption
algorithm is a function which accepts a string parameter. The function consists of a
complex combination of Pre-order, In-order and Post-order traversals of a Binary
Search Tree (BST) consisting of cryptic combination of the string entered. The
function returns a string which is then stored in the database. Thus, this function
almost makes it impossible to decipher thus taking the data out of harm. Another
specialty of this algorithm is that whatever is the length of the password, the database
will store the password of a specific length only, i.e. all the passwords in the database
will be of the same length. The proposed system has used a security regime as the data
of the employers as well as the job seekers is sensitive and should not be exposed and
used for any for any undesirable reasons.

Properties
a) Deterministic – Always fixed length of output
b) Fast – This uses binary search trees and hence are very fast
c) Irreversible – Can’t be decrypted
d) Collision-Resistant – Difficult to find two strings that produce same encrypted
password

From the mentioned properties, it can be assumed that the algorithm works similar
to the SHA-1 algorithm.

Takeaways
a) Pre-image Resistance – If the encrypted password is given and the algorithm is
also given, it is difficult to find the input string
b) Second Pre-image Resistance – If the input string, algorithm and the encrypted
password is given, it is difficult to find another input string that will give the same
encrypted password
c) Unbreakable without using Brute Force Approach
d) One-way

1
CHAPTER 5
DESIGN AND IMPLEMENTATION

5.1 Employee Grading Module

Generally, recruitment drives have job seeking candidates handing


in physical resumes and employers checking the credentials. As outpour of applicants
has increased recently, the amount of proposed CVs astounded the recruiters. Machine
learning (ML) algorithms are used to build the results of the entire process until the
interview phase. It requires a certain amount of input training data, which primarily
consists of candidate selection decisions of previous candidates apportioned by
experts in the field [1]. Eligibility scores generated for the analysis describes the
candidate’s fitness for the job. The analysis features are saved as Boolean variables
(an emotional assessment) or as numerical values (work experience). A learning
algorithm is fed with the data that constructs the assessment when the candidate’s
stated features are passed as input. The system, finally, generates the final ranked list
to sort out the candidates [6] [7]. Suggested work shows the training data set as a
set of input employee selection patterns. The work is sufficiently performed by the
employee grading procedure and the evaluation tests using learning to rank algorithms
such as Naïve Bayes and Support Vector Regression (SVR).

5.2 Naïve Bayes


In classification issues, the hypothesis could be assigning the class for a new
data instance whereas in ML, a person selects the best hypothesis and data. Bayes’
Theorem provides an easy way of choosing the most probable hypothesis given data
which can be used as prior knowledge, using which they can calculate the probability.

Bayes’ Theorem is stated as:


P(h|d) = (P(d|h) * P(h))/P(d)

where,
P(h) - prior probability of h P(d)
- probability of the data

1
P(h|d) - posterior probability
P(d|h) - probability of data d given that the hypothesis h is true.

Selection of the hypothesis with the highest probability which is the Maximum a
Posteriori (MAP) hypothesis can be done after finding various posterior
probabilities for a variety of hypotheses. This can be written as:

MAP (h) = max (P(h|d))


or
MAP (h) = max ((P(d|h) * P(h))/P(d))
or
MAP (h) = max (P(d|h) * P(h))

In case of classification, the probability of each class (e.g.P(h)) will be equal if


training data consists of an even number of instances in each class and it ends up
with:
MAP (h) = max (P(d|h))

5.3 Support Vector Regression

A set of methods for supervised learning called Support Vector Machines


(SVMs) can be applied to both regression and classification problems. One of the
major power sources for SVMs is nonlinear mapping of input space to a higher
dimensional feature space in the kernel representation. Their objective is to discover
a function that affects the data’s integral of a certain loss function and its unknown
probability distribution. The empirical risk by which the original (undecided yet)
one and the estimated function differs is reduced [10].

1
Fig 4
5.4 Data set collection
The data set collection was done through a lot of websites and personal
interactions with job seekers. The questions and responses were recorded and stored
in a CSV file for easy data training and retrieval. The data set can be stored in any
form: XML, JSON, etc.

5.5 Result Analysis

From studies on proposed system, Table I was derived. Previous


implemented studies using Naïve Bayes and Support Vector regression algorithms
showed a higher coefficient of correlation. Thus, the system has improved accuracy
than the existing system to a certain extent i.e. a decrease of 0.02 and 0.07 has been
observed for Logistic Regression and SVR respectively.

The password encryption algorithm adopted here, was successfully implemented to


store the password of the registered candidates and proved to provide a good security
cover. The encryption process took a little longer time delaying the working the
training of the system by a few minutes.

1
Table 1. Eligibility Score of Different Regression Algorithms and their
Correlation Coefficients

Job Position Coefficient of Correlation


Logistic Support
Regression Vecto
r Regression
Associate 0.63 0.65
Programmer
Senior 0.62 0.69
Manager

1
CONCLUSION

In the work presented, an efficient and effective approach is used to rank and
evaluate candidates through psychometric analysis for calculating emotional
quotient. Technical eligibility criteria from the online CVs and emotional aptitude
by leveraging responses in evaluations are processed by the proposed system. The
OCEAN model performs the linguistic and personality analysis of the candidates.
65% and 87% average accuracy levels were obtained by the algorithm dependent
and independent approaches respectively. The accuracy obtained by the proposed
system is higher than the previously implemented systems which had 45% average
accuracy levels by the algorithm dependent approach. The Tree XI algorithm
created is adding an extra layer of security to the existing ones. There is also scope
for improvement in the algorithm as currently it can’t handle larger lengths of input
data. Employee grading process uses supervised algorithms which are trained with
previous recruitment data. The future scope of the project could be to add a video
and image processing elements. Also, the CV standardization issue can be dealt with
by uploading CVs in a certain format. This would increase the efficiency of a system
by a certain level.

1
SCREEN SHOTS

Fig 5 Landing Page

Fig 6 Upload Resume and Details

1
Fig 7 Result page

Fig 8 Command Line Outputs

1
SOURCE CODE

Import Libraries

import os
import pandas as pd
import numpy as np
from tkinter import *
from tkinter import filedialog
import tkinter.font as font
from functools import partial
from pyresparser import ResumeParser
from sklearn import datasets, linear_model

class train_model:

def train(self):
data =pd.read_csv('training_dataset.csv')
array = data.values

for i in range(len(array)):
if array[i][0]=="Male":
array[i][0]=1
else:
array[i][0]=0

df=pd.DataFrame(array)

maindf =df[[0,1,2,3,4,5,6]]
mainarray=maindf.values

temp=df[7]
train_y =temp.values

self.mul_lr =
linear_model.LogisticRegression(multi_class='multinomial',

1
solver='newton-cg',max_iter =1000)
self.mul_lr.fit(mainarray, train_y)

def test(self, test_data):


try:
test_predict=list()
for i in test_data:
test_predict.append(int(i))
y_pred = self.mul_lr.predict([test_predict])
return y_pred
except:
print("All Factors For Finding Personality Not Entered!")

def check_type(data):
if type(data)==str or type(data)==str:
return str(data).title()
if type(data)==list or type(data)==tuple:
str_list=""
for i,item in enumerate(data):
str_list+=item+", "
return str_list
else: return str(data)

def prediction_result(top, aplcnt_name, cv_path, personality_values):


"after applying a job"
top.withdraw()
applicant_data={"Candidate Name":aplcnt_name.get(), "CV
Location":cv_path}

age = personality_values[1]

print("\n############# Candidate Entered Data #############\n")


print(applicant_data, personality_values)

personality = model.test(personality_values) print("\


n############# Predicted Personality #############\n")

2
print(personality)
data = ResumeParser(cv_path).get_extracted_data()

try:
del data['name']
if len(data['mobile_number'])<10:
del data['mobile_number']
except:
pass

print("\n############# Resume Parsed Data #############\n")

for key in data.keys():


if data[key] is not None:
print('{} : {}'.format(key,data[key]))

result=Tk()
# result.geometry('700x550')
result.overrideredirect(False)
result.geometry("{0}x{1}+0+0".format(result.winfo_screenwidth(),
result.winfo_screenheight()))
result.configure(background='White')
result.title("Predicted Personality")

#Title
titleFont = font.Font(family='Arial', size=40, weight='bold')
Label(result, text="Result - Personality Prediction", foreground='green',
bg='white', font=titleFont, pady=10, anchor=CENTER).pack(fill=BOTH)

Label(result, text = str('{} : {}'.format("Name:",


aplcnt_name.get())).title(), foreground='black', bg='white',
anchor='w').pack(fill=BOTH)
Label(result, text = str('{} : {}'.format("Age:", age)),
foreground='black', bg='white', anchor='w').pack(fill=BOTH)
for key in data.keys():
if data[key] is not None:
Label(result, text = str('{} :

2
{}'.format(check_type(key.title()),check_type(data[key]))),
foreground='black', bg='white', anchor='w',
width=60).pack(fill=BOTH)
Label(result, text = str("perdicted personality: "+personality).title(),
foreground='black', bg='white', anchor='w').pack(fill=BOTH)

quitBtn = Button(result, text="Exit", command =lambda:


result.destroy()).pack()

terms_mean = """

# Openness:
People who like to learn new things and enjoy new experiences usually
score high in openness. Openness includes traits like being insightful and
imaginative and having a wide variety of interests.

# Conscientiousness:
People that have a high degree of conscientiousness are reliable and
prompt. Traits include being organised, methodic, and thorough.

# Extraversion:
Extraversion traits include being; energetic, talkative, and assertive
(sometime seen as outspoken by Introverts). Extraverts get their energy
and drive from others, while introverts are self-driven get their drive from
within themselves.

# Agreeableness:
As it perhaps sounds, these individuals are warm, friendly,
compassionate and cooperative and traits include being kind, affectionate,
and sympathetic. In contrast, people with lower levels of agreeableness
may be more distant.

# Neuroticism:
Neuroticism or Emotional Stability relates to degree of negative

2
emotions. People that score high on neuroticism often experience
emotional instability and negative emotions. Characteristics typically
include being moody and tense.
"""

Label(result, text = terms_mean, foreground='green', bg='white',


anchor='w', justify=LEFT).pack(fill=BOTH)

result.mainloop()

def perdict_person():
"""Predict Personality"""

# Closing The Previous Window


root.withdraw()

# Creating new window


top = Toplevel()
top.geometry('700x500')
top.configure(background='black')
top.title("Apply For A Job")

#Title
titleFont = font.Font(family='Helvetica', size=20, weight='bold')
lab=Label(top, text="Personality Prediction", foreground='red',
bg='black', font=titleFont, pady=10).pack()

#Job_Form
job_list=('Select Job', '101-Developer at TTC', '102-Chef at Taj', '103-
Professor at MIT')

2
job = StringVar(top)
job.set(job_list[0])

l1=Label(top, text="Applicant Name", foreground='white',


bg='black').place(x=70, y=130)
l2=Label(top, text="Age", foreground='white', bg='black').place(x=70,
y=160)
l3=Label(top, text="Gender", foreground='white',
bg='black').place(x=70, y=190)
l4=Label(top, text="Upload Resume", foreground='white',
bg='black').place(x=70, y=220)
l5=Label(top, text="Enjoy New Experience or thing(Openness)",
foreground='white', bg='black').place(x=70, y=250)
l6=Label(top, text="How Offen You Feel Negativity(Neuroticism)",
foreground='white', bg='black').place(x=70, y=280)
l7=Label(top, text="Wishing to do one's work well and
thoroughly(Conscientiousness)", foreground='white',
bg='black').place(x=70, y=310)
l8=Label(top, text="How much would you like work with your
peers(Agreeableness)", foreground='white', bg='black').place(x=70,
y=340)
l9=Label(top, text="How outgoing and social interaction you
like(Extraversion)", foreground='white', bg='black').place(x=70, y=370)

sName=Entry(top)
sName.place(x=450, y=130, width=160)
age=Entry(top)
age.place(x=450, y=160, width=160)
gender = IntVar()
R1 = Radiobutton(top, text="Male", variable=gender, value=1, padx=7)
R1.place(x=450, y=190)
R2 = Radiobutton(top, text="Female", variable=gender, value=0,
padx=3)
R2.place(x=540, y=190)
cv=Button(top, text="Select File", command=lambda: OpenFile(cv))
cv.place(x=450, y=220, width=160)
openness=Entry(top)
openness.insert(0,'1-10')

2
openness.place(x=450, y=250, width=160)
neuroticism=Entry(top)
neuroticism.insert(0,'1-10')
neuroticism.place(x=450, y=280, width=160)
conscientiousness=Entry(top)
conscientiousness.insert(0,'1-10')
conscientiousness.place(x=450, y=310, width=160)
agreeableness=Entry(top)
agreeableness.insert(0,'1-10')
agreeableness.place(x=450, y=340, width=160)
extraversion=Entry(top)
extraversion.insert(0,'1-10')
extraversion.place(x=450, y=370, width=160)

submitBtn=Button(top, padx=2, pady=0, text="Submit", bd=0,


foreground='white', bg='red', font=(12))
submitBtn.config(command=lambda: prediction_result(top,sName,loc,
(gender.get(),age.get(),openness.get(),neu
roticism.get(),conscientiousness.get(),agreeableness.get(),extraversion.get
())))
submitBtn.place(x=350, y=400, width=200)

top.mainloop()

def OpenFile(b4):
global loc;
name =
filedialog.askopenfilename(initialdir="C:/Users/Batman/Documents/Progr
amming/tkinter/",
filetypes
=(("Document","*.docx*"),("PDF","*.pdf*"),('All files', '*')),
title = "Choose a file."
)
try:
filename=os.path.basename(name)
loc=name

2
except:
filename=name
loc=name
b4.config(text=filename)
return

if name == " main ":


model = train_model()
model.train()

root = Tk()
root.geometry('700x500')
root.configure(background='white')
root.title("Personality Prediction System")
titleFont = font.Font(family='Helvetica', size=25, weight='bold')
homeBtnFont = font.Font(size=12, weight='bold')
lab=Label(root, text="Personality Prediction System", bg='white',
font=titleFont, pady=30).pack()
b2=Button(root, padx=4, pady=4, width=30, text="Predict Personality",
bg='black', foreground='white', bd=1, font=homeBtnFont,
command=perdict_person).place(relx=0.5, rely=0.5, anchor=CENTER)
root.mainloop()

2
REFERENCES
[1] Vishnu M. Menon and Rahulnath H A, “A Novel Approach to Evaluate and Rank
Candidates in a Recruitment Process by Estimating Emotional Intelligence through
Social Media Data“, IEEE International Conference on Next Generation Intelligent
Systems (ICNGIS), Kottayam, India (2016), Sept. 1-3.
[2] Gayatri Vaidya, Pratima Yadav, Reena Yadav, Prof. Chandana Nighut, “Personality
Prediction by Discrete Methodology”, IOSR Journal of Engineering, vol. 14 (2018),
pp 10-13.
[3] Mohammad Mehrad Sadra, ”The Role of Personality Traits Predicting Emotion
Regulation Strategies”, International Academic Journal of Humanities, vol. 3, no 4,
(2016), pp. 13-24.
[4] Muhammad Fahim Uddin, Jeongkyu Lee, “Proposing Stochastic Probability-based
Math Model and Algorithms Utilizing Social Networking and Academic Data for
Good Fit Students Prediction”, Social Network Analysis and Mining, vol. 7, no. 1,
(2017), pp. 7-29.
[5] https://medium.com/omarelgabrys-blog/binary-search-trees-598b657a779b
[6] Iftekhar Naim, M. Iftekhar Tanveer, Daniel Gildea and Mohammed (Ehsan)
Hoque, “Automated Analysis and Prediction of Job Interview Performance”, IEEE
Transactions on Affective Computing, vol. 9 no. 2 (2018), pp. 191-204.
[7] Muhammad Fahim Uddin, Soumita Banerjee, Jeongkyu Lee, “Recommender
System Framework for Academic Choices: Personality Based Recommendation
Engine (PBRE)”, IEEE 17th International Conference on Information Reuse and
Integration (IRI), Pittsburgh, PA, USA (2016), July 28-30.
[8] Carolyn Winslow, Xiaoxiao Hu, Seth Kaplan, Yi Li, “Accentuate the Positive:
Which Discrete Positive Emotions Predict Which Work Outcomes?”, The
Psychologist- Manager Journal vol. 20, no. 2 (2017), pp. 74-89.

You might also like