Package-level declarations

Types

Link copied to clipboard
@Serializable
data class CacheData(val version: String, val entries: Map<String, String>)
Link copied to clipboard
class ConversionCache(store: FileStore, maxEntries: Int = 500, logger: Logger) : StoppableService
Link copied to clipboard

The Google IME request did not answer in time.

Link copied to clipboard
class GoogleIMEClient(timeout: Duration = 3.seconds, httpClient: HttpClient)
Link copied to clipboard

Converts romanji text to hiragana using Trie data structure.

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

Functions

Link copied to clipboard
suspend fun convertWithRomaji(message: String, converter: RomanjiConverter, timeoutMs: Long = 1000): String

Converts a message using romaji-to-Japanese conversion with timeout protection. Returns the original message appended with the conversion result, or the original message on failure.

Link copied to clipboard
fun convertWithRomajiBlocking(message: String, converter: RomanjiConverter, timeoutMs: Long = 1000): String

Blocking form of convertWithRomaji, for callers that cannot suspend.