<commit_before>'use strict';

angular.module('arachne.controllers')

.controller('DownloadController', ['$scope', '$uibModalInstance', '$http', '$filter', 'arachneSettings', 'downloadUrl', 'transl8', 'language',
    function ($scope, $uibModalInstance, $http, $filter, arachneSettings, downloadUrl, transl8, language) {

        $scope.mode = 'csv';
        $scope.formats = [];
        $scope.message = "";
        $scope.status = -1;

        function refresh() {
            if(!$scope.$$phase) {
                $scope.$apply();
            }
        }

        function reset() {
            $scope.status = -1;
            $scope.message = "";
        }

        function transl8Response(msg) {
            if (msg.substr(0, 12) !== "data_export_") {
                return msg;
            }
            var msgParts = msg.split("|");
            var msgKey = msgParts.shift();
            var transl8edMsg = $filter(transl8)(msgKey + "c");
            return transl8edMsg + msgParts.join("|");
        }

        console.log("neu()");
        function getTypes() {
            $http.get(arachneSettings.dataserviceUri + '/export/types').then(
                function(response) {
                    console.log("!", response);
                    $scope.formats = angular.isDefined(response.data) ? response.data : [];
                    $scope.message = "";
                    refresh();
                },
                function(response) {
                    $scope.message = $filter('transl8')("data_export_no_export_formats_available");
                    $scope.status = response.status;
                    $scope.mode = "?";
                    console.warn("could not get types:", response);
                    refresh();
                    return response;
                });<commit_msg>removes accidentally committed debug stuff, which led to malfunctions<commit_after>'use strict';

angular.module('arachne.controllers')

.controller('DownloadController', ['$scope', '$uibModalInstance', '$http', '$filter', 'arachneSettings', 'downloadUrl', 'transl8', 'language',
    function ($scope, $uibModalInstance, $http, $filter, arachneSettings, downloadUrl, transl8, language) {

        $scope.mode = 'csv';
        $scope.formats = [];
        $scope.message = "";
        $scope.status = -1;

        function refresh() {
            if(!$scope.$$phase) {
                $scope.$apply();
            }
        }

        function reset() {
            $scope.status = -1;
            $scope.message = "";
        }

        function transl8Response(msg) {
            if (msg.substr(0, 12) !== "data_export_") {
                return msg;
            }
            var msgParts = msg.split("|");
            var msgKey = msgParts.shift();
            var transl8edMsg = $filter('transl8')(msgKey);
            return transl8edMsg + msgParts.join("|");
        }

        function getTypes() {
            $http.get(arachneSettings.dataserviceUri + '/export/types').then(
                function(response) {
                    $scope.formats = angular.isDefined(response.data) ? response.data : [];
                    $scope.message = "";
                    refresh();
                },
                function(response) {
                    $scope.message = $filter('transl8')("data_export_no_export_formats_available");
                    $scope.status = response.status;
                    $scope.mode = "?";
                    console.warn("could not get types:", response);
                    refresh();
                    return response;
                });
{'fraction_non_alphanumeric': 0.1437291897891232, 'fraction_numerical': 0.006659267480577136, 'mean_word_length': 1.6468428781204112, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6253802', 'n_tokens_mistral': 969, 'n_tokens_neox': 920, 'n_words': 172}