Giter Club home page Giter Club logo

delphin-viz's People

Contributors

fcbond avatar goodmami avatar ned2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

delphin-viz's Issues

PNG and SVG saving is broken for DMRS visualizations

The DMRS visualisations use CSS to style the SVG which are not saved when downloaded, so the resultant image is essentially garbage.

One option is to use this approach: https://spin.atomicobject.com/2014/01/21/convert-svg-to-png/

Some comments on this option from @goodmami via email exchange:

The approach you linked appears to traverse the CSS defined on a page and embed used rules in an internal <style> element. The method from SVGCrowbar2 (the meat of which is here: https://github.com/NYTimes/svg-crowbar/blob/gh-pages/svg-crowbar-2.js#L211-L250, specifically the explicitlySetStyle() function) finds computed styles on each element and embeds those on the style attribute on the elements. The one you linked seems good for simple cases or if we might want a dynamic SVG (e.g. with javascript event handling; see here: https://www.w3.org/TR/SVG/script.html). The SVGCrowbar2 approach is good if you want a static SVG with the styles as-currently-displayed; that is, it's better if we've manually changed certain styles, such as overriding the CSS with "style" attributes on elements after the page loads.

I think the approach you found is good for our purposes.

Request/Deliver LaTeX output

The REST servers have a latex value for some formats (e.g. mrs=latex, eds=latex, and dmrs=latex, although support varies among the LKB and Bottlenose servers). Can this LaTeX code be requested by the user and displayed somehow? It would probably require a second request from the server for the same input string. The LaTeX code could be displayed in a tooltip (via a button like we have for "PNG" and "SVG"), or open a new tab with the TeX code as the page contents.

TypeError: grammar is undefined

I think the recent change to disable the Melbourne servers has broken things. Maybe the UM grammars need to be commented from the GRAMMARS list in demo/resources.js, as well.

PNG and SVG saving clips MRS and DMRS structures

Both MRS and DMRS visualizations get clipped when saved to SVG or PNG. More specifically, DMRS only gets clipped with PNG, and the SVG for MRS isn't really clipped, but there is 0 margin to the right of the large square opening bracket (unlike the opening bracket on the left).

See #2; the example there is relevant for reproducing these issues.

mrsData.variables[varName] is undefined

The following error occurs when parsing "Adi tahu bahwa hujan sudah turun." with INDRA:

mrsData.variables[varName] is undefined

This appears to be because every EP has an argument CARDIN bool, which seems to be a bug in the grammar (at least, the MRS is ill-formed), and bool is not a valid variable name.

The problem is that this error causes the DMRS to fail to be displayed, although it does display if the MRS box is unchecked (it appears to just ignore the rogue roles). The MRS layout function could be a bit more robust for bad inputs like this.

Highlight when hovering variable on mrs.js doesn't have memory

I am implementing a web page that is built upon mrs.js for reimplementing the WSI interface (https://github.com/own-pt/wql/tree/demo/flask-demo).
I need to highlight the matches that are relative to the pattern that matched and I still want to keep the highlighting of all variables of same name when hovering the variable name. The problem is that the code of the event mouseleave is harcoded to put every variable highlighted to black, overwriting my highlight of the matches. I can create a new event listener to solve this problem, but wouldn't it the be better if the code natively had this support to place the old color instead of always putting the same color?

http content is being blocked by the browser

The demo site is served via https, but the web API requests to parsing servers use http. Modern browsers may block these "mixed content" requests, leading to opaque error messages. The solution is to (a) change the backend server to use https, and (b) switch the URLs here in resources.js.

demo-error

This was reported in delph-in/docs#41.

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.