GithubHelp home page GithubHelp logo

luzc08 / lapdftextserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bmkeg/lapdftextserver

0.0 2.0 0.0 294 KB

A web application resource (*.war) file for the digital library client.

JavaScript 79.76% CSS 0.92% HTML 13.66% Java 5.66%

lapdftextserver's Introduction

lapdftextServer

A web application resource (*.war) file for a simple client to show the block classification for a given LAPDFText rule file.

Simple Screenshot

For GitHub users, we advocate the use of Maven to build and run the system from the command line. This runs somewhat slowly but will execute out-of-the-box.

Building the system

The system should build using the following maven command. Not only does this build the *.war file, but it also copies files pertaining to the 'View-Primitive Data Model framework' (VPMDf) that the system needs to construct the underlying database.

  1. Make sure you have both the bmkeg-parent and the lapdftextServer repositories as sibling directories in your workspace.
  2. run mvn clean package. This will perform all build functions, including retreiving all dependencies.

Running system commands

This web application uses the VPMDf which uses an underlying MySQL database. The first step of running the system is to (A) build the database and (B) populate it with PDF files.

Building the database

mvn exec:java -Dexec.mainClass="edu.isi.bmkeg.lapdf.bin.BuildFtdDatabase" 
        -Dexec.args="<db_name> <mysql_login> <mysql_password>"        

Adding Rule Files

Note that you can only refer to the rule file by name in subsequent commands, so the rules files have to be uploaded first for the command line functions to work.

mvn exec:java -Dexec.mainClass="edu.isi.bmkeg.lapdf.bin.AddFTDRuleSet" 
        -Dexec.args="<path-to-rule-file> <dbName> <login> <password>"        

Adding PDF Files

Here is where you can iterate over large numbers of PDF files and upload them into the system.

mvn exec:java -Dexec.mainClass="edu.isi.bmkeg.lapdf.bin.AddFTD" 
        -Dexec.args="<path-to-pdf-file/dir> <dbName> <login> <password> [<rule-file-name>]"        

Run Rules on Files

Here is where you can rerun rules over the PDF files in the database already.

mvn exec:java -Dexec.mainClass="edu.isi.bmkeg.lapdf.bin.RunRuleSetOnFTD" 
        -Dexec.args="<pdf-file-name> <rule-file-name> <dbName> <login> <password>"        

Running the web-app

First use Jetty to start the server

mvn jetty:run-war

Navigate in a browser to: http://localhost:8080/lapdftextServer

Caveats

  • The system is based on AMF-messaging to a Java-based server which talks to an underlying MySQL database and so is a little slow in the upload / rule-file execution / download process.
  • The system runs out of the box using the maven commands as shown but is still a research prototype.

lapdftextserver's People

Watchers

James Cloos avatar Zhicong Lu 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.