<commit_before>package jp.toastkid.yobidashi.search

import android.content.Context
import android.net.Uri

/**
 * @author toastkidjp
 */
class UrlFactory {

    /**
     * Make search [Uri].
     *
     * @param context
     * @param category [SearchCategory]
     * @param query
     * @param currentUrl
     */
    operator fun invoke(context: Context, category: String, query: String, currentUrl: String? = null): Uri =
            Uri.parse(SearchCategory.findByCategory(category).make(context, query, currentUrl))

}<commit_msg>refactor #412 Use toUri().<commit_after>package jp.toastkid.yobidashi.search

import android.content.Context
import android.net.Uri
import androidx.core.net.toUri

/**
 * @author toastkidjp
 */
class UrlFactory {

    /**
     * Make search [Uri].
     *
     * @param context
     * @param category [SearchCategory]
     * @param query
     * @param currentUrl
     */
    operator fun invoke(context: Context, category: String, query: String, currentUrl: String? = null): Uri =
            SearchCategory.findByCategory(category).make(context, query, currentUrl).toUri()

}
{'fraction_non_alphanumeric': 0.11992786293958521, 'fraction_numerical': 0.002705139765554554, 'mean_word_length': 3.2045454545454546, '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': '4247605', 'n_tokens_mistral': 343, 'n_tokens_neox': 328, 'n_words': 79}