<commit_before>export function PropertyValueDirective() {
    'ngInject';

    let directive = {
        restrict: 'E',
        templateUrl: 'app/directives/property-value.html',
        scope: {
            property: "@",
            value: "="
        },
        controller: PropertyValueController,
        controllerAs: 'ctrl',
        bindToController: true
    };
    return directive;
}

class PropertyValueController {
    constructor(userService, $window) {
        'ngInject';

        this.userService = userService;
        this.user = this.userService.isAuthenticated();
        this.$window = $window;
    }

    formatAuthor(a) {
        return a.lastname + ", " + a.firstname + " (" + a.affiliation + ")";
    }

    formatAuthorList(authors) {
        if (authors.length == 0) return "(no authors are listed)";
        return "By " + authors.map(this.formatAuthor).join('; ');
    }

    formatAuthors(authors) {
        return authors.map(a => `${a.lastname}, ${a.firstname} (${a.affiliation})`).join('; ');
    }

    getPublisherName(userId) {
        return userId;
    }

    urlForDownload(dataset) {
        var datasetId = dataset.id;
        var baseURL = `${this.$window.location.protocol}//${this.$window.location.hostname}:${this.$window.location.port}/api`;
        return `${baseURL}/pub/datasets/download/${datasetId}?apikey=${this.userService.apikey()}`;
    }

    bytesMessageForDownload(dataset){
        var numberOfBytes = (dataset.zip && dataset.zip.size)?dataset.zip.size:-1;
        if (numberOfBytes < 0) return "zip file size unknown";
        if (numberOfBytes < 1024) return `${numberOfBytes} Bytes`;
        numberOfBytes = numberOfBytes/1024;
        if (numberOfBytes < 1024) return `${numberOfBytes.toFixed(2)} KB`;
        numberOfBytes = numberOfBytes/1024;
        if (numberOfBytes < 1024) return `${numberOfBytes.toFixed(2)} MB`;
        numberOfBytes = numberOfBytes/1024;
        return `${numberOfBytes.toFixed(2)} GB`;
    }

    filenameForDownload(dataset) {
        var name = (dataset.zip && dataset.zip.filename)?(dataset.zip.filename):"FullDataset.zip";
        console.log("zipfile name: ", name);
        return name;
    }
}<commit_msg>Removed console log in property-value-directive<commit_after>export function PropertyValueDirective() {
    'ngInject';

    let directive = {
        restrict: 'E',
        templateUrl: 'app/directives/property-value.html',
        scope: {
            property: "@",
            value: "="
        },
        controller: PropertyValueController,
        controllerAs: 'ctrl',
        bindToController: true
    };
    return directive;
}

class PropertyValueController {
    constructor(userService, $window) {
        'ngInject';

        this.userService = userService;
        this.user = this.userService.isAuthenticated();
        this.$window = $window;
    }

    formatAuthor(a) {
        return a.lastname + ", " + a.firstname + " (" + a.affiliation + ")";
    }

    formatAuthorList(authors) {
        if (authors.length == 0) return "(no authors are listed)";
        return "By " + authors.map(this.formatAuthor).join('; ');
    }

    formatAuthors(authors) {
        return authors.map(a => `${a.lastname}, ${a.firstname} (${a.affiliation})`).join('; ');
    }

    getPublisherName(userId) {
        return userId;
    }

    urlForDownload(dataset) {
        var datasetId = dataset.id;
        var baseURL = `${this.$window.location.protocol}//${this.$window.location.hostname}:${this.$window.location.port}/api`;
        return `${baseURL}/pub/datasets/download/${datasetId}?apikey=${this.userService.apikey()}`;
    }

    bytesMessageForDownload(dataset){
        var numberOfBytes = (dataset.zip && dataset.zip.size)?dataset.zip.size:-1;
        if (numberOfBytes < 0) return "zip file size unknown";
        if (numberOfBytes < 1024) return `${numberOfBytes} Bytes`;
        numberOfBytes = numberOfBytes/1024;
        if (numberOfBytes < 1024) return `${numberOfBytes.toFixed(2)} KB`;
        numberOfBytes = numberOfBytes/1024;
        if (numberOfBytes < 1024) return `${numberOfBytes.toFixed(2)} MB`;
        numberOfBytes = numberOfBytes/1024;
        return `${numberOfBytes.toFixed(2)} GB`;
    }

    filenameForDownload(dataset) {
        var name = (dataset.zip && dataset.zip.filename)?(dataset.zip.filename):"FullDataset.zip";
        return name;
    }
}
{'fraction_non_alphanumeric': 0.1465301478953356, 'fraction_numerical': 0.013651877133105802, 'mean_word_length': 2.7065767284991566, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '937755', 'n_tokens_mistral': 1368, 'n_tokens_neox': 1314, 'n_words': 235}