Code Monkey home page Code Monkey logo

bootstrap's Introduction

Apertium Bootstrap

Bootstrap Apertium language modules and pairs using apertium-init.py.

Usage

First, download the script. Usage depends on the desired module and is described below. Remember to search for TODO in the generated module to add example sentences, etc.

Monolingual Lttoolbox module

To bootstrap a monolingual language module apertium-foo using the lttoolbox formalism,

python3 apertium-init.py foo

To bootstrap and compile it at the same time,

python3 apertium-init.py foo && ( cd apertium-foo/ && ./autogen.sh && make )

Monlingual HFST module

To bootstrap a monolingual language module apertium-foo using the HFST formalism,

python3 apertium-init.py foo --analyser=hfst

To bootstrap and compile it at the same time,

python3 apertium-init.py foo --analyser=hfst && ( cd apertium-foo/ && ./autogen.sh && make )

Bilingual Lttoolbox module

To bootstrap a bilingual language module apertium-foo-bar where the monolingual packages apertium-foo and apertium-bar both use the lttoolbox formalism,

python3 apertium-init.py foo-bar

To bootstrap and compile it at the same time,

python3 apertium-init.py foo-bar && ( cd apertium-foo-bar/ && ./autogen.sh && make test)

Bilingual HFST/Lttoolbox module

To bootstrap a bilingual language module apertium-foo-bar where the monolingual packages apertium-foo and apertium-bar use the HFST formalism and/or the lttoolbox formalism,

python3 apertium-init.py foo-bar --analysers=hfst # Both foo and bar use HFST
python3 apertium-init.py foo-bar --analyser1=hfst # Only foo (first language) uses HFST
python3 apertium-init.py foo-bar --analyser2=hfst # Only bar (second language) uses HFST

To bootstrap and compile it at the same time,

python3 apertium-init.py foo-bar --analysers=hfst && ( cd apertium-foo-bar/ && ./autogen.sh && make test) # Both foo and bar use HFST
python3 apertium-init.py foo-bar --analyser1=hfst && ( cd apertium-foo-bar/ && ./autogen.sh && make test) # Only foo (first language) uses HFST
python3 apertium-init.py foo-bar --analyser2=hfst && ( cd apertium-foo-bar/ && ./autogen.sh && make test) # Only bar (second language) uses HFST

Development

After updating vanilla files, run ./updateBootstraper.py to update the relevant encoded files in apertium-init.py. Or, run make in the root of the repository to update all the encoded files.

You can also do sudo make install to install to /usr/local/bin/apertium-init or e.g. PREFIX=$HOME/local make install to install to $HOME/local/bin/apertium-init.

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.