CLI · QUERY
Query syntax
Grammar
Whitespace separates phrase atoms, while | outside quoting and escaping separates alternatives. An atom is bare or quoted text with an optional tag.
Empty atoms, unclosed quotes, missing tag values, unknown tags, and | without an operand are compile errors.
query = atom / phrase / disjunction
phrase = atom 1*(WS atom)
disjunction = atom 1*(OWS "|" OWS atom)
atom = [pos-tag] (bare / quoted)
pos-tag = "n:" / "v:" / "adj:" / "lit:" / ...
Atoms and tags
v:걷다 permits only verb analyses, while n:걷기 permits only noun analyses. An untagged atom receives global --pos or auto.
Each phrase atom has its own analysis and program set. A tag is never propagated implicitly across the phrase.
Quoting and escaping
"로그 인" is one literal atom containing a space. " and \ preserve a quote and a backslash as characters.
Quoting an inflected lemma does not enable literal mode. Quoting changes atom boundaries; the expansion option determines morphology.
kfind 'v:걷다 "로그 인"' src
kfind --literal 'key\:value' config
Alternative search
걷다|사용자 and 걷다 | 사용자 are equivalent queries that match either atom. Each alternative may carry its own POS tag.
Each alternative must be one atom and cannot be mixed with a phrase. --max-gap does not apply. Write a literal | as \| or "|".
Quote the whole query in a CLI shell so that the shell does not interpret | as a pipe.
kfind 'v:걷다|n:사용자|n:검증' src
kfind '\|' syntax.txt
kfind '"|"' syntax.txt