GithubHelp home page GithubHelp logo

00mjk / clark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fandm-cares/clark

0.0 0.0 0.0 10.72 MB

Conversational Lexical Affect Recognition Kit

Home Page: https://aclanthology.org/S19-2024.pdf

Python 95.22% Makefile 4.78%

clark's Introduction

CLARK: Conversation-Based Lexical Affect Recognition Kit

Based on the work from SemEval-2019 paper: CLARK at SemEval-2019 Task 3: Exploring the Role of Context toIdentify Emotion in a Short Conversation.

Usage

# To train
python -m semeval.train --input train.csv --output semeval-clark.mdl

# To predict
python -m semeval.predict --input new_work.csv --saved-model semeval-clark.mdl

# To reproduce results of paper
python -m semeval.test --input dev.csv --saved-model semeval-clark.mdl

Data input format

id,turn1,turn2,turn3,label
0,Hi!,How are you?,I'm good :),happy
1,Who do you think you are?, I'm just a guy, Well you suck,angry
...

In addition, further work has been done using appraisal variables Patterns of cognitive appraisal in emotion. To use this version of the CLARK, see below:

Usage (CLARK Appraisal Variables)

# To train
python -m train --input train.json --output av-clark.mdl

# To predict
python -m predict --input new_work.json --saved-model av-clark.mdl

# To reproduce results of paper
python -m test --input dev.json --saved-model av-clark.mdl

Conversation data input format:

{
        
    "id":2,
    "turn1":"Hi!",
    "turn2":"How are you",
    "turn3":"I'm good :)",
    "label":"happy",
    "numUtterances":3,
    "hitCountEmotion":5,
    "hitCountAppraisal":8
},
...

Appraisal variable data input format:

[
    {
        "id": 12,
        "turn1": 
        {
            "emotion": "joy", 
            "appraisals": {
                "pleasantness": 2.0, "attention": 1.0, "control": 1.0, "certainty": 2.0, "anticipated_effort": 1.0, "responsibility": 1.0
            }
        }, 
        "turn2": 
        {
            "emotion": "joy", 
            "appraisals": {
                "pleasantness": 2.0, "attention": 1.0, "control": 2.0, "certainty": 2.0, "anticipated_effort": 1.0, "responsibility": 1.0
            }
        }, 
        "turn3": 
        {
            "emotion": "challenge", 
            "appraisals": {
                "pleasantness": 1.0, "attention": 0.0, "control": 2.0, "certainty": 0.0, "anticipated_effort": 0.0, "responsibility": 2.0
            }
        }, 
        "fleiss_kappa": 0.44148936170212755
        
        }, 
    ...
]

clark's People

Contributors

joecummings avatar profwillie 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.