Closed uriva closed 4 years ago
Any ideas on how that API will look?
The parse
object in https://github.com/lark-parser/lark/blob/master/lark/parsers/cyk.py#L135 has a property weight
, which can be set on the Tree
type if we add an attribute of weight to it.
Looks like a simple patch.
https://github.com/lark-parser/lark/blob/master/lark/parsers/cyk.py#L149 already sets rule
, someone just needs to add weight
as well.
Removed for lack of public interest. Reopen this is still needed.
CYK doesn't currently expose the best parse's weight - would be good to have it via tha API.