metreex-analysis.js
/**
 * Handles the post-load functions of Treebank objects. This includes adding the Treebank to the array of loaded treebanks,
 * and adding the relevant controls to the sidebar. It also asks for the VNCloud author and title information to be retrieved.
 * @param {Object} newTree Treebank to be added to the array of loaded treebanks
 * @returns {Boolean} Returns true if a tree was successfully added or false otherwise.
 */
Handles the post-load functions of Treebank objects. This includes adding the Treebank to the array of loaded treebanks,
and adding the relevant controls to the sidebar. It also asks for the VNCloud author and title information to be retrieved.
@param {Object} newTree Treebank to be added to the array of loaded treebanks
@returns {Boolean} Returns true if a tree was successfully added or false otherwise.
Handles the post - load functions of Treebank objects . This includes adding the Treebank to the array of loaded treebanks and adding the relevant controls to the sidebar . It also asks for the VNCloud author and title information to be retrieved . @param { Object } newTree Treebank to be added to the array of loaded treebanks @returns { Boolean } Returns true if a tree was successfully added or false otherwise .
function addLoadedTree(newTree){
    if (newTree.numSentences < 1){
        handleGlobalErrorMessage("Loaded file contained a treebank with no sentences. Id: " + newTree.id);
        return false;
    }
    else if (newTree.xml === null){
        handleGlobalErrorMessage("Loaded file contained no treebank data. Id: " + newTree.id);
        return false;
    }
    for (var index = 0; index < loadedTreebanks.length; index++){
        if (loadedTreebanks[index].id === newTree.id){
            output.println("Treebank " + newTree.id + " has been loaded previously");
            return false;
        }
    }
    getCloudAuthorAndTitle(newTree);
    loadedTreebanks.push(newTree);
    if (USING_SIDEBAR){
        addTreeToSidebar(newTree);
    }
    return true;
}
function addLoadedTree ( newTree ) { if ( newTree . numSentences < 1 ) { handleGlobalErrorMessage ( "Loaded file contained a treebank with no sentences. Id: " + newTree . id ) ; return false ; } else if ( newTree . xml === null ) { handleGlobalErrorMessage ( "Loaded file contained no treebank data. Id: " + newTree . id ) ; return false ; } for ( var index = 0 ; index < loadedTreebanks . length ; index ++ ) { if ( loadedTreebanks [ index ] . id === newTree . id ) { output . println ( "Treebank " + newTree . id + " has been loaded previously" ) ; return false ; } } getCloudAuthorAndTitle ( newTree ) ; loadedTreebanks . push ( newTree ) ; if ( USING_SIDEBAR ) { addTreeToSidebar ( newTree ) ; } return true ; }
Handles the post-load functions of Treebank objects.
Handles the post - load functions of Treebank objects .