<commit_before>package com.github.marlonlom.utilities.timeago

import java.util.*

object DataBuilder {

    /**
     * The available languages array.
     */
    private val LANGUAGES_ARRAY = "ar;cs;da;de;en;es;eu;fa;fr;in;it;nl;pt;tr".split(";".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()

    /**
     * Constant for bundle name
     */
    private const val BUNDLE_NAME = "com.github.marlonlom.utilities.timeago.messages"

    /**
     * Gets random language reference.
     *
     * @return the random language code
     */
    val randomLanguageRef: String
        get() = LANGUAGES_ARRAY[Random().nextInt(LANGUAGES_ARRAY.size)]

    /**
     * Gets expected message.
     *
     * @param bundle the resource bundle for getting messages by key
     * @param key    the key
     * @param values the values
     * @return the expected message
     */
    fun getExpectedMessage(bundle: ResourceBundle, key: String, vararg values: Int): String {
        val bundledMessage = bundle.getString(key)<commit_msg>Added language codes (zh, zh_tw) to data builder<commit_after>package com.github.marlonlom.utilities.timeago

import java.util.*

object DataBuilder {

    /**
     * The available languages array.
     */
    private val LANGUAGES_ARRAY = "ar;cs;da;de;en;es;eu;fa;fr;in;it;nl;pt;tr;zh;zh_tw".split(";".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()

    /**
     * Constant for bundle name
     */
    private const val BUNDLE_NAME = "com.github.marlonlom.utilities.timeago.messages"

    /**
     * Gets random language reference.
     *
     * @return the random language code
     */
    val randomLanguageRef: String
        get() = LANGUAGES_ARRAY[Random().nextInt(LANGUAGES_ARRAY.size)]

    /**
     * Gets expected message.
     *
     * @param bundle the resource bundle for getting messages by key
     * @param key    the key
     * @param values the values
     * @return the expected message
     */
    fun getExpectedMessage(bundle: ResourceBundle, key: String, vararg values: Int): String {
        val bundledMessage = bundle.getString(key)
{'fraction_non_alphanumeric': 0.11424474187380497, 'fraction_numerical': 0.0, 'mean_word_length': 2.9194756554307117, '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': '4826730', 'n_tokens_mistral': 646, 'n_tokens_neox': 628, 'n_words': 158}