Skip to content

content/keyword-stuffing still counts nav links, splits umlauts and counts German price notes #1182

Closed

Description

@deniskern

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:

  1. 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.
  2. Non-ASCII letters split words. gemäß is counted as gem, so umlauts and ß produce fragment "keywords".
  3. Legally required price notes are counted. German shops must print inkl. MwSt. zzgl. Versandkosten next to every price (PAngV), so product listings report inkl, 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 json

Actual (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}), so gemäß stays one word.
  • Treat the price-notice boilerplate like function words for de (and incl/vat for en), 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-stuffing counts 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}), so gemäß and other words with umlauts or ß stay one word and no fragment such as gem is reported.
  • Legally required price-notice terms are ignored like function words: inkl, mwst, zzgl, versandkosten for de, and incl, vat for en.
  • 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 containing gemäß) and asserts none of bademode, gem, inkl, mwst, zzgl or versandkosten is reported, while real overuse in the main text still is.

Activity

  1. WilliamK112 commented on Oct 27, 2026

    @WilliamK112
    Contributor

    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.

  2. nc9 commented on Oct 27, 2026

    @nc9
    Contributor

    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

  3. added theissue type on Oct 28, 2026
  4. added
    bug
    rules
    size: S
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions