[metadata]
code = "ja"
name = "Japanese"

[terminators]
# Japanese punctuation + half-width !? (commonly used in Japanese text)
chars = ["。", "！", "？", "!", "?"]

# Special patterns for emphasis (both full-width and half-width)
patterns = [
    { pattern = "！？", name = "surprised_question_fw" },
    { pattern = "？！", name = "questioning_exclamation_fw" },
    { pattern = "!?", name = "surprised_question" },
    { pattern = "?!", name = "questioning_exclamation" }
]

[ellipsis]
treat_as_boundary = true
patterns = ["…"]

# Context rules
context_rules = []

# Exception patterns
exceptions = [
    { regex = "えーと…", boundary = false }
]

[enclosures]
# Japanese-specific brackets + half-width parentheses (commonly used)
pairs = [
    { open = "「", close = "」" },
    { open = "『", close = "』" },
    { open = "（", close = "）" },
    { open = "【", close = "】" },
    { open = "［", close = "］" },
    { open = "〈", close = "〉" },
    { open = "《", close = "》" },
    { open = "〔", close = "〕" },
    { open = "(", close = ")" }
]

[suppression]
# NOTE: the former line-start ")" / "）" list-item suppression rules were
# removed: "alnum" matches kanji/kana, so the closing paren of ordinary
# parentheticals like （例） near a line start was suppressed, leaving the
# enclosure depth permanently unbalanced. Unmatched closing delimiters no
# longer poison the document (negative depth does not suppress boundaries),
# so bare list markers like 1） are harmless without a suppression rule.
fast_patterns = []

