Coder Social home page Coder Social logo

alto-to-tei-tools's Introduction

ALTO to TEI tools

This project contains tools for transforming ALTO into TEI P5 for import to the text service. It was developed within the Trykkefrihedens Skrifter.

Prerequisites

Requires saxon (xslt 3 processor), xmllint, perl and bash. For instance:

 sudo apt install libsaxon-java

You have to have ALTO data available in order to use these tools.

Some scripts will need to know how to run saxon. They read the SAXON_PATH enironmental variable.

 export SAXON_PATH=/usr/share/java/saxon.jar

Running

1. copy ALTO files into the data area of this project

If you by any chance have old stuff in your directory, make sure it is really clean.

clean_really_clean.sh

The get all the alto files into the ./data directories.

./import_alto.pl  | /bin/bash

This is basic data maintained elsewhere, and should not be under version control here. You may, if you think it's useful, validate the files. E.g.,

find data -name '*.xml' -exec xmllint --noout --schema alto-3-1.xsd {} \; > validation.text  2>&1 

2. create lists of ALTO files related to each publication in the collection

 collect_alto

3. transform all the ALTO into TEI

Here java need to know the complete path to you saxon jar file. For instance

 export SAXON_PATH=/usr/share/java/saxon.jar

Then make the TEI files

 run_build

You may, if you think it's useful, validate the files. E.g.,

find tei_dir/ -name '*xml' -exec xmllint --noout --relaxng ./tei_all.rng {} \;  > tei_validation.text  2>&1 

Again, these files should not (it is derived data) be under version control in this project.

4. store into database and index

The code for this is in solr-and-snippets

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.