Generating grammars automatically following lark grammar #1081
Unanswered
AdrienCorenflos
asked this question in
Q&A
Replies: 1 comment
-
Since the index compiled 100%, it's likely that the model is infinitely generating. Could you try setting a token limit and ensuring the generation process is running?
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was trying to be a bit lazy today and implement a MWE to ask a model to generate a usable grammar automatically for a problem at hand: in this instance, I wanted to generate a grammar that would be compatible with pgfplots in tikz/LaTex.
The script I wrote is the following (adapted from the README example):
The
lark.lark
file is posted below: it's a slightly modified version of https://github.com/lark-parser/lark/blob/master/lark/grammars/lark.lark which does not seem to parse due to the Terminal _STRING not being defined (I need to open an issue in their repo).I got past the finite state machine compilation, but it does not seem to do anything at all after that:
Any idea what is going on? Is my laptop too slow (I wouldn't be surprised :D)
Beta Was this translation helpful? Give feedback.
All reactions