Package-level declarations

The .fdic format: the FrequencyDictionary model, FrequencyDictionaryIO read/write, the FrequencyDictionaryFileFormat constants, and the FdicException hierarchy.

The .fdic format: the FrequencyDictionary model, FrequencyDictionaryIO read/write, the FrequencyDictionaryFileFormat constants, and the FdicException hierarchy.

The .fdic format: the FrequencyDictionary model, FrequencyDictionaryIO read/write, the FrequencyDictionaryFileFormat constants, and the FdicException hierarchy.

Types

Link copied to clipboard
sealed class FdicException : Exception

Base type for all errors raised while reading or writing .fdic files.

Link copied to clipboard

Thrown when a .fdic file is malformed or has an unsupported format.

Link copied to clipboard

Thrown when a dictionary's header fields fail validation.

Link copied to clipboard
data class FrequencyDictionary(val formatVersion: Int = FORMAT_VERSION.toInt(), val ngrams: Int, val locale: String, val termCount: Int, val terms: MutableMap<String, Long> = mutableMapOf<String, Long>())

An in-memory frequency dictionary as decoded from a .fdic file.

Link copied to clipboard

On-disk constants and header helpers for the .fdic file format.

Link copied to clipboard
expect object FrequencyDictionaryIO

Reads and writes FrequencyDictionary data in the .fdic file format.

actual object FrequencyDictionaryIO

Reads and writes FrequencyDictionary data in the .fdic file format.

actual object FrequencyDictionaryIO

Reads and writes FrequencyDictionary data in the .fdic file format.

Functions

Link copied to clipboard
fun FastByteArrayInputStream.readDelimitedString(): String
Link copied to clipboard
suspend fun ByteArrayBuilder.writeDelimitedString(str: String)