@maschinenlesbar.org/lebensmittelwarnung-cli
    Preparing search index...

    Function resolveReason

    • The reason category ("Grund der Meldung") a word belongs to. The feed files every notice under one of seven categories (several joined with ", ") and never names the pathogen or allergen: "Salmonellen" appears nowhere, so it is mapped to Krankheitserreger, "Erdnuss" to Allergene, "Glas" to Fremdkörper. The most specific word decides: "Schwermetalle" is read by "schwermetall" (Rückstände und Kontaminanten), not by "metall" (Fremdkörper). A word of no category, or one read as two categories by parts equally long ("Bleihaltige Glasur": "blei", "glas"), is a validation error that lists the seven.

      Parameters

      • text: string

      Returns ReasonMatch