Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultLanguages = []string{"en"}
DefaultLanguages is what projects get when they have not chosen packs (and what the ingest falls back to when no project is resolvable).
Functions ¶
func AvailableLanguages ¶
func AvailableLanguages() []string
AvailableLanguages returns the built-in pack codes, sorted.
func IsValidLanguage ¶
IsValidLanguage reports whether a built-in pack exists for the code.
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher scans text for flagged terms using whole-token matching, so a term never matches inside a larger word (no Scunthorpe-style false positives).
func NewMatcher ¶
NewMatcher returns a matcher over the selected language packs merged with the given per-project custom terms. nil languages means DefaultLanguages; an explicitly empty (non-nil) slice means no built-in packs, custom terms only. Unknown language codes are ignored.