Shields.io Badge JSON Endpoints
This document describes the JSON files used as endpoints for shields.io badges displayed in language repository GitHub pages.
File Location
Badge JSON files are generated in the docs/badgedata/ directory of each language repository during the build process. These files are served from the gh-pages branch.
File Naming Convention
Files follow the pattern: prefix-datatype.json.
Prefixes
- fst: Lexicon and FST-related data
- pkg: Package-level data, not specific to the FST
- speller: Spell checker related data
- gramcheck: Grammar checker related data
Current Badge Files
FST-related
fst-lemmacount.json: Number of lemmas in the lexicon
Package-related
pkg-maturity.json: Maturity level of the language resourcespkg-version.json: Package version number (from AC_INIT in configure.ac)
Speller-related
speller-suggestions.json: Spell checker suggestion quality metrics- First position accuracy (%)
- Top 5 accuracy (%)
- Test set size
speller-version.json: Speller version number (from SPELLERVERSION in configure.ac)
Hyphenation-related
hyphenator-version.json: Hyphenator version number (from HYPHVERSION in configure.ac)
Grammar checker-related
gramcheck-version.json: Grammar checker version number (from GRAMCHECKVERSION in configure.ac)gramcheck-rules.json: Number of error-detection rules in tools/grammarcheckers/grammarchecker.cg3
TTS text processing-related
tts-textproc-version.json: TTS text processing version number (from TTSTEXTPROCVERSION in configure.ac)
Shields.io Endpoint JSON Schema
These JSON files follow the shields.io endpoint JSON schema:
{
"schemaVersion": 1,
"label": "Badge Label",
"message": "Badge Message",
"color": "badge-color"
}
Color Conventions
Colors typically follow this pattern based on quality/maturity:
- black: Experimental/very poor
- red: Poor quality
- yellow: Medium quality (or pre-release version 0.x.y)
- green: Good quality (or stable version 1.x.y+)
- grey: N/A or no data
Build System
These files are automatically generated during the build process via rules in giella-core/am-shared/docs-dir-include.am using the FORCE target to ensure they are always regenerated.
Generation Scripts
Badge JSON files are generated by shell scripts in giella-core/scripts/:
make-lemmacount.json.sh: Generates FST lemma count badgemake-maturity.json.sh: Generates maturity level badgemake-spellerbadge-json.sh: Generates speller suggestion quality badgemake-version-json.sh: Generates version badges (FST, speller, hyphenator, gramcheck, TTS textproc, etc.)- Usage:
make-version-json.sh INPUTDIR VARNAME [--label LABEL] - VARNAME can be: FST, SPELLER, HYPH, GRAMCHECK, TTSTEXTPROC, etc.
- Usage:
make-gramcheck-rules-json.sh: Generates grammar checker error-detection rule count badge- Counts rules via
count-gramcheck-rules.sh, which looks for rules of the formRULETYPE:rule-name (&errortag) ...intools/grammarcheckers/grammarchecker.cg3
- Counts rules via
Using in README
To display a badge in a repository README, use shields.io endpoint syntax:

Replace lang-xxx with the appropriate language code.