<commit_before>/**
 * Created by tkurz on 28.03.14.
 */
/**
 * RDF Dot Writer
 */
squebi.run( function($extension,$http,SQUEBI){

    function getImage(data, scope, rootScope) {
        $http({
            url: "http://rdfdot.dev.redlink.io/rdfdot/render",
            method: "POST",
            data: data.data,
            params: {'output':'png', 'input':'xml', 'base64':true}
        })
            .success(function(data, status, headers, config) {
                scope.loader = false;
                scope.image = data;
            }).
            error(function(data, status, headers, config) {
                scope.loader = false;
                rootScope.alerts.push({type:"error",msg:"Could not render image"});
            });
    }

    var onsuccess = function($scope,data,$rootScope) {

        if($.inArray(data.type, ["construct", "describe"]) != -1) {
            $scope.image = null;
            $scope.loader = true;

            $scope.template = SQUEBI.app + '/squebi/template/rdfdot.html';

            getImage(data, $scope, $rootScope);

        } else {<commit_msg>fixes loader problem<commit_after>/**
 * Created by tkurz on 28.03.14.
 */
/**
 * RDF Dot Writer
 */
squebi.run( function($extension,$http,SQUEBI){

    function getImage(data, scope, rootScope) {
        $http({
            url: "http://rdfdot.dev.redlink.io/rdfdot/render",
            method: "POST",
            data: data.data,
            params: {'output':'png', 'input':'xml', 'base64':true}
        })
            .success(function(data, status, headers, config) {
                rootScope.loader = false;
                scope.image = data;
            }).
            error(function(data, status, headers, config) {
                rootScope.loader = false;
                rootScope.alerts.push({type:"error",msg:"Could not render image"});
            });
    }

    var onsuccess = function($scope,data,$rootScope) {

        if($.inArray(data.type, ["construct", "describe"]) != -1) {
            $scope.image = null;
            $rootScope.loader = true;

            $scope.template = SQUEBI.app + '/squebi/template/rdfdot.html';

            getImage(data, $scope, $rootScope);

        } else {
{'fraction_non_alphanumeric': 0.15844273426889996, 'fraction_numerical': 0.008148483476686284, 'mean_word_length': 1.88135593220339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '502471', 'n_tokens_mistral': 689, 'n_tokens_neox': 646, 'n_words': 126}