boostarcher / PersonalityDiscrimination_Chatting

Personality Representation & Personality based Chatting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PersonalityDiscrimination_Chatting

Personality Representation & Personality based Chatting

This is a project of the "三个咕咕呆写出了一群bug"(Three heros & A bunch of bug) in Google AI ML Winter Camp. Thanks to my team members!

MBTI Personality can be judged by one's declaration or dialogue. If a chatting machine can learn the speaker's personality, they might be able to make better dialogues.
According to this idea, we make a simple chatting machine. Because we used a simple model and a few dialogue data, the result is not very good, but the idea of chatting machine with personality analysis may be worthwhile.
There are another repo and repo from my teamates.

More details shown in 'PersonalityDiscrimination_Chatting.pdf'

Method

This work mainly consists of two parts, 1. Personality Discriminator: discriminate the speaker's personality according to some input sentences. 2. Chatting Machine: Generate the corresponding response according to the input sentence and the speaker's personality.

  1. Personality Discriminator:

The target of this part is classifying people into 16 distinct personality types across 4 axes, after feeding some dialogues or some declaration (or Twitter, Wechat …) (kaggle MBTI dataset)

We used ELMo pre-trained model, Bi-LSTM encoder and self Attention Mechanisms.

  1. Chatting Machine:

Given a post X= (x_1,x_2,..,x_n ) and a personality type p of the response to be generated, the goal is to generate a response Y= (y_1,y_2,..,y_n ) that is coherent with the personality type p.

About the Code

MBTI_discriminator_torch.py , MBTI_discriminator_bert.py , MBTI_discriminator_lgb.ipynb
All three files are MBTI discrimination model. The first file contains the main model.
dialogue.py
seq2seq conversation model
front
This folder contains the front-end program for chatting machine.

Results

The model outputs both personality scores and dialogue response.

About

Personality Representation & Personality based Chatting


Languages

Language:Jupyter Notebook 52.5%Language:Python 32.7%Language:CSS 9.1%Language:JavaScript 4.1%Language:HTML 1.7%