Git Product home page Git Product logo

emoweb's Introduction

EmoWeb_Tutorial

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.

Introduction

EmoWeb is a web-based sampler for emotion detection of dialogues.

EmoWeb is developed by Jialiang Zhao.

Dataset was moved to data/all.npy

Usage

Currently no GUI is developed for EmoWeb. Users need to login via GateOne, a web SSH terminal.

First Step

Open http://www.alanzjl.com/wordpress/index.php/2017/06/02/emoweb/

Second Step: Login to server

Leave Host and Port to be blank (just press Enter)

for the User entry, type in emoweb

for the password entry, type in common

Third Step: Login to Emoweb

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.

After That:

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.

How to use the data generated by EmoWeb

We provide two methods to read and manipulate with your data.

Via txt

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	尤其是胆小的人。
......

Via Python Numpy

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

If you use Linux

for Ubuntu/Debian,

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.

for Archlinux,

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.

If you use MacOS

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.

Data Stucture

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])

emoweb's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.