<commit_before>const commonService = require('../commonService');

const xmlBuilder = require('xmlBuilder');
const xmlParser = require('xml2js');

/**
 * Translate text from one language into text of another language, and get text-to-speech output of translated text.
 * @augments commonService
 * {@link http://docs.microsofttranslator.com/text-translate.html|documentation}
 */
class textTranslator extends commonService {
    /**
     * Constructor.
     * 
     * @param {Object} obj
     * @param {string} obj.apiKey
     * @param {string} obj.endpoint
     */
    constructor({ apiKey, endpoint }) {
        super({ apiKey, endpoint });
        this.serviceId = ""
        this.endpoints = [
            "api.microsofttranslator.com"
        ];
    }

    /**
     * Retrieve translations for multiple source texts.
     * @returns {Promise.<object>}
     */<commit_msg>lowercase xmlbuilder package in textTranslator.js<commit_after>const commonService = require('../commonService');

const xmlBuilder = require('xmlbuilder');
const xmlParser = require('xml2js');

/**
 * Translate text from one language into text of another language, and get text-to-speech output of translated text.
 * @augments commonService
 * {@link http://docs.microsofttranslator.com/text-translate.html|documentation}
 */
class textTranslator extends commonService {
    /**
     * Constructor.
     * 
     * @param {Object} obj
     * @param {string} obj.apiKey
     * @param {string} obj.endpoint
     */
    constructor({ apiKey, endpoint }) {
        super({ apiKey, endpoint });
        this.serviceId = ""
        this.endpoints = [
            "api.microsofttranslator.com"
        ];
    }

    /**
     * Retrieve translations for multiple source texts.
     * @returns {Promise.<object>}
     */
{'fraction_non_alphanumeric': 0.12583892617449666, 'fraction_numerical': 0.0011185682326621924, 'mean_word_length': 2.8390557939914163, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 9}, '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': '6863397', 'n_tokens_mistral': 500, 'n_tokens_neox': 485, 'n_words': 126}