39 lines
1.2 KiB
Kotlin
39 lines
1.2 KiB
Kotlin
package kr.co.vividnext.sodalive.content
|
|
|
|
import kr.co.vividnext.sodalive.common.BaseEntity
|
|
import kr.co.vividnext.sodalive.i18n.translation.SourceTextNormalizer
|
|
import javax.persistence.Column
|
|
import javax.persistence.Entity
|
|
import javax.persistence.Table
|
|
import javax.persistence.UniqueConstraint
|
|
|
|
@Entity
|
|
@Table(
|
|
name = "language_detection_result",
|
|
uniqueConstraints = [
|
|
UniqueConstraint(
|
|
name = "uk_language_detection_result_hash_provider_version",
|
|
columnNames = ["source_hash", "provider", "normalization_version"]
|
|
)
|
|
]
|
|
)
|
|
class LanguageDetectionResult(
|
|
@Column(name = "source_hash", nullable = false, length = 64)
|
|
val sourceHash: String,
|
|
|
|
@Column(name = "source_text_sample", nullable = false, length = 500)
|
|
val sourceTextSample: String,
|
|
|
|
@Column(name = "detected_language", nullable = false, length = 10)
|
|
val detectedLanguage: String,
|
|
|
|
@Column(name = "provider", nullable = false, length = 50)
|
|
val provider: String,
|
|
|
|
@Column(name = "confidence")
|
|
val confidence: Double? = null,
|
|
|
|
@Column(name = "normalization_version", nullable = false, length = 20)
|
|
val normalizationVersion: String = SourceTextNormalizer.NORMALIZATION_VERSION
|
|
) : BaseEntity()
|