metreex-analysis.js
/**
 * Converts the most recent metric results into the array of objects used for processing throughout the application
 * @returns {Array}
 */
Converts the most recent metric results into the array of objects used for processing throughout the application
@returns {Array}
Converts the most recent metric results into the array of objects used for processing throughout the application @returns { Array }
function assembleMetricData(){
    var data = [],
        runningIndex = 0,
        index,
        sentenceIndex;
    for (index = 0; index < selectedTreebanks.length; index++){
        for (sentenceIndex = 0; sentenceIndex < lastMetricResults[index].length; sentenceIndex++){
            data.push({
                title: selectedTreebanks[index].title,
                section: selectedTreebanks[index].section,
                sentence: (+sentenceIndex + 1),
                numSentences: lastMetricResults[index].length,
                metricValues: lastMetricResults[index][sentenceIndex],
                originalIndex: runningIndex++,
                refString: selectedTreebanks[index].title + " " + selectedTreebanks[index].section + " " + (+sentenceIndex + 1),
                author: selectedTreebanks[index].author
            });
        }
    }
    return data;
}
function assembleMetricData ( ) { var data = [ ] , runningIndex = 0 , index , sentenceIndex ; for ( index = 0 ; index < selectedTreebanks . length ; index ++ ) { for ( sentenceIndex = 0 ; sentenceIndex < lastMetricResults [ index ] . length ; sentenceIndex ++ ) { data . push ( { title : selectedTreebanks [ index ] . title , section : selectedTreebanks [ index ] . section , sentence : ( + sentenceIndex + 1 ) , numSentences : lastMetricResults [ index ] . length , metricValues : lastMetricResults [ index ] [ sentenceIndex ] , originalIndex : runningIndex ++ , refString : selectedTreebanks [ index ] . title + " " + selectedTreebanks [ index ] . section + " " + ( + sentenceIndex + 1 ) , author : selectedTreebanks [ index ] . author } ) ; } } return data ; }
Converts the most recent metric results into the array of objects used for processing throughout the application
 @returns {Array}
Converts the most recent metric results into the array of objects used for processing throughout the application @returns { Array }
//metrics: enabledMetrics, // Functionally equivalent to "lastMetricsUsed" global, and *highly* redundant (one copy per sentence) //identifyAuthor(selectedTreebanks[index].getTitle())