commit 5b93cc0d8b727c63d200640b82df47695ea3d78f Author: Fernando Sánchez Date: Thu Jul 18 18:12:09 2013 -0700 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?> + + + + + +