GithubHelp home page GithubHelp logo

neubig / ckylark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from odashi/ckylark

0.0 3.0 0.0 86.57 MB

A latent-annotated probabilistic context-free grammar (LAPCFG) parser.

License: GNU Lesser General Public License v3.0

Python 0.41% C++ 99.59%

ckylark's Introduction

Ckylark

Ckylark - A latent-annotated probabilistic context-free grammar (LAPCFG) parser.

About

This software generates the phrase structure of given input sentence using latent annotated probabilistic context-free grammar (LAPCFG) model proposed by [Petrov et al., 2006] [Petrov & Klein, 2007a] [Petrov & Klein, 2007b].

Since original LAPCFG Parser sometimes makes failed parses in parse-time, Ckylark avoids this problem using below approaches:

  • Using probabilities of unknown words for parse-time smoothing.
  • Rollbacking coarse grammar if parsing failed.

Ckylark is a portmanteau of both "CKY" and "skylark."

Install

You need following tools to build Ckylark.

  • GCC 4.7 or later
  • Boost 1.49 or later
  • autotools

You simply run below:

cd /path/to/Ckylark
autoreconf -i
./configure
make
(sudo) make install

Usage

For simply use, you can type below command to parse your sentences:

src/bin/ckylark --model (model prefix) < (your word-segmented corpus)

--model requires the prefix of model file like model/wsj in this repository. (model/wsj is English model. if you need to parse Japanese sentences, use model/jdc instead)

For example,

$ echo "This is a pen ." | ckylark --model wsj
( (S (NP (DT This)) (VP (VBZ is) (NP (DT a) (NN pen))) (. .)) )

Ckylark uses the text dump files of original Berkeley Parser models.

You can also use your original models made by GrammarTrainer and WriteGrammarToTextFiles of Berkeley Parser.

And you can also use the pre-trained models listed below:

Ckylark Models (site language; Japanese)

If you want to see all options, please type below:

src/bin/ckylark --help

Contributors

  • Yusuke Oda (@odashi) - Most coding
  • Koichi Akabe (@vbkaisetsu)
  • Graham Neubig (@neubig)

We are counting more contributions from you.

Official Site

Ckylark | Yusuke Oda

Contact

If you find an issue, please contact Y.Oda

  • yus.takara (at) gmail.com
  • @odashi_t on Twitter

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.