/**
 * Fetches some basic semantic information from the nserver webservices
 */
 
wcmBasicSemantics = {
    
    sentiment: function(argText, argCallback)
    {
        var url = wcmSiteURL + 'ajax/controller.php';
        var cb = argCallback;
        new Ajax.Request(url, {
            onSuccess: function(argResponse)
            {
                tone = argResponse.responseText.evalJSON();
                cb(tone['tone'], tone['subjectivity']);
            },
            parameters: {
                text: argText,
                ajaxHandler: 'semantic_data/basic',
                command: 'sentiment'
            }
        });
    }
}