// Generated by alef. Do not edit by hand.
@file:Suppress(
    "ktlint:standard:trailing-comma-on-call-site",
    "ktlint:standard:trailing-comma-on-declaration-site",
    "ktlint:standard:spacing-between-declarations-with-comments",
    "ktlint:standard:spacing-between-declarations-with-annotations",
    "ktlint:standard:when-entry-bracing",
    "ktlint:standard:blank-line-between-when-conditions",
    "ktlint:standard:blank-line-before-declaration",
    "ktlint:standard:chain-method-continuation",
    "ktlint:standard:annotation",
    "ktlint:standard:max-line-length",
    "ktlint:standard:no-semi",
    "ktlint:standard:statement-wrapping",
    "MaxLineLength",
    "TooManyFunctions",
    "FunctionParameterNaming",
    "LongParameterList",
    "CyclomaticComplexMethod",
    "LongMethod",
)

package dev.kreuzberg

/** Keyword algorithm selection. */
enum class KeywordAlgorithm {
    /** YAKE (Yet Another Keyword Extractor) - statistical approach */
    @com.fasterxml.jackson.annotation.JsonProperty("yake")
    YAKE,
    /** RAKE (Rapid Automatic Keyword Extraction) - co-occurrence based */
    @com.fasterxml.jackson.annotation.JsonProperty("rake")
    RAKE;

    @com.fasterxml.jackson.annotation.JsonValue
    fun toWire(): String = when (this) {
        YAKE -> "yake"
        RAKE -> "rake"
    }

    companion object {
        @com.fasterxml.jackson.annotation.JsonCreator
        @JvmStatic
        fun fromWire(value: String): KeywordAlgorithm = when (value) {
            "yake" -> YAKE
            "rake" -> RAKE
            else -> throw IllegalArgumentException("Unknown KeywordAlgorithm value: $value")
        }
    }
}
