ciranda
Class SpeechAct
java.lang.Object
ciranda.SpeechAct
- public class SpeechAct
- extends java.lang.Object
- Author:
- Vitor R. Carvalho
Predicts the act of an email message.
Also gives the confidence in the prediction
Usage:
SpeechAct sa = new SpeechAct();
sa.loadMessage(bodyOfMessage1); //bodyOfMessage as String
boolean req = sa.isRequest(); //bodyOfMessage1 contains a Request or not
double conf = sa.getRequestConfidence(); //confidence in the Request prediction
boolean cmt = sa.isCommit(); //bodyOfMessage1 contains a Commit or not
...
//if more than 1 message need to be classified, don't create another SpeechAct object
//just load the next messages in the same SpeechAct object
sa.loadMessage(bodyOfMessage2); //
boolean req = sa.isRequest(); //decision on bodyOfMEssage2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpeechAct
public SpeechAct()
loadMessage
public void loadMessage(java.lang.String _body)
- Loads body of email messages. Please remove header information.
Also, for more accurate classification:
1- please remove FWD parts of messages \
2- please remove quotes from previous messages(Reply-to lines)
hasRequest
public boolean hasRequest()
getRequestConfidence
public double getRequestConfidence()
hasDeliver
public boolean hasDeliver()
getDeliverConfidence
public double getDeliverConfidence()
hasCommit
public boolean hasCommit()
getCommitConfidence
public double getCommitConfidence()
hasPropose
public boolean hasPropose()
getProposeConfidence
public double getProposeConfidence()
hasMeet
public boolean hasMeet()
getMeetConfidence
public double getMeetConfidence()
hasDdata
public boolean hasDdata()
getDdataConfidence
public double getDdataConfidence()
main
public static void main(java.lang.String[] args)