GithubHelp home page GithubHelp logo

cl-kn's Introduction

CL-KN

A Common Lisp implementation of trigram Kneser-Ney language Model Smoothing Algorithm. This software gains the features below:

  1. Fast. It's optimized for fast use.
  2. Robust. The probability is scaled into -log10 so it won't ZERO your sentence probabilities.
  3. Easy to use. Just train the n-gram model and prob.

Usage

Dependency:

  1. Let-Over-Lambda.
  2. Excalibur (My personal Lib.)
(defparameter kernel (kn-smooth)) ;;generate kernel.
(kn-smooth-establish kernel *training-data*) ;;where *training-data* is a list of strings (word segments).
(defparameter prob (kn-smooth-generate-prober kernel)) ;;generate prober
(funcall prob '("" "十分" "高兴")) ;;prob the trigram.

About

This software is dedicated to my girlfriend, Li. I love her so much. License: MIT. Use this wherever you want. :) Hacks and glory awaits! Tianrui Niu

cl-kn's People

Contributors

niwtr avatar

Watchers

 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.