Repository navigation
Description
Summary
Follow-up to #1042 (fixed in v0.0.134, thanks — German function words are gone). On German shop pages content/keyword-stuffing still reports words that are not the author's copy:
- Navigation and header links are counted. A mega menu that repeats a category name ("Bademode Bikinis", "Bademode Badeanzüge", …) puts that word over the threshold on every page, including the Impressum. Since v0.0.134 the parser already knows whether a link sits in header, navigation, footer or content.
- Non-ASCII letters split words.
gemäßis counted asgem, so umlauts and ß produce fragment "keywords". - Legally required price notes are counted. German shops must print
inkl. MwSt. zzgl. Versandkostennext to every price (PAngV), so product listings reportinkl,mwst,zzgl,versandkosten(English stores:incl,vat).
Repro
Page: <html lang="de">, a <header><nav> with 20 links "Bademode ", and a <main> with ~380 words of Impressum text that contains gemäß a few times.
squirrel audit http://127.0.0.1:8765/ --http -m 1 -f jsonActual (v0.0.136)
{"name":"keyword-stuffing","status":"warn","message":"3 word(s) may be overused",
"items":[{"id":"bademode","label":"\"bademode\" (4.6%)","meta":{"count":20}},
{"id":"gem","label":"\"gem\" (3.4%)","meta":{"count":15}}, ...]}Live: brunobanani.com, 30 pages, 18 flagged; items include bademode on /rechtliches/impressum/ and /info/kontakt/, and inkl / mwst / zzgl / versandkosten on listing pages.
Expected
- Count only main content (skip header, nav, footer and other boilerplate links).
- Tokenize with Unicode letters (
\p{L}), sogemäßstays one word. - Treat the price-notice boilerplate like function words for
de(andincl/vatforen), or ignore text that repeats verbatim next to every price.
Versions
Tested with v0.0.133 (also flags alles, aus, der, von) and v0.0.136 (above).
Acceptance Criteria
-
content/keyword-stuffingcounts only main-content text: words in links or text inside header, navigation and footer regions (the parser's link and region sections) are not counted, so a repeated mega-menu category no longer flags the Impressum or contact page. - Words are tokenized on Unicode letters (
\p{L}), sogemäßand other words with umlauts or ß stay one word and no fragment such asgemis reported. - Legally required price-notice terms are ignored like function words:
inkl,mwst,zzgl,versandkostenforde, andincl,vatforen. - A test per case reproduces the issue's fixture (a
lang="de"page with 20 header/nav links "Bademode " and about 380 words of main text containinggemäß) and asserts none ofbademode,gem,inkl,mwst,zzglorversandkostenis reported, while real overuse in the main text still is.
Activity
WilliamK112 commentedon Oct 27, 2026
I would like to take this. I will make the keyword-stuffing rule use main-content text instead of navigation/header/footer boilerplate, tokenize Unicode letters without splitting umlauts or ß, add the German and English price-note terms called out here, and cover each regression with focused tests.
nc9 commentedon Oct 27, 2026
i'm currently working on the next version of the page section classifier that is a trained model - so rules will be able to skip sections detected as nav, header, footer, aside, quote, etc. - for now we just gotta keep patching issues as they're found
there is likely also a better long-term way to detect page stuffing other than just raw counts but will defer
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy squirrelscan#1182
fix(rules): measure keyword density in main copy #1182 (#1190)