samyadaleh / cl-toolbox Goto Github PK
View Code? Open in Web Editor NEWA Parsing-as-Deduction system that parses with different parsing algorithms and some related tools for educational purposes.
A Parsing-as-Deduction system that parses with different parsing algorithms and some related tools for educational purposes.
Also make sure that they don't set their name outside the constructor anymore.
Either run until it returns 0 consequences or try it out with all combinations of existing items.
It should be a simple extention of CYK for CNF.
Maybe just convert a grammar to C2F in this stage if general CYK parsing is not available yet.
At first for CNF. :)
If the grammar is not in CNF, convert it to CNF and drop the user a note.
Also add check containsEpsilonProductions().
I don't want to live without it anymore. I miss it so much. <3
So people don't have to type it in all the time.
This should display special characters correctly.
For instance if you parse a TAG that is not binarized with CYK it will just fail, even if the word is in the grammar.
Add terminals/leaves separately, in bracket format allow pointers to the leaves.
Tree parser should be able to handle both formats.
Tag/ grammar parser needs check. No crossing edges allowed for Tag. (Or let's try once and see what happens. :))
How do you want to create a leaf with empty string if the tokenizer ignores spaces? lol
Also add check isOrdered().
Store the pointers of antecedence items.
One item may can be derived in different ways. Instead of collecting sets of pointers, collect sets or lists of sets of pointers (or lists of lists, whatever).
The challenge is how to get all combinations of picking up to n items.
My idea is that: Get all numbers from 0 to 2^chartlength. From their binary representation take all with cross sum = n. Map them to the chart, 1 means the item is picked, 0 it's not. Pass the picked items to the deduction rule as always.
The next challenge is how to correctly generate consequences from them. My idea is to pass a deduction rule to the dynamic rule. And the number of antecedences has to be the number of rhs symbols. Hence n. Order the items by indices and then check if their order matches the rhs and also check if the indices match.
It is so slow it is not even useable with a toy grammar.
Because why not?
At the moment they might be RCG as well. Maybe rename the class and check for sRCG properties before parsing or converting.
It would be so cool if the text hovered over would be highlighted. It would be even cooler if parts of the items that belong together are highlighted with the same color when hovering over it.
I imagine the tree displayed in a new window that is only shown on hovering.
Maybe also display the underlying definition of the rule that was applied.
Maybe create a cursor that moves down through the whole chart, so the user gets the impression of an animated parsing process. And it takes my job of explaining. :)
Implementing the Unger parsing may help to get this right, too.
and check ifBinarized()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.