From 5b93cc0d8b727c63d200640b82df47695ea3d78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20S=C3=A1nchez?= Date: Thu, 18 Jul 2013 18:12:09 -0700 Subject: [PATCH] --- emote.php | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 emote.php diff --git a/emote.php b/emote.php new file mode 100644 index 0000000..8102ced --- /dev/null +++ b/emote.php @@ -0,0 +1,80 @@ + $wnaffect.'#neutral-emotion', + 0 => $wnaffect.'#happiness', + 1 => $wnaffect.'#sadness', + 2 => $wnaffect.'#fear', + 3 => $wnaffect.'#anger', + 4 => $wnaffect.'#disgust', + 5 => $wnaffect.'#surprise' +); +$empathScope = Eklekt_Emotion_Empathyscope::getInstance(); +$text = $_GET['q']?$_GET['q']:'Input a string with the ?q="bla" parameter, please'; +$domain = $_GET['domain']?$_GET['domain']:'http://gsi.dit.upm.es/ontologies/wndomains/ns#Root'; +$sens = explode(".", $text); +$res = array(); +header('Content-Type: application/xml'); +#header('Content-Disposition: attachment; filename="results.rdf"'); +header('Content-Type: text/plain'); +echo ''; +?> + + + + + + Synesketch + + + + + + +feel($sen); + foreach($feel->emotions as $emo){ + $emo->type = array_key_exists($emo->type, $arr)?$arr[$emo->type]:"UNKNOWN"; + } + array_push($res, $feel); +?> + + + text?> + + + + + weight?> + + + + + +