<commit_before>/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define */
define(function (require) {

    "use strict";

    var $           = require('jquery'),
        Backbone    = require('backbone'),
        i           = 0,
        /* hard-coded KB from the sample WEB data (see sourcephrase.js)
        */
        targetunits = [
            {
                "id": "en.en.0000001",
                "source": "RUT",
                "target": "RUT",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000002",
                "source": "08-RUT-web.sfm",
                "target": "08-RUT-web.sfm",
                "n": "1",
                "timestamp": "2014-01-01T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000003",
                "source": "Ruth",
                "target": "Ruth",
                "n": "2",
                "dt": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000004",
                "source": "It",
                "target": "It",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000005",
                "source": "happened",
                "target": "came about",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000006",
                "source": "in",
                "target": "during",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000007",
                "source": "the",
                "target": "the",
                "n": "2",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000008",
                "source": "days",
                "target": "days",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000009",
                "source": "when",
                "target": "when",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000010",
                "source": "judges",
                "target": "judges",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000011",
                "source": "judged",
                "target": "judged",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000012",
                "source": "that",
                "target": "reallyreallyreallyreallyreallyloooooooooonnnnnnngstring",
                "n": "1",
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            }
        ],
        findById = function (id) {
            var deferred = $.Deferred(),
                targetunit = null,
                l = targetunits.length;
            for (i = 0; i < l; i++) {
                if (targetunits[i].id === id) {<commit_msg>Refactor targetunit json<commit_after>/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define */
define(function (require) {

    "use strict";

    var $           = require('jquery'),
        Backbone    = require('backbone'),
        i           = 0,
        /* hard-coded KB from the sample WEB data (see sourcephrase.js)
        */
        targetunits = [
            {
                "id": "en.en.0000001",
                "source": "RUT",
                "refstring": [
                    {
                        "target": "RUT",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000002",
                "source": "08-RUT-web.sfm",
                "refstring": [
                    {
                        "target": "08-RUT-web.sfm",
                        "n": "1"
                    }
                ],
                "timestamp": "2014-01-01T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000003",
                "source": "Ruth",
                "refstring": [
                    {
                        "target": "Ruth",
                        "n": "2"
                    }
                ],
                "dt": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000004",
                "source": "It",
                "refstring": [
                    {
                        "target": "It",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000005",
                "source": "happened",
                "refstring": [
                    {
                        "target": "came about",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000006",
                "source": "in",
                "refstring": [
                    {
                        "target": "during",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000007",
                "source": "the",
                "refstring": [
                    {
                        "target": "the",
                        "n": "2"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000008",
                "source": "days",
                "refstring": [
                    {
                        "target": "days",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000009",
                "source": "when",
                "refstring": [
                    {
                        "target": "when",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000010",
                "source": "judges",
                "refstring": [
                    {
                        "target": "judges",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000011",
                "source": "judged",
                "refstring": [
                    {
                        "target": "judged",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            },
            {
                "id": "en.en.0000012",
                "source": "that",
                "refstring": [
                    {
                        "target": "reallyreallyreallyreallyreallyloooooooooonnnnnnngstring",
                        "n": "1"
                    }
                ],
                "timestamp": "2013-09-18T18:50:35z",
                "user": "user:machine"
            }
        ],
        findById = function (id) {
            var deferred = $.Deferred(),
                targetunit = null,
                l = targetunits.length;
            for (i = 0; i < l; i++) {
                if (targetunits[i].id === id) {
{'fraction_non_alphanumeric': 0.15275110157044403, 'fraction_numerical': 0.06168794486498701, 'mean_word_length': 0.7922656408179793, 'pattern_counts': {'":': 156, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '954784', 'n_tokens_mistral': 2919, 'n_tokens_neox': 2368, 'n_words': 412}