grammars : add English-only grammar (#10612)

This commit is contained in:
Georgi Gerganov 2024-12-01 21:37:54 +02:00 committed by GitHub
parent 5c7a5aa0c3
commit 5e1ed95583
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

6
grammars/english.gbnf Normal file
View File

@ -0,0 +1,6 @@
# note: this might be incomplete, mostly an example
root ::= en-char+ ([ \t\n] en-char+)*
en-char ::= letter | digit | punctuation
letter ::= [a-zA-Z]
digit ::= [0-9]
punctuation ::= [!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]