]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
grammars : add English-only grammar (#10612)
authorGeorgi Gerganov <redacted>
Sun, 1 Dec 2024 19:37:54 +0000 (21:37 +0200)
committerGitHub <redacted>
Sun, 1 Dec 2024 19:37:54 +0000 (21:37 +0200)
grammars/english.gbnf [new file with mode: 0644]

diff --git a/grammars/english.gbnf b/grammars/english.gbnf
new file mode 100644 (file)
index 0000000..2e53686
--- /dev/null
@@ -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 ::= [!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]