<commit_before>angular.module('project_questions')

.factory('QuestionsService', ['$resource', '$http', '$timeout', '$location', '$rootScope', '$filter', '$q', '$window', '$sce', function($resource, $http, $timeout, $location, $rootScope, $filter, $q, $window, $sce) {

    /* get the base url */

    var baseurl = angular.element('meta[name="baseurl"]').attr('content');

    /* configure resources */

    var resources = {
        projects: $resource(baseurl + 'api/v1/projects/projects/:id/:detail_action/'),
        values: $resource(baseurl + 'api/v1/projects/projects/:project/values/:id/'),
        questionsets: $resource(baseurl + 'api/v1/projects/projects/:project/questionsets/:list_action/:id/'),
        settings: $resource(baseurl + 'api/v1/core/settings/')
    };

    /* configure factories */

    var factories = {
        values: function(question) {
            return {
                text: question.default_text,
                option: question.default_option,
                external_id: question.default_external_id,
                file: null,
                project: service.project.id,
                attribute: question.attribute,
                changed: (question.default_text || question.default_option || question.default_external_id),
                removed: false
            };
        },
        valuesets: function(set_prefix, set_index) {
            return {
                set_prefix: set_prefix,
                set_index: set_index,
                hidden: {
                    questionsets: {},<commit_msg>Fix delete value set in front-end<commit_after>angular.module('project_questions')

.factory('QuestionsService', ['$resource', '$http', '$timeout', '$location', '$rootScope', '$filter', '$q', '$window', '$sce', function($resource, $http, $timeout, $location, $rootScope, $filter, $q, $window, $sce) {

    /* get the base url */

    var baseurl = angular.element('meta[name="baseurl"]').attr('content');

    /* configure resources */

    var resources = {
        projects: $resource(baseurl + 'api/v1/projects/projects/:id/:detail_action/'),
        values: $resource(baseurl + 'api/v1/projects/projects/:project/values/:id/:detail_action/'),
        questionsets: $resource(baseurl + 'api/v1/projects/projects/:project/questionsets/:list_action/:id/'),
        settings: $resource(baseurl + 'api/v1/core/settings/')
    };

    /* configure factories */

    var factories = {
        values: function(question) {
            return {
                text: question.default_text,
                option: question.default_option,
                external_id: question.default_external_id,
                file: null,
                project: service.project.id,
                attribute: question.attribute,
                changed: (question.default_text || question.default_option || question.default_external_id),
                removed: false
            };
        },
        valuesets: function(set_prefix, set_index) {
            return {
                set_prefix: set_prefix,
                set_index: set_index,
                hidden: {
                    questionsets: {},
{'fraction_non_alphanumeric': 0.14240405962575325, 'fraction_numerical': 0.002537266095781795, 'mean_word_length': 2.32, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6271089', 'n_tokens_mistral': 874, 'n_tokens_neox': 844, 'n_words': 161}