I open-sourced the counting tool, and it immediately caught two of its own bugs
说明与用途
作者发布了一个用于统计圣经中“fear not”短语的开源工具,发现了两个隐藏错误:子字符串匹配和标点处理。修正规则后,在完整的KJV和CUV语料库上验证,确认了准确的计数结果。
问题
A counting tool for the phrase "fear not" in the King James Bible produced incorrect counts due to substring matching and punctuation handling.
结果
The tool identified two silent bugs that caused incorrect counts, leading to corrected counting rules and validated results against the full KJV and CUV corpora.
工作流
- 1. Publish initial count of "fear not" in KJV.
- 2. Release counting code as open-source tool.
- 3. Run tool over full KJV corpus.
- 4. Compare tool output to published per-verse audit trail.
- 5. Identify substring and punctuation bugs.
- 6. Correct counting rules: whole-word matching, punctuation not used as glue.
- 7. Re-run tests to confirm agreement with audit trail.
证据
A naive search for fear also matches fearful, fearfulness, and God-fearing. That inflates a raw count by roughly 15% and looks completely reasonable on the screen.
I normalised away punctuation so fear not. and fear not would match. But stripping punctuation also turns 1 Peter 2:18 — into the string ...all fear not only..., which contains the phrase "fear not" even though the verse does not say it.
node test.mjs # ok — tool and audit trail agree over the full KJV (31,102 v) and CUV (31,100 v)
- 记录日期: 2026-10-02T01:41:13.471Z