Library for the Sequence Memoizer and related models