RomanjiConverter

class RomanjiConverter(cache: ConversionCache, apiClient: GoogleIMEClient, logger: Logger, debugMode: Boolean = false, maxConcurrentRequests: Int = 4)(source)

Constructors

Link copied to clipboard
constructor(cache: ConversionCache, apiClient: GoogleIMEClient, logger: Logger, debugMode: Boolean = false, maxConcurrentRequests: Int = 4)

Functions

Link copied to clipboard
suspend fun convert(input: String): String?

Converts the given romaji input to Japanese using the API client. Utilizes a word-level cache to store and retrieve previous conversion results. Each word is cached separately to improve cache hit rate.