Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grammar rules should be unique #58

Open
v-jkegler opened this issue Nov 21, 2024 · 1 comment
Open

Grammar rules should be unique #58

v-jkegler opened this issue Nov 21, 2024 · 1 comment

Comments

@v-jkegler
Copy link
Contributor

Currently there is no mechanism in llguidance for determining a grammar rule (aka node) is unique. This

  1. makes the algorithm for counted sequences sub-optimal, and may prevent it from reducing the number of rules to O(n) in the length of the sequence;
  2. makes our definition of grammar unnecessarily inconsistent with the usual one on the world of parsing theory, which
  3. is likely, as we add parsing features, to cause other gotchas.
@mmoskal
Copy link
Member

mmoskal commented Nov 22, 2024

This can be done in GrammarBuilder; I guess we should also try to do it in Grammar::optimize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants