Giter Site home page Giter Site logo

dchandekstark / xsugar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from papyri/xsugar

0.0 1.0 0.0 3.16 MB

XSugar code for EpiDoc<->Leiden+ transformation

Ruby 25.60% Shell 0.18% HTML 59.08% Java 14.61% CSS 0.13% Dockerfile 0.07% Haml 0.33%

xsugar's Introduction

Requirements

Usage

This project contains JRuby libraries and wrappers for XSugar as well as grammars for converting between EpiDoc XML and Leiden+ (a Leiden-style plaintext markup). There is also a pure-Java standalone XSugar transformation servlet in src/standalone.

To convert between the EpiDoc and Leiden+, the utility scripts xml2nonxml.rb and nonxml2xml.rb are provided.

To use them you can simply run:

./bin/xml2nonxml.rb < epidoc.xml > leiden.txt

or ./bin/nonxml2xml.rb < leiden.txt > epidoc.xml

File Structure

bin/                     command-line scripts
    blackboard_agent.rb  blackboard XSugar transformer agent (run many)
    blackboard_server.rb blackboard XSugar transformer server (run one)
    coverage.sh          IDP2 grammar coverage script
    xml2nonxml.rb        command-line xml->non-xml RXSugar utility
    nonxml2xml.rb        command-line non-xml->xml RXSugar utility
epidoc.xsg               Leiden+ XSugar grammar
init.rb                  Rails plugin init script
lib/                     source code
    coverage/            classes for testing XSugar coverage
    standalone/          classes for warming up standalone server
    jruby_helper.rb      helper classes for invoking RXSugar from JRuby
    modules_jruby.rb     Java->Ruby module conversion for JRuby
    modules_rjb.rb       Java->Ruby module conversion for RJB
    rxsugar.rb           main Ruby XSugar wrapper class
    rxsugar_helper.rb    helper classes for using Ruby XSugar wrapper
    util_helper.rb       helper classes for command-line scripts
    xsugar-all.jar       compiled upstream XSugar JAR
src/                     Java source code
    standalone/          source code for standalone transformation server
    xsugar/              upstream XSugar source code
test/                    source code for unit testing
translation_epidoc.xsg   XSugar grammar for EpiDoc translations

Testing

The Ruby testing uses bundler for gem dependencies, so you should invoke rake with:

bundle exec rake

Upstream

The Java XSugar source is tracked in xsugar-vendor. Customizations for this project are in xsugar-customizations, merged into master. To e.g. update to a new upstream version of XSugar, you would unpack it to src/xsugar on the xsugar-vendor branch and commit the changes. Then you would rebase the changes in xsugar-customizations onto the new xsugar-vendor. Then merge xsugar-customizations into master and rebuild lib/xsugar-all.jar (using the rake task java:xsugar:build) and commit. Do not make changes/customizations to the Java XSugar source on master, make them on xsugar-customizations so that the merge upstream/rebase/merge workflow is more straightforward.

xsugar's People

Contributors

ryanfb avatar paregorios avatar hcayless avatar

Watchers

James Cloos avatar

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.