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
- speller: Spell checker related data
- gramcheck: Grammar checker related data
Current Badge Files
FST-related
fst-lemmacount.json: Number of lemmas in the lexiconfst-maturity.json: Maturity level of the language resourcesfst-version.json: FST 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)
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, etc.)- Usage:
make-version-json.sh INPUTDIR VARNAME [--label LABEL] - VARNAME can be: FST, SPELLER, GRAMCHECK, etc.
- Usage:
Using in README
To display a badge in a repository README, use shields.io endpoint syntax:

Replace lang-xxx with the appropriate language code.