Skip to content

Commit

Permalink
grammars : add English-only grammar (ggerganov#10612)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov authored Dec 1, 2024
1 parent 5c7a5aa commit 5e1ed95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grammars/english.gbnf
Original file line number Diff line number Diff line change
@@ -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 ::= [!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]

0 comments on commit 5e1ed95

Please sign in to comment.