Giter Site home page Giter Site logo

samyadaleh / cl-toolbox Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 4.0 9.12 MB

A Parsing-as-Deduction system that parses with different parsing algorithms and some related tools for educational purposes.

Java 99.94% Batchfile 0.05% Shell 0.01%
cfg computational-linguistics context-free-grammar cyk-parser deduction-system deductions earley earley-algorithm earley-parser education educational-software java parsing shiftreduce teaching teaching-tool topdown tree tree-adjoining-grammar unger-parser

cl-toolbox's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cl-toolbox's Issues

Add CYK parsing for C2F

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.

Add CFG CYK Parsing

At first for CNF. :)
If the grammar is not in CNF, convert it to CNF and drop the user a note.

Display Trees

  • from bracket format or from Tree-class (I can convert them into each other) or from deduction items - from Tree class is best
  • with dot: top, bottom, la, ra, lb, rb
  • with crossing edges (maybe needs other format for that or pointers to words in sentence, see how TiGer does that)
  • with indices at the or between the terminals to display items

Marry JUnit

I don't want to live without it anymore. I miss it so much. <3

Update Tree class to represent crossing edges

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. :))

Extend recognizers to real parsers

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).

Add CFG Unger Parsing

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.

Add check for sRCG

At the moment they might be RCG as well. Maybe rename the class and check for sRCG properties before parsing or converting.

In GUI when hovering over item display it as tree

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. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.