YAML-based help catalog with topic search
Implement lightweight Porter-style suffix stripping in stemmer.go covering plurals (-sses, -ies, -s), verb forms (-ed, -ing, -eed), and derivational suffixes (-ational, -tional, -fulness, -ness, -ment, -ation, -ously, -ively, -ably, -ally, -izer, -ingly). Words under 4 chars are unchanged and results are guaranteed at least 2 chars. tokenize() now emits both raw and stemmed forms so the index contains both. Search() distinguishes stem-only matches (scoreStemWord=0.7) from exact matches (1.0), keeping stemmed results slightly below raw hits. 22 stem unit tests, 5 search integration tests, and BenchmarkStem with 100 words. All existing tests pass with no regressions. Co-Authored-By: Virgil <virgil@lethean.io> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| catalog.go | ||
| catalog_test.go | ||
| CLAUDE.md | ||
| FINDINGS.md | ||
| go.mod | ||
| go.sum | ||
| parser.go | ||
| parser_test.go | ||
| search.go | ||
| search_bench_test.go | ||
| search_test.go | ||
| stemmer.go | ||
| stemmer_test.go | ||
| TODO.md | ||
| topic.go | ||