Skip to content

Commit d59f84b

Browse files
fix settings resolution order
1 parent 0585329 commit d59f84b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/com/worksap/nlp/elasticsearch/sudachi/ConfigAdapter.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ class ConfigAdapter(anchor: PathAnchor, settings: Settings, env: Environment) {
2929
private val basePath = resourcesPath(env, settings)
3030
private val fullAnchor = PathAnchor.filesystem(basePath).andThen(anchor)
3131

32+
val discardPunctuation: Boolean = settings.getAsBoolean(PARAM_DISCARD_PUNCTUATION, true)
33+
// default false to let every morpheme have non-null span in the input text
34+
val allowEmptyMorpheme: Boolean = settings.getAsBoolean(PARAM_ALLOW_EMPTY_MORPHEME, false)
35+
val mode = splitMode(settings)
36+
3237
val compiled: Config = run {
3338
val base = settingsFile(settings)
3439
val additional = settingsInlineString(settings, fullAnchor)
3540
additional.withFallback(base).anchoredWith(fullAnchor)
3641
}
3742

38-
val discardPunctuation: Boolean = settings.getAsBoolean(PARAM_DISCARD_PUNCTUATION, true)
39-
// default false to let every morpheme have non-null span in the input text
40-
val allowEmptyMorpheme: Boolean = settings.getAsBoolean(PARAM_ALLOW_EMPTY_MORPHEME, false)
41-
val mode = splitMode(settings)
42-
4343
private fun settingsFile(settings: Settings): Config {
4444
val settingsPath = settings.get(PARAM_SETTINGS_PATH)
4545
val base =

0 commit comments

Comments
 (0)