Tutorial to EmoWeb, a web-based sampler for emotion detection of dialogues
Web server has been shudown since course ended. Source code was added to this repo.
EmoWeb is a web-based sampler for emotion detection of dialogues.
EmoWeb is developed by Jialiang Zhao.
Dataset was moved to data/all.npy
Currently no GUI is developed for EmoWeb. Users need to login via GateOne, a web SSH terminal.
Open http://www.alanzjl.com/wordpress/index.php/2017/06/02/emoweb/
Leave Host and Port to be blank (just press Enter
)
for the User
entry, type in emoweb
for the password
entry, type in common
If you already have an account, just type in your username and password and start sampling.
If you don't have an account, just pick a username (length>5), and if this user doesn't exit, the system will automatically create this user. Follow the instrucitons to create password for it.
Please press a number from -1 to 3 for each sentence.
IMPORTANT: Sentences are grouped as sections. Do not quit this web during sampling whithin one section, or your data won't be recorded.
Normally, one section contains 100-300 sentences.
We provide two methods to read and manipulate with your data.
A data.txt
file is auto generated. All information is included in this file.
An example:
================================================================================
Data for alanzjl from EmoWeb
Here are 538 labelled data in our database
Thanks for your contribution to this web!
This file is auto-generated.
Please contact Jialiang Zhao if you have any question
================================================================================
| count | speaker | label |sentence
1 / 538 0 0 有人说,世界上有两颗头的蛇,一前一后互为首尾。
2 / 538 1 2 您确定那不是火车?
3 / 538 0 2 二者杀伤力有可比性吗?
4 / 538 1 0 对比一下就知道了。
5 / 538 0 0 两头蛇的传说源于人们对黑暗的恐惧。
6 / 538 1 2 什么样的恐惧?
7 / 538 0 0 黑暗里有不确定的危险,当你身处其中,你会觉的各个方向都有一双盯着你的眼睛。
8 / 538 1 0 尤其是胆小的人。
......
This method is recommended. A formatted Python Numpy file data.npy
is generated. You can modify our get_EmoWeb_data.py
to gain access to this file. This file contains a huge 4-dimensional matrix.
Before using this file, you need to install Python
and numpy
use sudo apt-get install python
to install Python, and use sudo apt-get install python-numpy
to Install Numpy. You can also use pip
to install Numpy
.
use sudo pacman -S python
to install Python, and use sudo pacman -S python-numpy
to Install Numpy. You can also use pip
to install Numpy
.
You can easily get Python
and Numpy
via HomeBrew
. Type
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
in your Terminal to install HomeBrew. More detailed instructions are listed in https://brew.sh/
Then install Python
and Numpy
using HomeBrew
.
###If you use Windows
You can use PyCharm
, a Python IDE under Windows (it is also supported in Linux and MacOS). Or just download and install Python
and Numpy
from their official websites.
Personally, I prefer WSL: Windows Subsystem for Linux
, which is only supported in Windown 10 Pro
.
However, just use the .txt
file if you think the above methods are too complicated.
A printer function is pasted here, and you will know how to manipulate with it from the following code.
#!/usr/bin/python
#########################################################################
# File Name: get_EmoWeb_data.py
# Description:
# Author: Jialiang Zhao
# Mail: [email protected]
# Created_Time: 2017-05-20 19:39:09
# Last modified: 2017-05-20 19:39:1495280349
#########################################################################
import numpy as np
if __name__ == '__main__':
data = np.load('data.npy') # Data file from EmoWeb
print "-->\tData Size: ", data.shape[0]
print "-->\tCnt\t|\tSpeaker\t|\tLabel\t|\tSentence"
for i in xrange(data.shape[0]):
print "-->\t%d/%d\t|\t"%(i+1, data.shape[0]) + data[i][0] + "\t|\t" + data[i][2] + "\t|\t" + data[i][1]
An important thing is, every entry of the data is in String
type. If you want to get the value of a label, use int(data[i][2])