avalanche icon indicating copy to clipboard operation
avalanche copied to clipboard

[tool] Grammar weight calculator

Open tysmith opened this issue 9 years ago • 0 comments

Grammar files can get big and complicated and it can be hard to understand weight values once they are nested in other choices and/or when then have multiple entries that have a large variance in weight. Importing library grammars and also add to complexity.

This tool is meant to help the grammar author understand the output of the grammar. The weight calculator would be used to help calculate the weight of symbols in different contexts to allow the creator to sanity check and tweak the values.

Example features could include:

  • average number of iterations to cover all symbols
  • average number of iterations to cover symbol from context of another
  • calculate the weight of a certain symbol from the context of another
  • what is does the average/most common symbol selection look like

tysmith avatar Jul 19 '16 21:07 tysmith