-
Notifications
You must be signed in to change notification settings - Fork 4
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
Question about parse forest support #4
Comments
Hi Randy, Shame on me for answering to your questions so late. Just spotted them a couple minutes ago... First, thanks for showing your interest in Rley... You're right there is very limited documentation about the use of SPPFs (Shared Packed Parse Forest) with Rley. Here are a few (poor?) reasons for that situation:
I have serious doubts for approach 1 because it is not difficult to find ambiguous grammars where the number of interpretations explodes literally. You can see an example in the section |
Hey, thanks for the response! I will have to do some more research on SPPFs and thank you for sharing the ntlk.org as a resource. To solve my problem it seems that it is easier to find the best possible parse tree in a parse forest rather than exhausting all the possible trees, (approach 2). I will definitely read into PCFG's! Thanks a lot! I haven't said much but you definitely help point me in the right direction. |
Hi Randy, |
Hello Randy, Was busy for a couple of months with another project about Simple Regex Language. It may look as a diversion but in fact, the Rley greatly benefited from being used in a situations that went well over the "toy" examples. A number of fixes and improvements were brought to Rley.
|
Hey there! @famished-tiger |
Hey there, I really like this project, and it seems very challenging to implement, but rewarding once it works on a well written grammar. Good job on this and it's really good. I've started doing research into NLPs and remembered something that I've learned in college which is the earley parser :)
I have a few questions regarding parse forest traversal and how we can output multiple parse trees.
Is it fully supported to be able to parse ambiguous grammars and output multiple parse trees based on the grammar? A few months back I've tried using the parse forest for an ambiguous grammar. However I ran into a few issues with using the parse forest visitor to display multiple parse trees. Do we have any good tips on how to accomplish that task? ^_^
I'm not sure if it's truly implemented or I have not yet stumbled into the how-to of parse forest traversal. I've checked the specs in the code base, it seems covered but I still ran into a problem of a stack trace. That is Ok tho, I have created a different solution, currently in progress but it can work:
before i start..
definition:
path -- array of nodes (n1,n2,n3, ...) where n1 is connected to n2
paths -- array of path
Shying away from the subscriber/publisher architecture of traversing the parse forest. I tried traversing it with DFS, creating an array of many paths, and cloning the path per every ALT node :or refinement and then forking the traversal and re-continue traversal, that sort of gave me a starting point that is slow in performance but it can give me results. Then I realized that multiple non terminal S nodes with refinement :or can also provide multiple parse trees.
Doing it this way was ok, however, it presented a few issues for me :(
I truly apologize if this is confusing to you but I just want to ask if we have already a fully working way of converting a parse forest to an array of parse trees (Rley::Ptree:ParseTree)
The text was updated successfully, but these errors were encountered: