Credits - Observable Markov models

by Will Paul Project | Docs

License Simplified BSD

Copyright (c) 2015, Will Paul
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Content

Most of what I know about Markov processes is from Jurafsky and Martin's NLP textbook:

Daniel Jurafsky and James H. Martin. 2000. Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition (1st ed.). Prentice Hall PTR, Upper Saddle River, NJ, USA.

Libraries

Borrowed code/ideas

The Point object is modeled after Processing's PVector and Paper's Point.

The arrows at the tips of the quadratic curves used this guy on Stackoverflow's math.

Animating on Bezier curves (quadratic and cubic) uses De Casteljau's algorithm, as proposed by this guy on Stackoverflow. Also Pomax's interactive Bezier intro was very useful at helping me just wrap my mind around how Beziers work.

The efficiently delete all children of a given DOM node code I borrowed from Stackoverflow

This code lets you have variable length argument lists:


      vals = 1 <= arguments.length ? slice.call(arguments, 0) : [];

      // Somewhere later...
      app.some_function.apply(some_scope, vals);
      

Using `void 0` instead of `undefined` is a safer since it is a statement (that always returns undefined) and thus cannot be overwritten (undefined can). Discussion here

Scope management for your IFFEs:


      // IFFE with:
      (function() {}).call(this)
      // Instead of
      (function() {})()