Giter VIP home page Giter VIP logo

log-bilinear-language-models's Introduction

Log-bilinear-language-models

lbl: the original version
hlbl: a hierachical version with huffman tree
lbl_mp: lbl with multiprocessing and cythonised training
setup: used to compile the extension module

Installation

  1. Clone the repository
git clone https://github.com/aanodin/Log-bilinear-language-models
  1. Install Python 2.7 and dependencies
sudo aptitude install libatlas-base-dev gfortran python python-dev build-essential g++
  1. Install Python modules
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1
sudo pip install numpy
sudo pip install scipy
sudo pip install cython
sudo pip install argparse
sudo swapoff /var/swap.1
sudo rm /var/swap.1
  1. Installing the tool from repository
cd Log-bilinear-language-models
python setup.py install

Usage

  1. Train the model:
python main.py --train input.txt --save-net network.hdf5
  1. Evaluate other (or the same :)) file:
python main.py --ppl input.txt --net network.hdf5
  1. Evaluate using ARPA language model:
python main.py --ppl input.txt --net network.hdf5 --arpa ClarinLM.lm.1 0.2
  1. Evaluate using ARPA language model and save new model:
python main.py --ppl input.txt --net network.hdf5 --arpa ClarinLM.lm.1 0.2 --save-lm newClarinLM.lm.1

log-bilinear-language-models's People

Contributors

wenjieguan avatar aanodin avatar

Stargazers

Marcin Bielak avatar Anubhav avatar  avatar  avatar

Watchers

James Cloos avatar Krzysztof Wołk 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.