summaryrefslogtreecommitdiffstats
path: root/linguistics-components/src/main/java/com/yahoo/language/sentencepiece/Scoring.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2021-09-27 23:09:03 +0200
committerGitHub <noreply@github.com>2021-09-27 23:09:03 +0200
commit2df97d23d9f25ae60f010a2e9f273cb5b38e049b (patch)
treed2923a45682e91d80e7011c60cfb301e05acead3 /linguistics-components/src/main/java/com/yahoo/language/sentencepiece/Scoring.java
parent037f756caf4cfb99bcd988174839d7bc385267b9 (diff)
parent8f3fb1a105ded07144f6de527266a438e48a1766 (diff)
Merge pull request #19294 from vespa-engine/bratseth/linguistics-componentsv7.473.17
Bratseth/linguistics components
Diffstat (limited to 'linguistics-components/src/main/java/com/yahoo/language/sentencepiece/Scoring.java')
-rw-r--r--linguistics-components/src/main/java/com/yahoo/language/sentencepiece/Scoring.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/linguistics-components/src/main/java/com/yahoo/language/sentencepiece/Scoring.java b/linguistics-components/src/main/java/com/yahoo/language/sentencepiece/Scoring.java
new file mode 100644
index 00000000000..6c8560abee7
--- /dev/null
+++ b/linguistics-components/src/main/java/com/yahoo/language/sentencepiece/Scoring.java
@@ -0,0 +1,17 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.language.sentencepiece;
+
+/**
+ * The scoring strategy to use for picking segments
+ *
+ * @author bratseth
+ */
+public enum Scoring {
+
+ /** Find the segmentation that has the highest score */
+ highestScore,
+
+ /** Find the segmentation that has the fewest segments, resolve ties by score sum */
+ fewestSegments
+
+}