3 ms·
JSON is a sub-set of what GBNF can do, so there are still advantages to that approach. But even GBNF doesn’t go far enough. Ever try to restrict a model to a si
by J_Shelby_J 2y ago
JSON is a sub-set of what GBNF can do, so there are still advantages to that approach. But even GBNF doesn’t go far enough. Ever try to restrict a model to a single sentence?
root ::= \" \" item{{{min_count},{max_count}}}
item ::= [A-Z] [^\\r\\n\\x0b\\x0c\\x85\\u2028\\u2029.?!]+ [a-z] (\". \" | \"? \" | \"! \")
This kinda works if you don't mind no abbreviations, but you can't do something like this with JSON grammars afaik.