Skip to content

Commit

Permalink
fix settings resolution order
Browse files Browse the repository at this point in the history
  • Loading branch information
mh-northlander committed Nov 6, 2024
1 parent 0585329 commit d59f84b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ class ConfigAdapter(anchor: PathAnchor, settings: Settings, env: Environment) {
private val basePath = resourcesPath(env, settings)
private val fullAnchor = PathAnchor.filesystem(basePath).andThen(anchor)

val discardPunctuation: Boolean = settings.getAsBoolean(PARAM_DISCARD_PUNCTUATION, true)
// default false to let every morpheme have non-null span in the input text
val allowEmptyMorpheme: Boolean = settings.getAsBoolean(PARAM_ALLOW_EMPTY_MORPHEME, false)
val mode = splitMode(settings)

val compiled: Config = run {
val base = settingsFile(settings)
val additional = settingsInlineString(settings, fullAnchor)
additional.withFallback(base).anchoredWith(fullAnchor)
}

val discardPunctuation: Boolean = settings.getAsBoolean(PARAM_DISCARD_PUNCTUATION, true)
// default false to let every morpheme have non-null span in the input text
val allowEmptyMorpheme: Boolean = settings.getAsBoolean(PARAM_ALLOW_EMPTY_MORPHEME, false)
val mode = splitMode(settings)

private fun settingsFile(settings: Settings): Config {
val settingsPath = settings.get(PARAM_SETTINGS_PATH)
val base =
Expand Down

0 comments on commit d59f84b

Please sign in to comment.