Giter VIP home page Giter VIP logo

chartygui's People

Contributors

josuakrause avatar leowoerteler avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

josuakrause

chartygui's Issues

Documentation

A README file (preferably MarkDown) should suffice.

Grammar Validation

While ambiguous grammars are unavoidable in natural language parsing, non-terminating ones are unacceptable. The parser should detect and warn about all recursive loops that consume no input, like this one:

A -> B C
B -> A

Distinguish Terminals and Non-Terminals

Terminals in the grammar (like N -> cat) should be easily distinguishable from non-terminals like VP -> V NP. This could be achieved by enclosing literal strings in double-quotes: N -> "cat".

"New file" action

Creating an empty grammar with a "New File" action in the menu.
Maybe defaulting to load the example grammar as unspecified file.

Better CFG Syntax

The syntax for specifying the context-free grammar isn't very expressive, some enhancements would be:

  • allow grouping, optional parts (?) repetition (* and +) in right-hand sides (RHS) of rules:

    A -> (B C?)+ D*

  • more than one RHS, separated by e.g. |:

    Lit -> NumLit
         | StrLit
    

Displaying large images causes exception

Parsing a large sentence like Mary killed the man with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie with the tie causes following exception:

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
    at java.awt.image.Raster.createPackedRaster(Raster.java:458)
    at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
    at java.awt.image.BufferedImage.<init>(BufferedImage.java:324)
    at de.woerteler.tree.ImageDisplay.getImage(ImageDisplay.java:38)
    at de.woerteler.charty.ParseTree.getImage(ParseTree.java:42)
    at de.woerteler.gui.Controller.navigate(Controller.java:102)
    at de.woerteler.gui.ParseTreeViewer$3.actionPerformed(ParseTreeViewer.java:102)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6373)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6138)
    at java.awt.Container.processEvent(Container.java:2085)
    at java.awt.Component.dispatchEventImpl(Component.java:4735)
    at java.awt.Container.dispatchEventImpl(Container.java:2143)
    at java.awt.Component.dispatchEvent(Component.java:4565)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
    at java.awt.Container.dispatchEventImpl(Container.java:2129)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4565)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
    at java.awt.EventQueue.access$000(EventQueue.java:85)
    at java.awt.EventQueue$1.run(EventQueue.java:638)
    at java.awt.EventQueue$1.run(EventQueue.java:636)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

And a picture:
Image of the application

Custom display types

Allow the use of custom display types. Realized with the help of the ini file introduced in #11.
A display type field where the class name of the display type can be set and the specified class is
constructed at start up (default constructor). This allows to use own display types (must be included in
the class path though).

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.