Giter Site home page Giter Site logo

kpu / dalm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nowlab/dalm

0.0 4.0 0.0 290 KB

An Efficient Language Model Using Double-Array Structures

Home Page: http://www.jnory.com/research/dalm

License: Other

Makefile 0.44% C++ 91.99% Shell 1.96% Ruby 3.56% Python 2.04%

dalm's Introduction

DALM

http://www.jnory.com/research/dalm

This is an implementation of the double-array language model (DALM). This method is described on:

Makoto Yasuhara, Toru Tanaka, Jun-ya Norimatsu, Mikio Yamamoto. 2013. An Efficient Language Model Using Double-Array Structures. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing.

Build Instruction

To build DALM, use waf build system. Run the command:

./waf configure build install --prefix=[install dir]

Usage

Building a DALM model

To build a DALM model, run:

[install dir]/scripts/build_dalm.sh [ARPA File] [Division Number] [Output Directory]

If you need to build a large language model (for example, over 30GB in ARPA Format), we recommend to set the division number "8" or "16" (or larger!).

You may need Ruby 2.0 to run the script. This script generates following files into [Output Directory]:

  • dalm.ini : information of the model.
  • dalm.bin : binary dumps of a double-array trie.
  • words.bin : binary dumps of vocabulary data.
  • words.txt : a set of words of the model.

Building a DALM model in parallel

By default, build_dalm.sh uses all cores in your CPU. If you want to reserve some computing resources, you may create /tmp/cpu_reserved file and write the number of cores you want to reserve. If you have 4 cores and you want to use only 3, you may write only '1' in /tmp/cpu_resered file.

Using DALM on your system

We include a sample program to use DALM on your system. Please see sample/query_sample.cpp. On the build time, you may link the libraries which are stored in the [install dir]/lib directory.

External Libraries

We use following libraries:

To build the source code, we use waf build system version 1.7.13. We include them into our code. Here is an original download site of waf.

License

The source code is provided under LGPL v3.

dalm's People

Contributors

hieuhoang avatar jnory avatar kpu avatar

Watchers

 avatar  avatar  avatar  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.