<commit_before><?php
class DryadPluginController
{
    /**
     * Returns a JSON string object to the browser when hitting the root of the domain
     *
     * @url GET total-impact/plugins/dryad
     */
    public function index()
    {
        return "This is the Dryad Plugin";
    }


    /**
     * Returns metrics values for a Dyrad	 String ID
     *
     * @url POST total-impact/plugins/dryad/metrics
     */
    public function getMetrics($data)
    {  
        $mArray = array();
        foreach ($data as $id) {   
            $mList = new MetricList();
            $mList->setId($id);
            $mList->setMethod('Post');
            $mList->setSourceName('Dryad');
            $mList->setIcon('http://datadryad.org/themes/Dryad/images/dryadLogo.png');
            $mList->setType('Dataset');            
            $mList->setPlugin('dryad.py');
            $mList->getMetrics(); // possible metrics loading method
            $mArray[$id]=$mList;
        }
        
        return $mArray; // serializes object into JSON
    }
}
?><commit_msg>replace dryad icon with small version<commit_after><?php
class DryadPluginController
{
    /**
     * Returns a JSON string object to the browser when hitting the root of the domain
     *
     * @url GET total-impact/plugins/dryad
     */
    public function index()
    {
        return "This is the Dryad Plugin";
    }


    /**
     * Returns metrics values for a Dyrad	 String ID
     *
     * @url POST total-impact/plugins/dryad/metrics
     */
    public function getMetrics($data)
    {  
        $mArray = array();
        foreach ($data as $id) {   
            $mList = new MetricList();
            $mList->setId($id);
            $mList->setMethod('Post');
            $mList->setSourceName('Dryad');       $mList->setIcon('http://dryad.googlecode.com/svn-history/r4402/trunk/dryad/dspace/modules/xmlui/src/main/webapp/themes/Dryad/images/favicon.ico');
            $mList->setType('Dataset');            
            $mList->setPlugin('dryad.py');
            $mList->getMetrics(); // possible metrics loading method
            $mArray[$id]=$mList;
        }
        
        return $mArray; // serializes object into JSON
    }
}
?>
{'fraction_non_alphanumeric': 0.13031674208144797, 'fraction_numerical': 0.0018099547511312218, 'mean_word_length': 1.9168865435356202, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3210722', 'n_tokens_mistral': 677, 'n_tokens_neox': 654, 'n_words': 147}