mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 14:47:22 -07:00
fix: ngramX generates n-grams per line, not across entire corpus
Previously ngramX.bin accumulated all words from the whole file into a flat array, producing candidates that crossed line boundaries. With a corpus of "roses are red\nviolets are blue", it generated "red violets" and "are red violets" - mixing lines that represent separate phrases. Fixes ngramX.c to process each line independently so n-grams stay within a single line, matching the expected behavior for song lyrics, book passages, and similar per-line corpora.
This commit is contained in: