real: remove HMMS
authorMichal Terepeta <michal.terepeta@gmail.com>
Tue, 14 Feb 2017 22:02:17 +0000 (17:02 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 14 Feb 2017 22:02:58 +0000 (17:02 -0500)
Summary:
It doesn't compile and I didn't see any easy way to fix it (I got
stuck at `import Native`, which, according to a comment, comes from
`hbc`). According to another comment,  there were other problems with
the test even when it did compile:
  "HMMS test only works on SPARC machines"

In any case, this has been broken for a while so I don't think anyone
will miss it.

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: run nofib

Reviewers: erikd, bgamari

Reviewed By: bgamari

Differential Revision: https://phabricator.haskell.org/D3088

202 files changed:
real/HMMS/Alignments.lhs [deleted file]
real/HMMS/BalBinSTrees.lhs [deleted file]
real/HMMS/BatchAlign.lhs [deleted file]
real/HMMS/BatchTranscribe.lhs [deleted file]
real/HMMS/COPYRIGHT [deleted file]
real/HMMS/ComputeNewDgs.lhs [deleted file]
real/HMMS/ConvertLinearDic.lhs [deleted file]
real/HMMS/CountAlignmentDiffs.lhs [deleted file]
real/HMMS/DumpPhoneList.lhs [deleted file]
real/HMMS/Extrema.lhs [deleted file]
real/HMMS/HMMS.stderr [deleted file]
real/HMMS/HmmConstants.lhs [deleted file]
real/HMMS/HmmDensities.lhs [deleted file]
real/HMMS/HmmDigraphs.lhs [deleted file]
real/HMMS/Jmakefile [deleted file]
real/HMMS/Lists.lhs [deleted file]
real/HMMS/Makefile [deleted file]
real/HMMS/MathTypes.lhs [deleted file]
real/HMMS/MaybeStateT.lhs [deleted file]
real/HMMS/NativeIO.lhs [deleted file]
real/HMMS/Phones.lhs [deleted file]
real/HMMS/PlainTextIO.lhs [deleted file]
real/HMMS/Pronunciations.lhs [deleted file]
real/HMMS/README [deleted file]
real/HMMS/README.nofib [deleted file]
real/HMMS/StateT.lhs [deleted file]
real/HMMS/Transcribe.lhs [deleted file]
real/HMMS/Viterbi.lhs [deleted file]
real/HMMS/app/test/README [deleted file]
real/HMMS/app/test/demo [deleted file]
real/HMMS/app/test/dictionary.0.dgs [deleted file]
real/HMMS/data/dmg_01 [deleted file]
real/HMMS/data/dmg_01.fea [deleted file]
real/HMMS/data/dmg_01.ppm [deleted file]
real/HMMS/data/dmg_01.txt [deleted file]
real/HMMS/data/dmg_02 [deleted file]
real/HMMS/data/dmg_02.fea [deleted file]
real/HMMS/data/dmg_02.ppm [deleted file]
real/HMMS/data/dmg_02.txt [deleted file]
real/HMMS/data/dmg_03 [deleted file]
real/HMMS/data/dmg_03.fea [deleted file]
real/HMMS/data/dmg_03.ppm [deleted file]
real/HMMS/data/dmg_03.txt [deleted file]
real/HMMS/data/dmg_04 [deleted file]
real/HMMS/data/dmg_04.fea [deleted file]
real/HMMS/data/dmg_04.ppm [deleted file]
real/HMMS/data/dmg_04.txt [deleted file]
real/HMMS/data/dmg_05 [deleted file]
real/HMMS/data/dmg_05.fea [deleted file]
real/HMMS/data/dmg_05.ppm [deleted file]
real/HMMS/data/dmg_05.txt [deleted file]
real/HMMS/data/dmg_06 [deleted file]
real/HMMS/data/dmg_06.fea [deleted file]
real/HMMS/data/dmg_06.ppm [deleted file]
real/HMMS/data/dmg_06.txt [deleted file]
real/HMMS/dictionary.0 [deleted file]
real/HMMS/dictionary.0.dgs [deleted file]
real/HMMS/hmms-data/h9.dgs [deleted file]
real/HMMS/hmms-data/h9.ties [deleted file]
real/HMMS/hmms-data/h9/AA.1.gm [deleted file]
real/HMMS/hmms-data/h9/AA.2.gm [deleted file]
real/HMMS/hmms-data/h9/AA.3.gm [deleted file]
real/HMMS/hmms-data/h9/AE.1.gm [deleted file]
real/HMMS/hmms-data/h9/AE.2.gm [deleted file]
real/HMMS/hmms-data/h9/AE.3.gm [deleted file]
real/HMMS/hmms-data/h9/AH.1.gm [deleted file]
real/HMMS/hmms-data/h9/AH.2.gm [deleted file]
real/HMMS/hmms-data/h9/AH.3.gm [deleted file]
real/HMMS/hmms-data/h9/AO.1.gm [deleted file]
real/HMMS/hmms-data/h9/AO.2.gm [deleted file]
real/HMMS/hmms-data/h9/AO.3.gm [deleted file]
real/HMMS/hmms-data/h9/AW.1.gm [deleted file]
real/HMMS/hmms-data/h9/AW.2.gm [deleted file]
real/HMMS/hmms-data/h9/AW.3.gm [deleted file]
real/HMMS/hmms-data/h9/AX.1.gm [deleted file]
real/HMMS/hmms-data/h9/AX.2.gm [deleted file]
real/HMMS/hmms-data/h9/AX.3.gm [deleted file]
real/HMMS/hmms-data/h9/AXR.1.gm [deleted file]
real/HMMS/hmms-data/h9/AXR.2.gm [deleted file]
real/HMMS/hmms-data/h9/AXR.3.gm [deleted file]
real/HMMS/hmms-data/h9/AY.1.gm [deleted file]
real/HMMS/hmms-data/h9/AY.2.gm [deleted file]
real/HMMS/hmms-data/h9/AY.3.gm [deleted file]
real/HMMS/hmms-data/h9/B.1.gm [deleted file]
real/HMMS/hmms-data/h9/B.2.gm [deleted file]
real/HMMS/hmms-data/h9/B.3.gm [deleted file]
real/HMMS/hmms-data/h9/CH.1.gm [deleted file]
real/HMMS/hmms-data/h9/CH.2.gm [deleted file]
real/HMMS/hmms-data/h9/CH.3.gm [deleted file]
real/HMMS/hmms-data/h9/D.1.gm [deleted file]
real/HMMS/hmms-data/h9/D.2.gm [deleted file]
real/HMMS/hmms-data/h9/D.3.gm [deleted file]
real/HMMS/hmms-data/h9/DH.1.gm [deleted file]
real/HMMS/hmms-data/h9/DH.2.gm [deleted file]
real/HMMS/hmms-data/h9/DH.3.gm [deleted file]
real/HMMS/hmms-data/h9/DX.1.gm [deleted file]
real/HMMS/hmms-data/h9/DX.2.gm [deleted file]
real/HMMS/hmms-data/h9/DX.3.gm [deleted file]
real/HMMS/hmms-data/h9/EH.1.gm [deleted file]
real/HMMS/hmms-data/h9/EH.2.gm [deleted file]
real/HMMS/hmms-data/h9/EH.3.gm [deleted file]
real/HMMS/hmms-data/h9/EL.1.gm [deleted file]
real/HMMS/hmms-data/h9/EL.2.gm [deleted file]
real/HMMS/hmms-data/h9/EL.3.gm [deleted file]
real/HMMS/hmms-data/h9/EN.1.gm [deleted file]
real/HMMS/hmms-data/h9/EN.2.gm [deleted file]
real/HMMS/hmms-data/h9/EN.3.gm [deleted file]
real/HMMS/hmms-data/h9/ER.1.gm [deleted file]
real/HMMS/hmms-data/h9/ER.2.gm [deleted file]
real/HMMS/hmms-data/h9/ER.3.gm [deleted file]
real/HMMS/hmms-data/h9/EY.1.gm [deleted file]
real/HMMS/hmms-data/h9/EY.2.gm [deleted file]
real/HMMS/hmms-data/h9/EY.3.gm [deleted file]
real/HMMS/hmms-data/h9/F.1.gm [deleted file]
real/HMMS/hmms-data/h9/F.2.gm [deleted file]
real/HMMS/hmms-data/h9/F.3.gm [deleted file]
real/HMMS/hmms-data/h9/G.1.gm [deleted file]
real/HMMS/hmms-data/h9/G.2.gm [deleted file]
real/HMMS/hmms-data/h9/G.3.gm [deleted file]
real/HMMS/hmms-data/h9/HH.1.gm [deleted file]
real/HMMS/hmms-data/h9/HH.2.gm [deleted file]
real/HMMS/hmms-data/h9/HH.3.gm [deleted file]
real/HMMS/hmms-data/h9/IH.1.gm [deleted file]
real/HMMS/hmms-data/h9/IH.2.gm [deleted file]
real/HMMS/hmms-data/h9/IH.3.gm [deleted file]
real/HMMS/hmms-data/h9/IX.1.gm [deleted file]
real/HMMS/hmms-data/h9/IX.2.gm [deleted file]
real/HMMS/hmms-data/h9/IX.3.gm [deleted file]
real/HMMS/hmms-data/h9/IY.1.gm [deleted file]
real/HMMS/hmms-data/h9/IY.2.gm [deleted file]
real/HMMS/hmms-data/h9/IY.3.gm [deleted file]
real/HMMS/hmms-data/h9/JH.1.gm [deleted file]
real/HMMS/hmms-data/h9/JH.2.gm [deleted file]
real/HMMS/hmms-data/h9/JH.3.gm [deleted file]
real/HMMS/hmms-data/h9/K.1.gm [deleted file]
real/HMMS/hmms-data/h9/K.2.gm [deleted file]
real/HMMS/hmms-data/h9/K.3.gm [deleted file]
real/HMMS/hmms-data/h9/L.1.gm [deleted file]
real/HMMS/hmms-data/h9/L.2.gm [deleted file]
real/HMMS/hmms-data/h9/L.3.gm [deleted file]
real/HMMS/hmms-data/h9/M.1.gm [deleted file]
real/HMMS/hmms-data/h9/M.2.gm [deleted file]
real/HMMS/hmms-data/h9/M.3.gm [deleted file]
real/HMMS/hmms-data/h9/N.1.gm [deleted file]
real/HMMS/hmms-data/h9/N.2.gm [deleted file]
real/HMMS/hmms-data/h9/N.3.gm [deleted file]
real/HMMS/hmms-data/h9/NG.1.gm [deleted file]
real/HMMS/hmms-data/h9/NG.2.gm [deleted file]
real/HMMS/hmms-data/h9/NG.3.gm [deleted file]
real/HMMS/hmms-data/h9/OW.1.gm [deleted file]
real/HMMS/hmms-data/h9/OW.2.gm [deleted file]
real/HMMS/hmms-data/h9/OW.3.gm [deleted file]
real/HMMS/hmms-data/h9/OY.1.gm [deleted file]
real/HMMS/hmms-data/h9/OY.2.gm [deleted file]
real/HMMS/hmms-data/h9/OY.3.gm [deleted file]
real/HMMS/hmms-data/h9/P.1.gm [deleted file]
real/HMMS/hmms-data/h9/P.2.gm [deleted file]
real/HMMS/hmms-data/h9/P.3.gm [deleted file]
real/HMMS/hmms-data/h9/R.1.gm [deleted file]
real/HMMS/hmms-data/h9/R.2.gm [deleted file]
real/HMMS/hmms-data/h9/R.3.gm [deleted file]
real/HMMS/hmms-data/h9/S.1.gm [deleted file]
real/HMMS/hmms-data/h9/S.2.gm [deleted file]
real/HMMS/hmms-data/h9/S.3.gm [deleted file]
real/HMMS/hmms-data/h9/SH.1.gm [deleted file]
real/HMMS/hmms-data/h9/SH.2.gm [deleted file]
real/HMMS/hmms-data/h9/SH.3.gm [deleted file]
real/HMMS/hmms-data/h9/SIL.1.gm [deleted file]
real/HMMS/hmms-data/h9/SIL.2.gm [deleted file]
real/HMMS/hmms-data/h9/SIL.3.gm [deleted file]
real/HMMS/hmms-data/h9/T.1.gm [deleted file]
real/HMMS/hmms-data/h9/T.2.gm [deleted file]
real/HMMS/hmms-data/h9/T.3.gm [deleted file]
real/HMMS/hmms-data/h9/TH.1.gm [deleted file]
real/HMMS/hmms-data/h9/TH.2.gm [deleted file]
real/HMMS/hmms-data/h9/TH.3.gm [deleted file]
real/HMMS/hmms-data/h9/UH.1.gm [deleted file]
real/HMMS/hmms-data/h9/UH.2.gm [deleted file]
real/HMMS/hmms-data/h9/UH.3.gm [deleted file]
real/HMMS/hmms-data/h9/UW.1.gm [deleted file]
real/HMMS/hmms-data/h9/UW.2.gm [deleted file]
real/HMMS/hmms-data/h9/UW.3.gm [deleted file]
real/HMMS/hmms-data/h9/V.1.gm [deleted file]
real/HMMS/hmms-data/h9/V.2.gm [deleted file]
real/HMMS/hmms-data/h9/V.3.gm [deleted file]
real/HMMS/hmms-data/h9/W.1.gm [deleted file]
real/HMMS/hmms-data/h9/W.2.gm [deleted file]
real/HMMS/hmms-data/h9/W.3.gm [deleted file]
real/HMMS/hmms-data/h9/Y.1.gm [deleted file]
real/HMMS/hmms-data/h9/Y.2.gm [deleted file]
real/HMMS/hmms-data/h9/Y.3.gm [deleted file]
real/HMMS/hmms-data/h9/Z.1.gm [deleted file]
real/HMMS/hmms-data/h9/Z.2.gm [deleted file]
real/HMMS/hmms-data/h9/Z.3.gm [deleted file]
real/HMMS/hmms-data/h9/ZH.1.gm [deleted file]
real/HMMS/hmms-data/h9/ZH.2.gm [deleted file]
real/HMMS/hmms-data/h9/ZH.3.gm [deleted file]
real/HMMS/lib/haskell/GhcPrintf.hs [deleted file]
real/HMMS/lib/haskell/SignalIO.lhs [deleted file]
real/HMMS/sentences [deleted file]
real/HMMS/vocabulary [deleted file]
real/Makefile

diff --git a/real/HMMS/Alignments.lhs b/real/HMMS/Alignments.lhs
deleted file mode 100644 (file)
index 49ee979..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-
-        The purpose of executing the Viterbi algorithm is to get an
-{\em alignment\/} between the states of the HMM that models an
-utterance and the feature vectors generated by the signal processing
-module.  The programs that analyze alignment files in order to compute
-new HMM network models or compute statistics need to be able to read
-the alignment data.
-        \begin{haskell}{Alignments}
-
-> module Alignments(
->       FrameData, Alignment, readAlignment,
->       strip_off_frame_number
->       ) where
-
-> import MaybeStateT
-> import PlainTextIO
-
-> import Phones
-> import HmmDigraphs
-> import Data.Char(isSpace)--1.3
-
-\end{haskell}
-
-
-        Formally, an {\em alignment\/}\index{alignment} is a sequence
-of triples.  The first element is the feature vector number, the
-second element is the phonetic symbol (i.e., which HMM), and the third
-component is the HMM state.
-        \begin{haskell}{Alignment}
-
-> type FrameData = (Int, Phone, HmmState)
-> type Alignment = [FrameData]
-
-\end{haskell}
-
-
-        The function \verb~readAlignment~ reads alignment data from a
-file.  It is assumed that the file contains nothing but alignment
-data.
-        \begin{haskell}{readAlignment}
-
-> readAlignment :: [Char] -> Alignment
-> readAlignment cs =
->       let
->         cs' = dropWhile isSpace cs
->       in
->         case  readAlignmentFrame cs  of
->         Nothing        -> if null cs'
->                           then []
->                           else error "unparsable chars"
->         Just (f, cs'') -> f : readAlignment cs''             
-
-
-\end{haskell}
-
-
-        \begin{haskell}{readAlignmentFrame}
-
-> readAlignmentFrame :: MST [Char] FrameData
-> readAlignmentFrame = readsItem        `thenMST` \ i ->
->                      readsItem        `thenMST` \ p ->
->                      readsItem        `thenMST` \ s ->
->                      returnMST (i, p, s)
-
-\end{haskell}
-
-
-        \begin{haskell}{strip_off_frame_number}
-
-> strip_off_frame_number :: [(a,b,c)] -> [(b,c)]
-> strip_off_frame_number = map drop_frame_number
-
-> drop_frame_number :: (a,b,c) -> (b,c)
-> drop_frame_number (_,b,c) = (b,c)
-
-\end{haskell}
diff --git a/real/HMMS/BalBinSTrees.lhs b/real/HMMS/BalBinSTrees.lhs
deleted file mode 100644 (file)
index 385a578..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-
-        A balanced binary search tree is a data structure enabling
-efficient retrieval of data.  For training hidden Markov models on a
-large set of training utterances with a large vocabulary, it is
-necessary to provide efficient retrieval of word pronunciation models.
-This section describes a Haskell implementation of balanced binary
-search trees as described in~\cite{BirdWadl88} that is sufficient for
-our needs (i.e., we don't implement all of the functions normally
-associated with the abstract type).
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{The Balanced Binary Search Tree Datatype}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        While the data type and functions are basically those of Bird
-\& Wadler~\cite[Chapter 9]{BirdWadl88}, we have extended their search
-tree structure by tagging each node in the tree with two values
-instead of one: a {\em key\/} and a {\em definition}.  Note that we
-only provide a partial implementation of balanced binary search trees;
-for example, we have not bothered to implement a ``delete'' function.
-        \begin{haskell}{BalBinSTrees}
-
-> module BalBinSTrees(
->       BalBinSTree,        -- don't export the data constructors
->       bbstBuild,
->       bbstInsert,         -- error upon finding duplicate keys
->       bbstInsertQuiet,    -- don't complain about duplicate keys
->       bbstLookUp,
->       bbstMember,
->       bbstDepth,
->       bbstShowKeys,
->       bbstFlatten
->       ) where
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Implementation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-%%====================================================================
-\subsection*{Representation}
-%%====================================================================
-
-        We let the balanced binary search tree data type inherit the
-methods of the class ``\verb~Text~'' so that we can easily read and
-write such trees from/to plain text files.  The type variable \verb~k~
-represents the type of the key and the type variable \verb~b~
-represents the type of the data to be retrieved.
-        \begin{haskell}{BalBinSTree}
-
-> data BalBinSTree a b =
->       Nil | Node a b (BalBinSTree a b) (BalBinSTree a b)
->       deriving Show{-was:Text-}
-
-\end{haskell}
-
-
-%%====================================================================
-\subsection*{bbstBuild}
-%%====================================================================
-
-        The function \verb~bbstBuild~ takes an association list (i.e.,
-a list of pairs where the first element of the pair is the ``key'' and
-the second element of the pair is the ``definition'') as an argument
-and returns a balanced binary search tree.  The key type must belong to
-the Haskell class \verb~Ord~ because the function \verb~bbstInsert~
-uses the methods of that class.
-        \begin{haskell}{bbstBuild}
-
-> bbstBuild     :: (Ord a) => [(a,b)] -> BalBinSTree a b
-> bbstBuild     = foldl bbstInsert Nil
-
-\end{haskell}
-
-
-%%====================================================================
-\subsection*{bbstInsert}
-%%====================================================================
-
-        The function \verb~bbstInsert~ takes a balanced binary search
-tree and an association pair and returns a new balanced binary search
-tree which includes the pair, provided that the key is not already
-found in the tree.  If the key is already in the tree, an error is
-signaled and evaluation is halted.  The definition of
-\verb~bbstInsert~ follows the definition of {\em insert\/}
-of~\cite[p.\ 255]{BirdWadl88} except for the way we handle duplicate
-keys.
-        \begin{haskell}{bbstInsert}
-
-> bbstInsert :: (Ord a) => BalBinSTree a b -> (a,b) ->
->                          BalBinSTree a b
-
-> bbstInsert Nil (x,d)  = Node x d Nil Nil
-
-> bbstInsert (Node y e l r) (x,d)
->       | x <  y     =  rebalance (Node y e (bbstInsert l (x,d)) r)
->       | x == y     =  error "duplicate key"
->       | otherwise  =  rebalance (Node y e l (bbstInsert r (x,d)))
-
-\end{haskell}
-
-
-        The function \verb~bbstInsertQuiet~ is similar to
-\verb~bbstInsert~ but doesn't complain about duplicate keys, quietly
-returning the original tree.  The definition of this function follows
-the definition of {\em insert\/} of~\cite[p.\ 255]{BirdWadl88}.
-        \begin{haskell}{bbstInsertQuiet}
-
-
-> bbstInsertQuiet :: (Ord a) => BalBinSTree a b -> (a,b) ->
->                               BalBinSTree a b
-
-> bbstInsertQuiet Nil (x,d)  = Node x d Nil Nil
-
-> bbstInsertQuiet  t@(Node y e l r)  a@(x,d)
->       | x <  y     =  rebalance (Node y e (bbstInsertQuiet l a) r)
->       | x == y     =  t
->       | otherwise  =  rebalance (Node y e l (bbstInsertQuiet r a))
-
-\end{haskell}
-
-
-        The function \verb~rebalance~ is used to bring a binary tree
-that is slightly out of balance back into balance.  This is the
-function {\em rebal\/} of~\cite[p.\ 255]{BirdWadl88}.
-        \begin{haskell}{rebalance}
-
-> rebalance    :: BalBinSTree a b -> BalBinSTree a b
-> rebalance t  =  case slope t of
->                 2   ->  shift_right t
->                 -2  ->  shift_left t
->                 _   ->  t
-
-\end{haskell}
-
-
-        The function \verb~slope~ is the function {\em slope\/}
-of~\cite[p.\ 253]{BirdWadl88}.
-        \begin{haskell}{slope}
-
-> slope                  :: BalBinSTree a b -> Int
-> slope  Nil             =  0
-> slope (Node _ _ l r)   =  bbstDepth l - bbstDepth r
-
-\end{haskell}
-
-
-        The function \verb~bbstDepth~ computes the depth of a binary
-search tree; it is the function {\em depth\/} of~\cite[p.\
-235]{BirdWadl88}.
-        \begin{haskell}{bbstDepth}
-
-> bbstDepth                :: BalBinSTree a b -> Int
-> bbstDepth  Nil           =  0
-> bbstDepth (Node _ _ l r) =  1 + (bbstDepth l `max` bbstDepth r)
-
-\end{haskell}
-
-
-        The functions \verb~shift_right~ and \verb~shift_left~ are
-used to rebalance a tree.  These are the functions {\em shiftr\/} and
-{\em shiftl\/} of~\cite[p.\ 255]{BirdWadl88}.
-        \begin{haskell}{shift_right}
-
-> shift_right (Node x d l r)
->       | slope l == -1  =  rotate_right (
->                             Node x d (rotate_left l) r)
->
->       | otherwise      =  rotate_right (
->                             Node x d l r)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{shift_left}
-
-> shift_left (Node x d l r)
->       | slope r == 1   =  rotate_left (
->                             Node x d l (rotate_right r))
->
->       | otherwise      =  rotate_left (
->                             Node x d l r)
-
-\end{haskell}
-
-
-        The two rotation operations are defined as follows.  These are
-the functions {\em rotr\/} and {\em rotl\/} of~\cite[p.\
-255]{BirdWadl88}.
-        \begin{haskell}{rotate_right}
-
-> rotate_right (Node x d (Node y e t1 t2) t3) =
->       Node y e t1 (Node x d t2 t3)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{rotate_left}
-
-> rotate_left  (Node x d t1 (Node y e t2 t3)) =
->       Node y e (Node x d t1 t2) t3
-
-\end{haskell}
-
-
-%%====================================================================
-\subsection*{bbstLookUp}
-%%====================================================================
-
-        The function \verb~bbstLookUp~ looks for a given key in the
-search tree and returns the definition associated with that key.  We
-restrict the key to the class \verb~Ord~ so that it can be compared to
-other keys and to the class \verb~Text~ so that an informative error
-message can be printed when a key is not found.
-        \begin{haskell}{bbstLookUp}
-
-> bbstLookUp :: (Ord a, Show{-was:Text-} a) => BalBinSTree a b -> a -> b
-
-> bbstLookUp Nil x  =  error ("key " ++ shows x " not found in tree")
-
-> bbstLookUp (Node k d l r) x
->       | x <  k  =  bbstLookUp l x
->       | x == k  =  d
->       | x >  k  =  bbstLookUp r x
-
-\end{haskell}
-
-
-%%====================================================================
-\subsection*{bbstMember}
-%%====================================================================
-
-        The function \verb~bbstMember~ looks for a given key in the
-search tree and returns \verb~True~ if found and \verb~False~ if not.
-This is the function {\em member\/} of~\cite[p.\ 246]{BirdWadl88}.
-        \begin{haskell}{bbstMember}
-
-> bbstMember :: (Ord a) => BalBinSTree a b -> a -> Bool
-
-> bbstMember Nil _  = False
-
-> bbstMember (Node k d l r) x
->       | x <  k  = bbstMember l x
->       | x == k  = True
->       | x >  k  = bbstMember r x
-
-\end{haskell}
-
-
-%%====================================================================
-\subsection*{bbstShowKeys}
-%%====================================================================
-
-        We provide a function for displaying the tree structure along
-with the keys for the special case when the key type belongs to the
-type class \verb~Text~.  The function uses tab characters to indent
-the different levels.
-        \begin{haskell}{bbstShowKeys}
-
-> bbstShowKeys :: (Show{-was:Text-} a) => Int -> BalBinSTree a b -> String
-
-> bbstShowKeys ntabs Nil  =  tabs ntabs ++ "NIL\n"
-
-> bbstShowKeys ntabs (Node x _ l r)  =
->       bbstShowKeys (ntabs+1) r  ++
->       tabs ntabs ++ show x ++ "\n" ++
->       bbstShowKeys (ntabs+1) l
-
-> tabs ntabs = take ntabs (repeat '\t')
-
-\end{haskell}
-
-
-%%======================================================================
-\subsection*{bbstFlatten}
-%%======================================================================
-
-        The function \verb~bbstFlatten~ returns a list of all of
-key-data pairs within the binary search tree.  It is basically the
-function {\em labels\/} of~\cite[p.\ 247]{BirdWadl88}.
-        \begin{haskell}{bbstFlatten}
-
-> bbstFlatten                :: BalBinSTree a b -> [(a,b)]
-> bbstFlatten  Nil           = []
-> bbstFlatten (Node k v l r) = bbstFlatten l ++ [(k,v)] ++ bbstFlatten r
-
-\end{haskell}
-
-
-%%%%%%%%%%  End of BalBinSTrees.lhs  %%%%%%%%%%
diff --git a/real/HMMS/BatchAlign.lhs b/real/HMMS/BatchAlign.lhs
deleted file mode 100644 (file)
index 27a51c1..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-        This program aligns a collection of transcribed speech files
-with their hidden Markov models.  For each speech file, a plain-text
-alignment file is produced.
-        \begin{haskell}{BatchAlign}
-
-> module Main where
-
-\end{haskell}
-
-
-        The module \verb~Printf~ is a library module provided with the
-Chalmers and Glasgow Haskell compilers.  It allows C-like printing of
-integers, floating point numbers, and strings.
-        \begin{verbatim}
-
-> import Printf         -- needed if you want to use hbc; comment
->                       -- out this import if you use ghc v0.19
-
-> -- import GhcPrintf      -- needed if you want to use ghc v0.19;
->                       -- comment this import out if you use hbc
-
-
-\end{verbatim}
-
-
-        The following modules are from a general library and are
-described in later chapters in Part~\ref{part:library}.
-        \begin{verbatim}
-
-> import NativeIO
-> import PlainTextIO
-
-\end{verbatim}
-
-
-        The following modules are specifically for training HMMs.
-They were documented in earlier chapters (Part~\ref{part:modules}).
-        \begin{verbatim}
-
-> import Phones
-> import Pronunciations
-> import HmmDigraphs
-> import HmmDensities
-> import Viterbi
-> import HmmConstants
-> import System.Environment
-> import Data.Array
-> import System.IO
-> type Assoc a b = (a,b)
-> (=:) a b = (a,b)
-
-#define amap fmap
-
-
-\end{verbatim}
-
-
-        In the main expression, the function \verb~build_tmt~
-(Section~\ref{sc:tmt}) builds the tied-mixture table and then applies
-a continuation.
-        \begin{verbatim}
-
-> main = getArgs >>=  \args ->
->       case args of
->       [gms_dir,   -- Gaussian mixtures directory
->        dmap_file, -- density map file
->        dgs_file,
->        utts_file] -> readFile  dmap_file  >>= \cs0 ->
->                      readFile  dgs_file   >>= \cs1 ->
->                      readFile  utts_file  >>= \cs2 ->
->                      let
->
->                        density_map = concat (
->                                        map restructure (
->                                          readElements cs0))
->
->                        hmm_dgs = get_log_probs (
->                                    build_hmm_array (
->                                      readHmms cs1))
->
->                        file_names = lines cs2
->
->                      in
->                        build_tmt  gms_dir  density_map  []  >>=
->                          \hmm_tms -> align_each_file hmm_tms hmm_dgs
->                                        0 0.0 file_names
->                       
->       _           -> error usage
-
-
-> usage = "usage: BatchAlign  <gms dir>  <density map file> <dgs file>  <utt list file>"
-> -- partain: got rid of string gap because of doing -cpp
-
-\end{verbatim}
-
-
-%----------------------------------------------------------------------
-\section {The Density Map}
-%----------------------------------------------------------------------
-
-        The association list that tells us which HMM states have their
-own mixtures and which are tied to other HMM states is stored in a
-{\em density map file}.  The name of this file is the second argument
-on this program's command line.  Figure~\ref{fg:density-map-file}
-shows the first six lines of an example file.  In this example, all
-HMMs have three states and all states have their own mixture,
-indicated by the data constructor \verb~Mix~.  If the density of any
-state was {\em tied\/} to that of another state
-(Chapter~\ref{ch:HmmDensities}), the constructor \verb~Mix~ would be
-replaced by the constructor \verb~TiedM~ along with the
-``targeted'' phone and state values.  The targeted HMM state must have
-its own mixture; that is, a state must either have its own density or
-be tied to a state that does, no multiple chaining of ties is allowed.
-(This program does not explicitly check for this, it is the
-responsibility of the user to make sure the density map file is
-correctly structured).
-        \begin{figure}
-        \begin{verbatim}
-                (AA,    [1 =: Mix, 2 =: Mix, 3 =: Mix])
-                (AE,    [1 =: Mix, 2 =: Mix, 3 =: Mix])
-                (AH,    [1 =: Mix, 2 =: Mix, 3 =: Mix])
-                (AO,    [1 =: Mix, 2 =: Mix, 3 =: Mix])
-                (AW,    [1 =: Mix, 2 =: Mix, 3 =: Mix])
-                (AX,    [1 =: Mix, 2 =: Mix, 3 =: Mix])
-        \end{verbatim}
-        \caption[]{The first six lines of an example density map file.}
-        \label{fg:density-map-file}
-        \end{figure}
-        \begin{haskell}{DensityMap}
-
-> data DensityMap = Mix | TiedM Phone HmmState  deriving (Read, Show)
-
-\end{haskell}
-
-
-        The function \verb~restructure~ restructures the input list.
-Hence, the lines shown in Figure~\ref{fg:density-map-file} would be
-restructured as shown in Figure~\ref{fg:restructure}.
-        \begin{figure}
-        \begin{verbatim}
-            [(AA, 1 =: Mix), (AA, 2 =: Mix), (AA, 3 =: Mix)]
-            [(AE, 1 =: Mix), (AE, 2 =: Mix), (AE, 3 =: Mix)]
-            [(AH, 1 =: Mix), (AH, 2 =: Mix), (AH, 3 =: Mix)]
-            [(AO, 1 =: Mix), (AO, 2 =: Mix), (AO, 3 =: Mix)]
-            [(AW, 1 =: Mix), (AW, 2 =: Mix), (AW, 3 =: Mix)]
-            [(AX, 1 =: Mix), (AX, 2 =: Mix), (AX, 3 =: Mix)]
-        \end{verbatim}
-        \caption[]{The results of applying the function {\tt
-restructure} to each of the first six lines of the example density map
-file.}
-        \label{fg:restructure}
-        \end{figure}
-        \begin{haskell}{restructure}
-
-> restructure :: (Phone, [Assoc HmmState DensityMap]) ->
->                [(Phone, Assoc HmmState DensityMap)]
-> restructure (p,is) = [(p,k) | k<-is ]
-
-\end{haskell}
-        These individual lists can be concatenated to form the density
-map structure that is used to read a set of Gaussian mixture files.
-
-
-%----------------------------------------------------------------------
-\section {Building the Tied Mixture Table}
-\label{sc:tmt}
-%----------------------------------------------------------------------
-
-        The mixtures are stored in separate files, one mixture per
-file, all in the same directory.  The name of that directory is the
-first argument on this program's command line.  Each file has a name
-with the syntax
-        \begin{quote}\it
-        $<$phone$>$.$<$state$>$.gm
-        \end{quote}
-        where {\it $<$phone$>$} is one of the legal values of
-\verb~Phone~ and {\it $<$state$>$} is the state index.  Keeping the
-densities in separate files is natural since the densities are
-estimated individually by collecting all the feature vectors that
-aligned with a given HMM state (or those that are tied to it) into a
-single file\footnote{This redistributing of feature vectors is done
-using a C program not described in this report.} and then estimating
-the density parameters using a C program (not described in this
-report).
-
-
-        The function \verb~get_gm_fname~ is used to build the filename
-of a file containing Gaussian mixture parameters.
-        \begin{haskell}{get_gm_fname}
-
-> get_gm_fname         :: String -> Phone -> Int -> String
-> get_gm_fname dir p k =  dir ++ "/" ++ shows p ('.' : shows k ".gm")
-
-\end{haskell}
-
-
-        The function \verb~build_tmt~ builds the tied mixture table.
-If the density for HMM $p$, state $k$, is tied to another mixture,
-then we just pass that information through.  If, however, the density
-for HMM $p$, state $k$, is its own mixture, then we open the
-appropriate file and read the mixture parameters, converting them to
-an internal representation to improve efficiency
-(Chapter~\ref{ch:HmmDensities}).  The variable ``\verb~tc~'' in the
-definition stands for ``tied-mixture continuation.''
-        \begin{haskell}{build_tmt}
-
-> build_tmt :: String ->
->              [(Phone, Assoc HmmState DensityMap)] ->
->              [Assoc Phone (Assoc Int TiedMixture)] ->
->              IO TmTable
-
-> build_tmt dir ((p,(k,t)):rps) as =
->       case t of
->       TiedM q s -> build_tmt  dir  rps  ((p=:(k=:Tie q s)):as)
->       Mix       -> let
->                      file = get_gm_fname  dir  p  k
->                    in
->                      readFile  file  >>= \bs ->
->                      case  readMixture bs  of 
->                      Nothing      -> error (can't_read file)
->                      Just (m,bs') -> if null bs'
->                                      then let
->                                             m' = extern_to_intern m
->                                           in
->                                             build_tmt dir rps
->                                               ((p=:(k=:Gm m')):as)
->                                      else error (can't_read file)
-
-> build_tmt  _ [] as = return (make_tm_table as)
-
-> can't_read :: String -> String
-> can't_read file = " can't read the file " ++ file
-
-> make_tm_table = amap (\as -> array (1, length as) as) .
->                 accumArray (flip (:)) [] phone_bounds
-
-\end{haskell}
-
-%----------------------------------------------------------------------
-\section {Performing the Viterbi Alignment}
-%----------------------------------------------------------------------
-
-        \begin{haskell}{align_each_file}
-
-> align_each_file :: TmTable ->
->                    HmmNetworkDic ->
->                    Int ->             -- number of files aligned
->                    Float ->           -- cumulative alignment score
->                   [String] ->        -- file names
->                    IO ()
-
-> align_each_file  hmm_tms  hmm_dgs  nfs  ts  (fn:rfns) =
->       readFile (fn ++ ".ppm") >>=           \cs ->
->       readFile (fn ++ ".fea") >>=           \bs ->
->       let
->         Just (pnet,_)  = readsPrnNetwork cs
->         hmm            = buildHmm hmm_dgs pnet
->         fvs            = readVectors observation_dimen bs
->         lts            = map (eval_log_densities hmm_tms) fvs
->         (score,states) = align hmm lts
->         nfs'           = nfs + 1
->         ts'            = ts  + score
->       in
->         hPutStr stderr (printf "%4d%7.2f%7.2f  %s\n" [
->           UInt nfs', UFloat score, UFloat (ts' / fromIntegral nfs'),
->           UString fn ]) >>
->         writeFile (fn ++ ".algn") (showAlignment states) >>
->         align_each_file  hmm_tms  hmm_dgs  nfs' ts' rfns
-
-> align_each_file _ _ _ _ [] = return ()
-
-> showAlignment :: [(Phone, HmmState)] -> String
-> showAlignment = unlines . map showIndexedState . zip [0..]
-
-
-> showIndexedState (i, x) = shows i (' ' : showState x)
-
-
-> showState (p, j) = show p ++ " " ++ show j
-
-\end{haskell}
diff --git a/real/HMMS/BatchTranscribe.lhs b/real/HMMS/BatchTranscribe.lhs
deleted file mode 100644 (file)
index a02bef0..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-        The program ``Transcribe'' is fine for checking the
-pronunciation modeling functions on single files.  But it would be
-inefficient to use ``Transcribe'' to generate the phonetic
-pronunciation models for all of the training texts because it reads
-the pronunciation dictionary each time it runs.  The program
-``BatchTranscribe'' is designed to work efficiently on a large
-collection of text files.
-
-        The program takes two arguments.  The first is the
-user-supplied dictionary file
-(Section~\ref{sc:dictionary}).\footnote{Originally, we tried a
-separate program for compiling the balanced binary tree of
-pronunciation models.  However, even when the tree was written in
-binary form, reading the compiled tree took significantly longer
-(almost four times) than just regenerating the tree directly from the
-user-supplied dictionary file.  This comparison was for a dictionary
-containing about 6200 words.} The second argument is a file that
-contains the names of the files that contain the training texts (minus
-their ``\verb~.txt~'' extensions).
-        \begin{haskell}{BatchTranscribe}
-
-> module Main where
-
-> --partain: import Maybe
-
-> import BalBinSTrees
-> import Pronunciations
-
-> main = getArgs exit $ \args ->
->       case args of
->       [dic_file, utt_file] -> process_utts dic_file utt_file
->
->       _                    -> error (" Bad command line\n" ++ usage)
-
-
-> usage = " usage:  BatchTranscribe  <dictionary>  <utt list file>"
-
-
-> process_utts dic_file utt_file =
->       readFile dic_file exit  $ \ cs1 ->
->       readFile utt_file exit  $ \ cs2 ->
->       let
->         dictionary = bbstBuild (readDictionary cs1)
->         file_names = lines cs2
->       in
->         foldr (transcribe_file dictionary) done file_names
-
-
-> transcribe_file dictionary fn d =
->       let
->         in_file  = fn ++ ".txt"
->         out_file = fn ++ ".ppm"
->       in
->         appendChan stderr (in_file ++ "  \t-> ") exit $
->         readFile in_file exit                         $ \ cs ->
->         let
->           network = pre_hmm dictionary cs
->         in
->           writeFile out_file (showPrnNetwork network) exit $
->           appendChan stderr (out_file ++"\n") exit d
-
-\end{haskell}
diff --git a/real/HMMS/COPYRIGHT b/real/HMMS/COPYRIGHT
deleted file mode 100644 (file)
index 3789120..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-
-             Copyright (c) 1994 by The MITRE Corporation
-                         All rights reserved.
-
-        Permission to use, copy, modify, and distribute this software
-and its documentation for educational and/or research and development
-purposes and without fee is hereby granted, provided that the above
-copyright notice appear in all copies and that both the copyright
-notice and this permission notice appear in supporting documentation,
-and that the name of The MITRE Corporation not be used in advertising
-or publicity pertaining to distribution of the software without
-specific, written prior permission.  We require a brief
-acknowledgement in any research paper or other publication where this
-software has made a significant contribution.  If you wish to use this
-software for commercial gain, you must contact The MITRE Corporation
-for conditions of use.
-
-        This software is provided as is.  The MITRE Corporation
-provides absolutely NO WARRANTY for this software, including any and
-all implied warranties of merchantability and fitness.  Should this
-software prove to be defective, you must assume the cost of all
-necessary servicing, repair or correction. In no way will The MITRE
-Corporation be liable to you for damages, including any lost profits,
-lost monies, or other special, incidental or consequential damages
-arising out of the use or inability to use this software.
-
diff --git a/real/HMMS/ComputeNewDgs.lhs b/real/HMMS/ComputeNewDgs.lhs
deleted file mode 100644 (file)
index a1ec356..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-        \begin{haskell}{ComputeNewDgs}
-
-> module Main where
-
-> import ListUtil( group, groupEq )
-> import Printf
-
-> import Lists( mapsnd )
-> import PlainTextIO
-
-> import Phones
-> import HmmDigraphs
-> import Alignments
-
-> main = getArgs exit $ \args ->
->       case args of
->       [hmm_file,
->        utts_file] -> readFile  hmm_file   exit  $ \cs1 ->
->                      readFile  utts_file  exit  $ \cs2 ->
->                      let
->                        initial_count_tables = 
->                          amap transform_Hmm_to_Cnt (
->                            build_hmm_array (
->                              readHmms cs1))
->
->                        file_names = lines cs2
->                      in
->                        collect_counts initial_count_tables file_names
->                       
->       _          -> error (" Bad command line\n" ++ usage)
-
-> usage = "usage:  ComputeNewDgs  <hmm network file>  <utts list file>"
-
-\end{haskell}
-
-
-        For each HMM, we need a table of cumulative counts.  To
-initialize these tables, we need to know the topology of each HMM.
-There must be an accumulator for each arc in the HMM.  Notice that the
-count structure has the same ``shape'' as the \verb~HmmTsL~ data
-structure (Chapter~\ref{ch:HmmDigraphs}).  What we do is read in the
-hmms that were used to get this alignment data (or, we could edit that
-file to create whatever topologies we would like them to have) and
-just transform those structures into count tables.
-        \begin{haskell}{StateCounts}
-
-> data StateCounts =
->       SC  Int  [(Int,Int)]  [(Int,Int)]  [((Int,Int), [(Int,Int)])]
->       deriving Eq
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{CountTable}
-
-> type CountTable = Array Phone StateCounts
-
-\end{haskell}
-
-
-        The function \verb~collect_counts~ takes a cummulative count
-table and a list of file names and updates the cummulative count file
-after processing each file.  When the file name list is exhausted, the
-function prints out the final results.
-        \begin{haskell}{collect_counts}
-
-> collect_counts  cnt_table  [] =
->       let
->         probs = amap counts_to_probs cnt_table
->       in
->         appendChan stderr 
->           "New digraphs written to new_hmms.dgs\n" exit $
->         writeFile "new_hmms.dgs" (showsHmmTsLs probs "") exit done
-
-> collect_counts  cnt_table  (fn:rfns) =
->       appendChan stderr (fn ++ "\n") exit    $
->       readFile (fn ++ ".algn") exit          $ \cs ->
->       let
->         states        = strip_off_frame_number (readAlignment cs)
->         segments      = groupEq (\ (a,_) (b,_) -> a==b) states
->         counts        = map (get_segment_counts cnt_table) segments
->         new_cnt_table = accum add_counts cnt_table counts
->       in
->         if new_cnt_table == new_cnt_table  -- idiom to force 
->                                            -- evaluation of the
->                                            -- new count table
->            then  collect_counts  new_cnt_table  rfns
->            else  error "This can't happen"
-
-\end{haskell}
-
-
-        The function \verb~get_segment_counts~ collects the state
-occupancy and state transition counts for a {\em segment}, which is
-defined as a run in a single HMM.
-        \begin{haskell}{get_segment_counts}
-
-> get_segment_counts  count_table  segment_path  =
->       let
->         (ps, js)     = unzip segment_path
->         hmm          = head ps
->         start_state  = head js
->         end_state    = last js
->         SC n _ _ _   = count_table!hmm
->         state_counts = accumArray (+) 0  (1,n) (map (:= 1) js)
->         trn_counts   = accumArray (+) 0 ((1,1),(n,n))
->                               (map (:= 1) (zip (tail js) js))
->       in
->         hmm := (start_state, end_state, state_counts, trn_counts)
-
-\end{haskell}
-
-
-        The function \verb~add_counts~ takes the state occupancy and
-state transition counts for a segment and adds them to the cummulative
-count table for the corresponding hmm.
-        \begin{haskell}{add_counts}
-
-> add_counts (SC n is ts dg) (start_state, end_state,
->                               state_counts, trn_counts)
->       = SC n 
->              [if k == start_state
->                  then (k, n+1)
->                  else (k, n)  | (k,n) <- is]
->
->              [if k == end_state
->                  then (k, n+1)
->                  else (k, n)  | (k,n) <- ts]
->
->              [ ((i, n + state_counts!i), [(k, m + trn_counts!(i,k)) 
->                                          | (k,m) <- pcs] )
->                | ((i, n), pcs) <- dg ]
-
-\end{haskell}
-
-
-        The function \verb~counts_to_probs~ takes a cummulative count
-table and converts it to probabilities.
-        \begin{haskell}{counts_to_probs}
-
-> counts_to_probs (SC n is ts dg) =
->       if num_starts == num_stops
->          then  HmmTsL n is' ts' dg'
->          else  error ("Number of starts /= number of stops.\n\
->                        \starts: " ++ shows is "\n" ++
->                        "stops : " ++ shows ts "\n")
->       where
->
->       num_starts       = sum (snd (unzip is))
->       num_stops        = sum (snd (unzip ts))
->
->       (ids_and_cnts, pss)  = unzip dg
->       (ids, cnts)          = unzip  ids_and_cnts
->       fcounts              = map fromInt cnts
->
->       is' = let divisor = fromInt num_starts
->             in mapsnd ((/divisor) . fromInt) is
->
->       ts' = [(k, fromInt m / fcounts!!(k-1)) | (k, m) <- ts]
->
->       dg' = zip ids [ [ (k, fromInt m / fcounts!!(k-1))
->                          | (k,m) <- ps ]
->                       | ps <- pss]
-
-\end{haskell}
-
-
-\section {Output Functions}
-
-        The following functions are for writing the HMM topologies.
-The functions for reading them were defined in the module
-\verb~HmmDigraphs~ (Chapter~\ref{ch:HmmDigraphs}).
-        \begin{haskell}{showsHmmTsLs}
-
-> showsHmmTsLs = pprintElements showsHmmTsL . assocs
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{showsHmmTsL}
-
-> showsHmmTsL  (phn := (HmmTsL n is es dg)) =
->       shows phn .
->       (" :=\nHmmTsL " ++) .
->       shows n .
->       consNewline .
->       shows is .
->       consNewline .
->       shows es .
->       consNewline .
->       pprintAsList shows dg
-
-\end{haskell}
-
-
-        \begin{verbatim}
-
-> transform_Hmm_to_Cnt :: (HmmTsL Int) -> StateCounts
-> transform_Hmm_to_Cnt (HmmTsL n is es dg) =
->       SC n 
->       (mapsnd (const 0) is)
->       (mapsnd (const 0) es)
->       (map (\(n,ps) -> ((n,0), mapsnd (const 0) ps)) dg)
-
-\end{verbatim}
-
-%%%%%%%%%%  ComputeNewDgs.lhs  %%%%%%%%%%
diff --git a/real/HMMS/ConvertLinearDic.lhs b/real/HMMS/ConvertLinearDic.lhs
deleted file mode 100644 (file)
index 653516a..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-
-        This program converts a dictionary containing linear
-pronunciation models into a dictionary of pronunciation networks
-(Chapter~\ref{ch:Pronunciations}).  That is, it takes a dictionary with
-entries in the format
-        \begin{alltt}
-
-                        A       AX
-                        ABLE    EY B EL
-                        ABLY    EY B L IY
-                        \vdots
-        \end{alltt}
-        and produces a dictionary with entries in the format
-        \begin{alltt}
-
-                        A
-                        1  [1]  [1]
-                        1       AX      []
-
-                        ABLE
-                        3  [1]  [3]
-                        1       EY      []
-                        2       B       [1]
-                        3       EL      [2]
-
-                        ABLY
-                        4  [1]  [4]
-                        1       EY      []
-                        2       B       [1]
-                        3       L       [2]
-                        4       IY      [3]
-
-                        \vdots
-        \end{alltt}
-
-
-        \begin{haskell}{ConvertLinearDic}
-
-> module Main where
-
-> import Phones
-
-> main = getArgs exit $ \args ->
->       case  args  of
->       [linear_dic_file] -> let
->                              outfile = linear_dic_file ++ ".dgs"
->                            in
->                              readFile linear_dic_file exit $ \cs ->
->                              writeFile outfile (process cs) exit $
->                              appendChan stderr (
->                                "Output written to " ++ outfile ++
->                                "\n") exit done
->
->       _                 -> error usage
-
-> usage = "usage: ConvertLinearDic  <linear dictionary>"
-
-\end{haskell}
-
-
-        In a ``linear'' dictionary, there is one entry per line.  The
-function \verb~readLinearEntry~ reads one line.
-        \begin{verbatim}
-
-> type LinearEntry = (String, [Phone])
-
-> readLinearEntry :: String -> LinearEntry
-> readLinearEntry l = (w, ps)
->       where (w:pls) = words l
->             ps      = map read pls
-
-> process :: String -> String
-> process = concat . map (build_and_show_dg . readLinearEntry) . lines
-
-> build_and_show_dg :: LinearEntry -> String
-> build_and_show_dg (w,ps) =
->       let
->         num_nodes  = length ps
->         term_nodes = [num_nodes]
->         node_lines = map show_node_line (
->                         zip3 [1..] ps ([] : [[k] | k <- [1..]]) )
->       in
->         w ++ "\n" ++
->         show num_nodes ++ "  [1]  " ++ show term_nodes ++ "\n" ++
->         unlines node_lines ++ "\n"
-
-> show_node_line (k, p, ps) =
->       show k ++ "\t" ++ show p ++ "\t" ++ show ps
-
-\end{verbatim}
-
diff --git a/real/HMMS/CountAlignmentDiffs.lhs b/real/HMMS/CountAlignmentDiffs.lhs
deleted file mode 100644 (file)
index e14fb13..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-        This program steps through the new and old alignment files for
-all of the training sentences and accumulates a count of how many
-frames were aligned differently between two training iterations.  This
-difference provides one way of checking for convergence of the
-training algorithm.
-
-        The way that we write alignment files, all we need to do is
-see if corresponding lines are different; we don't have to actually
-parse them into the constituent parts.
-        \begin{haskell}{CountAlignmentDiffs}
-
-> module Main where
-
-> import Printf         -- hbc module for C-like printing
-> --  import GhcPrintf      -- ghc module for C-like printing
-
-> import Lists
-
-> main = getArgs exit $ \args ->
->       case args of
->       [sent_file] ->  readFile  sent_file  exit  $ \cs ->
->                       let
->                         file_names = lines cs
->                       in
->                         count_diffs 0 0 file_names
->                       
->       _           ->  error usage
-
-> usage = "usage: CountAlignmentDiffs  <sentence-list file>"
-
-\end{haskell}
-
-        The function \verb~hamming~ computes the number of places in
-which two equal-length lists differ.  If the lists do not have equal
-length, then the program will halt because of how \verb~hamming~ is
-implemented.  The function \verb~hamming~ is defined in the module
-\verb~Lists~ (Chapter~\ref{ch:Lists}).
-        \begin{haskell}{count_diffs}
-
-> count_diffs :: Int -> Int -> StrListCont
-
-> count_diffs  nframes  ndiffs  (fn : rfns) =
->       readFile (fn ++ ".algn") exit           $ \cs1 ->
->       readFile (fn ++ ".algn.old") exit       $ \cs2 ->
->       let
->         a1   = lines cs1
->         a2   = lines cs2
->         n1   = length a1
->         nd   = hamming a1 a2
->         nfs  = nframes + n1
->         nds  = ndiffs  + nd
->       in
->         if (nfs,nds) == (nfs,nds)  -- force evaluation of the
->                                    -- accumulated statistics
->            then  appendChan stdout (show_statistics n1 nd fn)
->                    exit (count_diffs nfs nds rfns)
->            else  error "This can't happen"
-
-> count_diffs nframes ndiffs [] =
->       let
->         p = percentage nframes ndiffs
->       in
->         appendChan stdout (
->         printf "\nNo. frames = %7d\
->                \\nNo. diffs  = %7d\
->                \\nPercentage = %7.1f\n"
->                [UInt nframes, UInt ndiffs, UFloat p]) exit done
-
-\end{haskell}
-
-
-        \begin{verbatim}
-
-> show_statistics :: Int ->     -- no. frames for this file
->                    Int ->     -- no. different frames for this file
->                    String ->  -- file name
->                    String
-
-> show_statistics nf nd fn =
->       printf "%4d %4d %6.1f  %s\n" [UInt nf, UInt nd,
->               UFloat (percentage nf nd), UString fn]
-
-\end{verbatim}
-
-
-        \begin{verbatim}
-
-> percentage :: Int -> Int -> Float
-> percentage n d = 100.0 * (fromInt d / fromInt n)
-
-\end{verbatim}
diff --git a/real/HMMS/DumpPhoneList.lhs b/real/HMMS/DumpPhoneList.lhs
deleted file mode 100644 (file)
index 20355ec..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-        This utility program dumps a list of the legal phone labels
-defined in Chapter~\ref{ch:Phones} to the standard output, one label
-per line.
-        \begin{haskell}{DumpPhoneList}
-
-> module Main where
-
-> import Phones
-
-> main = appendChan stdout (unlines (map show phone_list)) exit done
-
-\end{haskell}
-
diff --git a/real/HMMS/Extrema.lhs b/real/HMMS/Extrema.lhs
deleted file mode 100644 (file)
index 887d5bd..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-        This module provides functions for finding maxima for
-situtations not covered by the Standard Prelude functions \verb~max~
-and \verb~maximum~.
-        \begin{haskell}{Extrema}
-
-> module Extrema( maxfst, maximumfst, maxsnd, maximumsnd ) where
-
-\end{haskell}
-
-
-        The function \verb~maxfst~ returns that pair that has the
-larger first component.  The second component is completely
-ignored; if the second argument was in the type class \verb~Ord~ and
-if we wanted to examine the second argument in the case of equal first
-arguments, then we could just use the standard prelude function
-\verb~max~.
-        \begin{haskell}{maxfst}
-
-> maxfst :: (Ord a) => (a,b) -> (a,b) -> (a,b)
-> maxfst f@(a,b) s@(c,d)
->       | c <= a        = f
->       | otherwise     = s
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{maximumfst}
-
-> maximumfst :: (Ord a) => [(a,b)] -> (a,b)
-> maximumfst = foldl1 maxfst
-
-\end{haskell}
-
-
-        The function \verb~maxsnd~ returns that pair that has the
-larger second component.  Now the first component is completely
-ignored.
-        \begin{haskell}{maxsnd}
-
-> maxsnd :: (Ord b) => (a,b) -> (a,b) -> (a,b)
-> maxsnd f@(a,b) s@(c,d)
->       | d <= b        = f
->       | otherwise     = s
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{maximumsnd}
-
-> maximumsnd :: (Ord b) => [(a,b)] -> (a,b)
-> maximumsnd = foldl1 maxsnd
-
-\end{haskell}
-
-
-%%%%%%%%%%  End of Utilities.lhs  %%%%%%%%%%
diff --git a/real/HMMS/HMMS.stderr b/real/HMMS/HMMS.stderr
deleted file mode 100644 (file)
index fdb04e1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-   1  11.08  11.08  data/dmg_01
-   2  11.68  11.38  data/dmg_02
-   3   9.98  10.92  data/dmg_03
-   4  11.02  10.94  data/dmg_04
-   5   9.86  10.72  data/dmg_05
-   6  10.64  10.71  data/dmg_06
diff --git a/real/HMMS/HmmConstants.lhs b/real/HMMS/HmmConstants.lhs
deleted file mode 100644 (file)
index 6dba225..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-        This module defines the global constants used throughout the
-program.  For now there is only one global constant, the dimension of
-the feature vectors.
-        \begin{haskell}{HmmConstants}
-
-> module HmmConstants( observation_dimen ) where
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{observation_dimen}
-
-> observation_dimen = 18 :: Int
-
-\end{haskell}
-
-
-%%%%%%%%%%  End of HmmConstants.lhs %%%%%%%%%%
diff --git a/real/HMMS/HmmDensities.lhs b/real/HMMS/HmmDensities.lhs
deleted file mode 100644 (file)
index 49fb3b0..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-
-        In Chapter~\ref{ch:HmmDigraphs} we were concerned only with
-the HMM state transition structure.  In this chapter we are concerned
-with developing and using statistical models for the observation
-vectors.
-        \begin{haskell}{HmmDensities}
-
-> module HmmDensities(
->       module MathTypes, module Phones,
->       GaussianComponent, TiedMixture(..), TmTable,
->       LogDensityTable,
->       eval_log_densities, readMixtures, readMixture, extern_to_intern
->       ) where
-
-> import Native         -- hbc library modules
-
-> import Lists          -- general library modules
-> import MathTypes
-> import MaybeStateT
-
-> import Phones         -- application-specific modules
-> import HmmConstants
-> import Data.Array
-
-#define amap fmap
-
-
-\end{haskell}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Multivariate Gaussian Densities}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        Let $x$ be a vector of dimension $N$ with real-valued
-components, i.e., $x \in \reals^N$.  The formula for a multivariate
-Gaussian probability density function having mean vector $\mu \in
-\reals^N$ and covariance matrix $\Sigma \in \reals^{N \times N}$ is
-        \begin{equation}
-        \scriptN(x \verticalbar \mu, \Sigma)
-        = \frac{1}{ (2\pi)^{N/2}
-          (\det \Sigma)^{1/2} } \exp \{ -\frac{1}{2} (x - \mu)^{T}
-          \Sigma^{-1} (x - \mu) \}.
-        \label{eq:gauss-gen}
-        \end{equation}
-        The superscript $T$ denotes the matrix/vector transpose;
-vectors without the superscript $T$ are taken to be column vectors.
-
-
-        If the covariance matrix is diagonal, i.e., $\Sigma =
-\mbox{diag}\{\sigma_1^2,\sigma_2^2,\ldots,\sigma_N^2\}$, and if we
-take $x = (x_1, x_2, \ldots, x_N)$ and $\mu = (\mu_1, \mu_2, \ldots,
-\mu_N)$, then (\ref{eq:gauss-gen}) can be simplified to
-        \begin{equation}
-        \scriptN(x \verticalbar \mu, \Sigma) = 
-          \frac{1}{ (2\pi)^{N/2}
-                    \prod_{j=1}^N \sigma_j}
-          \exp \{ -\frac{1}{2}
-                   \sum_{j=1}^N (x_j - \mu_j)^2 / \sigma_j^2 \} .
-        \label{eq:gauss-diag}
-        \end{equation}
-
-
-        We will assume diagonal covariance matrices for the rest of
-this chapter.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Mixture Densities}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        Given $M$ density functions $f_1, f_2, \ldots, f_M$ defined
-over $\reals^N$ and $M$
-nonnegative real numbers $c_1, c_2, \ldots, c_M$ for which
-        \[
-        \sum_{i=1}^M c_i \ = \ 1,
-        \]
-        we can define a new density function $g$ over $\reals^N$ by
-the equation
-        \[
-        g = \sum_{i=1}^M c_i f_i.
-        \]
-        The function $g$ is called a {\em mixture density function}.
-The $c_i$'s are the {\em mixture coefficients\/} or the {\em component
-probabilities}, and the $f_i$'s are the {\em component densities}.
-
-
-        An excellent introduction to the theory of mixture
-distributions is provided in~\cite{EverHand81}.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Gaussian Mixture Densities}
-\label{sc:gms}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        A {\em Gaussian mixture density\/} is a mixture density for
-which each component density is Gaussian.  Thus, a Gaussian mixture
-density has the form
-        \begin{equation}
-        g(x) = \sum^M_{i=1} c_i \scriptN(x \verticalbar \mu_i,\Sigma_i)
-        \label{eq:mixG-gen}
-        \end{equation} where the $i$th component density has mean
-$\mu_i$ and covariance matrix $\Sigma_i$.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Representation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        Recall that we are assuming that the covariance matrix is
-diagonal; hence, it can be represented as a vector.  The parameters of
-a Gaussian mixture can be stored in a list of triples.  The first
-component of each triple is the mixture coefficient, the second
-component is the mean vector, and the third component is the variance
-vector.
-        \begin{haskell}{GaussianComponent}
-
-> type GaussianComponent = (Float, Vector, Vector)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{GaussianMixture}
-
-> type GaussianMixture   = [GaussianComponent]
-
-\end{haskell}
-        For example, a 3-component mixture density would be
-represented by the list
-        \[
-        \startlist (c_1, \mu_1, \Sigma_1),\ 
-                   (c_2, \mu_2, \Sigma_2),\ 
-                   (c_3, \mu_3, \Sigma_3) \stoplist
-        \]
-
-
-        This is how we will store the mixture parameters in external
-files.  However, to make the evaluation of a mixture density more
-efficient, it pays to modify the {\em internal\/} representation
-somewhat.
-
-
-        Using a subscript $i$ to index the mixture components and
-another subscript $j$ to index the vector components, we can replace
-each $\scriptN(x \verticalbar \mu_i, \Sigma_i)$ in (\ref{eq:mixG-gen})
-by its definition (\ref{eq:gauss-diag}) to get
-        \begin{equation}
-           g(x) = \sum^M_{i=1}
-             \frac{c_i}{  (2\pi)^{N/2} \prod_{j=1}^N \sigma_{i,j} }
-            \exp \{ -\frac{1}{2} \sum_{j=1}^N (x_j - \mu_{i,j})^2 /
-            \sigma_{i,j}^2 \}.
-        \end{equation}
-        Denote the ``normalized'' mixture coefficient by $c'_i$:
-        \begin{equation}
-          c'_i = \frac{c_i}{  (2\pi)^{N/2} \prod_{j=1}^N \sigma_{i,j} }.
-        \label{eq:normalized-coefficient}
-        \end{equation}
-        Then
-        \begin{eqnarray}
-          g(x) & = & \sum^M_{i=1} c'_i \exp \{ -\frac{1}{2}
-                     \sum^N_{j=1} (x_j - \mu_{i,j})^2 / \sigma_{i,j}^2 \}\\
-               & = & \sum^M_{i=1} c'_i \exp \{ 
-                    - \sum^N_{j=1} (x_j - \mu_{i,j})^2 / (2\sigma_{i,j}^2) \}.
-        \label{eq:mixture-final-form}
-        \end{eqnarray}
-
-
-        The internal representation has the same structure as the
-external representation, i.e., a list of triples of type
-\verb~GaussianComponent~, except the mixture coefficient is replaced
-by the normalized mixture coefficient and each of the variances is
-multiplied by two.  For example, a 3-component mixture density would
-be represented internally by the list
-        \[
-        \startlist (c'_1, \mu_1, \Sigma'_1),\ 
-                   (c'_2, \mu_2, \Sigma'_2),\ 
-                   (c'_3, \mu_3, \Sigma'_3) \stoplist
-        \]
-        where
-        \[
-        \Sigma_i = \mbox{diag}\{\sigma_{i,1}^2, \sigma_{i,2}^2,
-                                \ldots, \sigma_{i,N}^2 \}
-        \ \Rightarrow\ 
-        \Sigma'_i = \mbox{diag}\{2\sigma_{i,1}^2, 2\sigma_{i,2}^2,
-                                \ldots, 2\sigma_{i,N}^2 \}
-        \]
-
-
-        We need to know the dimension of the observation vectors to
-calculate the Gaussian normalization coefficient efficiently.  We
-could do the calculation without explicit knowledge of the observation
-dimension by putting a $\sqrt{2\pi}$ term inside the multiplication
-over the $\sigma_{i,j}$'s (see (\ref{eq:normalized-coefficient})), but
-this increases the amount of computation.  Since we need the
-observation dimension for other functions, we assume that we have
-access to it via the module \verb~HmmConstants~.
-        \begin{haskell}{gaussian_factor}
-
-> gaussian_factor = sqrt (2.0*pi) ^ observation_dimen :: Double
-
-\end{haskell}
-        The normalizing calculation is performed using double
-precision arithmetic.  The expression \verb~fromRational.toRational~
-is a Haskell idiom for conversion of floating point types.
-        \begin{haskell}{extern_to_intern}
-
-> extern_to_intern :: GaussianMixture -> GaussianMixture
-> extern_to_intern = map extern_to_intern'
-
-> extern_to_intern' :: GaussianComponent -> GaussianComponent
-> extern_to_intern' (c, mu, vars) =
->       let
->         vars_d   = map (fromRational.toRational) vars :: [Double]
->         t        = gaussian_factor * sqrt (product vars_d)
->         denom    = (fromRational.toRational) t :: Float
->       in
->         (c/denom, mu, map (2*) vars)
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Evaluation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        In the Viterbi alignment algorithm~(Chapter~\ref{ch:Viterbi}),
-we are actually going to do our calculations on a logarithmic scale.
-Thus, the function we really want to compute is
-        \begin{equation}
-          \ln g(x) = \ln\ \sum^M_{i=1} c'_i \exp \{ 
-                - \sum^N_{j=1} (x_j - \mu_{i,j})^2 / (2\sigma_{i,j}^2) \}.
-        \label{eq:log-mixture-final-form}
-        \end{equation}
-
-
-        The function for evaluating (\ref{eq:log-mixture-final-form})
-with parameters \verb~igm~ (for ``internal Gaussian mixture'') at the
-point \verb~x~ can be defined as follows:
-        \begin{haskell}{eval_log_mixture}
-
-> eval_log_mixture :: Vector -> GaussianMixture -> Float
-
-> eval_log_mixture  x  igm  =
->       density_log (sum [c' * exp( eval_exponent x mu vars' )
->                            | (c', mu, vars') <- igm])
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{eval_exponent}
-
-> eval_exponent (x:rxs) (u:rus) (v:rvs) =
->       let  t = x - u
->       in   (eval_exponent rxs rus rvs) - (t*t)/v
-
-> eval_exponent [] [] [] = 0.0
-
-\end{haskell}
-
-
-        The use of the function \verb~density_log~ is an attempt to
-avoid an unnecessary logarithm calculation if the density value is too
-small.
-        \begin{haskell}{density_log}
-
-> density_log x = if x <= density_threshold
->                 then smallest_log_density
->                 else log x
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{density_threshold}
-
-> density_threshold = 0.1023 ^ observation_dimen :: Float
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{smallest_log_density}
-
-> smallest_log_density = log density_threshold
-
-\end{haskell}
-        We now explain how we picked the formula for the density
-threshold.  Equation (\ref{eq:gauss-diag}) is the probability density
-function for $N$ mutually independent Gaussian random variables.  The
-probability that an individual zero-mean unit variance Gaussian random
-variable takes on an absolute value exceeding 1.65 is about 0.10.  The
-value of the density function at this point is about 0.1023.  Since
-the Gaussian density function is unimodal, if all $N$ components had
-taken values exceeding 1.65 in absolute value, the value of the
-density function at such a point would have to be smaller than
-$0.1023^N$.  But the probability of this happing is not greater than
-$0.10^N$.  So, if our density is this small, it is quite unlikely that
-the observed vector came from this particular mixture, so we don't
-bother to compute the logarithm precisely.\footnote{Of course, there
-are other ways that the density function can be that small; this
-calculation is just an engineering approximation.}  Note that, like
-the Gaussian normalizing factor, these constants depend on the
-dimension of the observation vector, which is defined in the module
-\verb~HmmConstants~; see Chapter~\ref{ch:Constants}.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {The Log-Density Table}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        The states of each HMM are indexed by integers.
-        \begin{verbatim}
-
-> type HmmState = Int
-
-\end{verbatim}
-
-
-        Each state of a phonetic HMM either has its own mixture
-density or it is {\em tied\/} to the density of another state,
-possibly belonging to another HMM.
-        \begin{haskell}{TiedMixture}
-
-> data TiedMixture = Gm GaussianMixture | Tie Phone HmmState
-
-\end{haskell}
-
-
-        The tied mixtures are stored in a two-dimensional table that
-is implemented as an array of arrays in order to save storage space
-when building tables for HMMs with different numbers of states.
-        \begin{haskell}{TmTable}
-
-> type TmTable = Array Phone (Array HmmState TiedMixture)
-
-\end{haskell}
-
-
-        The log-density values are stored in a table that has the same
-structure as the mixture parameter table.
-        \begin{haskell}{LogDensityTable}
-
-> type LogDensityTable = Array Phone (Array HmmState Float)
-
-\end{haskell}
-
-
-        The function \verb~eval_log_densities~ computes a table of
-log-density values from an observation vector and a tied mixture
-table.  In other words, this function evaluates the log-densities for
-all of the states of all of the HMMs, placing the values in an array
-for efficient retrieval.
-        \begin{haskell}{eval_log_densities}
-
-> eval_log_densities :: TmTable -> Vector -> LogDensityTable
-
-> eval_log_densities tmt x = ldt
->       where ldt = amap (amap eval_tied_mixture) tmt
->             eval_tied_mixture (Gm gm)   = eval_log_mixture x gm
->             eval_tied_mixture (Tie p k) = ldt!p!k
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Reading Gaussian Mixture Densities from Binary Files}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        The function readMixtures reads all of the mixtures in a
-binary file that is assumed to contain only mixture data.
-        \begin{haskell}{readMixtures}
-
-> readMixtures          :: Bytes -> [GaussianMixture]
-
-> readMixtures bs       =
->       case readMixture bs of
->       Nothing         -> if null bs
->                          then []
->                          else error "readMixtures: left-over bytes"
->       Just (m, bs')   -> m : readMixtures bs'
-
-\end{haskell}
-
-
-        The function \verb~readMixture~ reads the parameters for one
-mixture density.  First it reads the number of component densities in
-the mixture, then it reads each of them in.  This function and the
-next two that follow are implemented using the Maybe State Transformer
-(Chapter~\ref{ch:MaybeStateT}).
-        \begin{haskell}{readMixture}
-
-> readMixture :: MST Bytes GaussianMixture
-
-> readMixture =
->       readBytes                     `bindMST` \ num_components ->
->       readGaussians num_components  `bindMST` \ gs ->
->       returnMST gs
-
-\end{haskell}
-
-
-        The first argument to the function \verb~readGaussians~ is the
-number of component Gaussian densities in the mixture.
-        \begin{haskell}{readGaussians}
-
-> readGaussians         :: Int -> MST Bytes GaussianMixture
-
-> readGaussians  0      = returnMST []
-
-> readGaussians m       = readGaussian        `bindMST` \ g ->
->                         readGaussians (m-1) `bindMST` \ gs ->
->                         returnMST (g:gs)
-
-\end{haskell}
-
-
-        The function \verb~readGaussian~ reads the mixture
-coefficient, the mean, and the variance vector for a multivariate
-Gaussian density.
-        \begin{haskell}{readGaussian}
-
-> readGaussian      :: MST Bytes GaussianComponent
-
-> readGaussian =
->       readBytes                         `bindMST` \ c ->
->       listReadBytes observation_dimen   `bindMST` \ m ->
->       listReadBytes observation_dimen   `bindMST` \ v ->
->       returnMST (c, m, v)
-
-\end{haskell}
-
-
-%%%%%%%%%%  End of HmmDensities.lhs  %%%%%%%%%%
diff --git a/real/HMMS/HmmDigraphs.lhs b/real/HMMS/HmmDigraphs.lhs
deleted file mode 100644 (file)
index 34829e4..0000000
+++ /dev/null
@@ -1,682 +0,0 @@
-
-        This module defines data structures for representing the
-topology (i.e., the state transition structure) of hidden Markov
-models (HMMs).  The module also defines functions for manipulating
-these models so that we can build HMMs of words and utterances.  We
-are only concerned with the topology in this module because for the
-subword modeling of utterances we do not need to know the nature of
-the observations, e.g., whether they are discrete vector-quantizer
-indices (e.g., \cite{Lee89}) or continuous-valued vectors (e.g.,
-\cite{LeeRabiPierWilp90}).  In this module we are just trying to build
-a model that describes the order in which subword events occur, not
-their nature.
-        \begin{haskell}{HmmDigraphs}
-
-> module HmmDigraphs(
->       module BalBinSTrees,  -- needed for ghc to compile
->       module Phones, module Pronunciations,
->       ProbArc, ProbDigraphNode, ProbDigraphL,
->       ProbDigraphA,
->       HmmNetworkDic,
->       HmmState, HmmData,
->       HmmTsL(..), HmmTsA(..),
->       buildHmm,
->       readHmms, build_hmm_array,
->       get_log_probs, convert_to_log_probs
->       ) where
-
-\end{haskell}
-
-        The following modules are part of a general library and are
-described in later chapters in Part~\ref{part:library}.
-        \begin{verbatim}
-
-> import BalBinSTrees
-> import Lists( mapfst, mapsnd, mapAccumlfst )
-> import PlainTextIO
-> import Data.Array
-> import Data.Ix
-
-#define amap fmap
-
-\end{verbatim}
-
-
-        The modules \verb~Phones~ and \verb~Pronunciations~ were
-defined in Chapters~\ref{ch:Phones} and~\ref{ch:Pronunciations},
-respectively.
-        \begin{haskell}
-
-> import Phones
-> import Pronunciations
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Mathematical Representation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        Like the pronunciation networks of
-Chapter~\ref{ch:Pronunciations}, HMMs have a network structure.
-Unlike pronunciation networks, the HMM directed graphs have transition
-probabilities assigned to the arcs and the nodes usually have
-self-loops. Thus, the representation for HMM networks will be similar
-to that for pronunciation networks but slightly more complicated.  We
-will call the HMM networks {\em probabilistic
-networks\/}\index{probabilistic networks} and the directed graphs {\em
-probabilistic digraphs}\index{probabilistic digraphs}.
-
-
-        An example of a popular phonetic HMM network is shown in
-Figure~\ref{fg:phoneHMM1}.  The open circles labeled with numbers
-represent the {\em states\/}\index{states} of the HMM.  Thus, the HMM
-of Figure~\ref{fg:phoneHMM1} is a 3-state HMM.  The states correspond
-to observations.  That is, each state is associated with an
-observation probability model.  Such a model might be a probability
-mass function over the indices of codewords in a vector quantizer
-(e.g., \cite{Lee89}) or a multivariate probability density function
-(e.g., \cite{LeeRabiPierWilp90}); the particular form of the
-observation model is not important for this module.  The smaller,
-filled circle on the left side of the figure is the {\em entry node\/}
-and is a useful graphical device for identifying the {\em starting
-states}.  Similarly, the smaller, filled circle on the right side of
-the figure is the {\em exit node\/} and is useful for identifying the
-{\em stopping states}.  Neither the entry node nor the exit node is
-associated with an observation model; they are just a convenient
-concept for drawing and describing HMM networks.
-        \begin{figure}
-        \begin{center}
-        \input{figs/PhoneHMM1}
-        \end{center}
-        \caption[]{A popular 3-state phonetic HMM network.}
-        \label{fg:phoneHMM1}
-        \end{figure}
-
-
-        With no loss of generality, we can use positive integers to
-index each state in order to represent the digraph structure in the
-computer.  The numbering conventions proposed in
-Chapter~\ref{ch:Pronunciations}, page~\pageref{conventions}, will be
-used here as well.
-
-
-        Another popular phonetic HMM topology is shown in
-Figure~\ref{fg:phoneHMM2}.  Unlike that of Figure~\ref{fg:phoneHMM1},
-this model doesn't allow the second state to be skipped.
-        \begin{figure}
-        \begin{center}
-        \input{figs/PhoneHMM2}
-        \end{center}
-        \caption[]{Another popular 3-state phonetic HMM.}
-        \label{fg:phoneHMM2}
-        \end{figure}
-        A popular model for the silence HMM (``\verb~SIL~'') is shown
-in Figure~\ref{fg:silhmm}; it has only one state.
-        \begin{figure}
-        \begin{center}
-        \input{figs/sil-hmm}
-        \end{center}
-        \caption[]{A one-state HMM for silence ``{\tt SIL}''.}
-        \label{fg:silhmm}
-        \end{figure}
-
-
-        We want to allow quite general HMM topologies to be
-represented.  A more general network that will occasionally be used as
-an example in this chapter is shown in Figure~\ref{fg:phoneHMM3}.
-This HMM has two starting states and two stopping states.  This model
-is not motivated by speech processing considerations, and might turn
-out to be a poor choice if used in an automatic speech recognizer.
-However, because of the multiple starting and stopping states, this
-model is sufficiently complicated to motivate the manner in which some
-of this module's functions are defined.
-        \begin{figure}
-        \begin{center}
-        \input{figs/PhoneHMM3}
-        \end{center}
-        \caption[]{A more general network for a 3-state phonetic HMM.}
-        \label{fg:phoneHMM3}
-        \end{figure}
-
-
-        Note that state 2 of the model in Figure~\ref{fg:phoneHMM3} is
-both a starting state and a stopping state, even though it can be
-preceded by state 1 or followed by state 3 or both.  Thus, to say that
-a state is a ``starting state'' means only that it is possible to
-start in that state.  It does not mean that we have to start in that
-start or that we can't visit that state if we start in a different
-one.  Similarly for stopping states.
-
-
-        The goal of this chapter is to develop functions for building
-HMMs of utterances.  The approach is simple.  We assume that we have
-an HMM for each subword unit, e.g., phones.  We have already developed
-software that takes the text of an utterance and models it as a
-network of subword units (Chapter~\ref{ch:Pronunciations}).  We can
-replace each subword unit by its HMM to get a network of HMMs, which
-can then be reduced to a single HMM for the entire utterance.  For
-example, suppose that the HMM network shown in
-Figure~\ref{fg:phoneHMM1} is used for all of the phonetic HMMs.  Then
-a partial HMM for the word ``EXIT''---which has the pronunciation
-network shown in Figure~\ref{fg:dg2-exit}---would be as shown in
-Figure~\ref{fg:hmmEXIT}.
-        \begin{figure}
-        \begin{center}
-        \input{figs/HmmEXIT}
-        \end{center}
-        \caption[]{A partial HMM for the word ``EXIT.''}
-        \label{fg:hmmEXIT}
-        \end{figure}
-
-
-        An alternative approach to building a whole-utterance HMM is
-to build a pronunciation network containing the subword HMMs and leave
-it in this form; that is, don't reduce the network to a single HMM.
-However, this would then require a more complicated version of the
-Viterbi algorithm (Chapter~\ref{ch:Viterbi}) than we have implemented.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Haskell Representation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Probabilistic Arcs}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        An {\em arc\/} is a link between two nodes in a network.  For
-HMMs, there is a transition probability assigned to each arc.  Such an
-arc is called a {\em probabilistic arc}\index{probabilistic arc}.  A
-probabilistic arc is represented as an ordered pair: a predecessor
-node index and a transition probability.
-        \begin{haskell}{ProbArc}
-
-> type ProbArc = (Int, Float)
-
-\end{haskell}
-
-
-        There is one exception to the interpretation of the first
-coordinate as the index of a predecessor node: for those arcs going
-from the entry node into a starting state, the first coordinate is the
-starting state index.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Nodes}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        A node in a probabilistic digraph is represented as a pair.
-The first component is the data stored with the node (e.g., a phonetic
-symbol, or the parameters that characterize the observation
-probability model), and the second component is the predecessor list
-for that node.
-        \begin{haskell}{ProbDigraphNode}
-
-> type ProbDigraphNode a = (a, [ProbArc])
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Probabilistic Digraphs: List Version}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        The HMM digraph can be represented by collecting the nodes
-together in a list, in the order of their indices.  (This does not
-include arcs from the entry node into the starting states or arcs from
-the stopping states into the exit node.  It is the marking of certain
-states as starting or stopping states that distinguishes a network
-from a digraph.)
-        \begin{haskell}{ProbDigraphL}
-
-> type ProbDigraphL a = [ProbDigraphNode a]
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {HMM Transition Structure}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        To complete the description of the HMM topology, we need to
-include the transitions from the entry node into the starting states,
-called the {\em starting arcs}\index{starting arcs}, and those out of
-the stopping states into the exit node, called the {\em exiting
-arcs}\index{exiting arcs}.  It will also be useful to have the number
-of states explicitly present in the data structure.  Thus, the data
-structure has four fields, arranged in the following order: the number
-of states, the list of starting arcs, the list of exiting arcs, and
-the probabilistic digraph. The type inherits the methods of the class
-\verb~Text~ for easy reading and writing of the data structure.
-        \begin{haskell}{HmmTsL}
-
-> data HmmTsL a = HmmTsL  Int  [ProbArc]  [ProbArc]  (ProbDigraphL a) 
->                 deriving (Read, Show)
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Probabilistic Digraphs: Array Version}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        Probabilistic directed graphs can also be represented using
-arrays for efficient random accessing of node data.  This will be
-especially important for the Viterbi alignment algorithm.  The data
-types based on arrays are distinguished from their list-based
-counterparts by putting an ``A'' at the end of the constructor names
-instead of an ``L.''  The array-based structure does not need to have
-the number of states explicitly represented since it is present in the
-bounds of the array.
-        \begin{haskell}{ProbDigraphA}
-
-> type ProbDigraphA a = Array Int (ProbDigraphNode a)
-
-\end{haskell}
-\fixhaskellspacing\begin{haskell}{HmmTsA}
-
-> data HmmTsA a = HmmTsA  [ProbArc]  [ProbArc]  (ProbDigraphA a)
-
-\end{haskell}
-
-
-        Later it will be convenient to have functions for extracting
-the different constituents of an object of type \verb~HmmTsA~.
-        \begin{haskell}{start_states}
-
-> start_states :: HmmTsA a -> [ProbArc]
-> start_states (HmmTsA is _ _ ) = is
-
-\end{haskell}
-\fixhaskellspacing\begin{haskell}{stop_states}
-
-> stop_states  :: HmmTsA a -> [ProbArc]
-> stop_states  (HmmTsA _ ts _  ) = ts
-
-\end{haskell}
-\fixhaskellspacing\begin{haskell}{prb_digraph}
-
-> prb_digraph :: HmmTsA a -> ProbDigraphA a
-> prb_digraph (HmmTsA _ _ pdg) = pdg
-
-\end{haskell}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Building an Utterance HMM}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        Assuming that we have an HMM for each phone, we now show how
-to take the phonetic pronunciation network of an utterance and build
-an HMM for that utterance.  It will be useful to define the following
-type synonym.
-        \begin{haskell}{HmmState}
-
-> type HmmState = Int
-
-\end{haskell}
-        The pair type \verb~(Phone, HmmState)~ occurs so often in the
-sequel that we define a type synonym for it as well.
-        \begin{haskell}{HmmData}
-
-> type HmmData = (Phone, HmmState)
-
-\end{haskell}
-
-
-        We need to retrieve the HMM parameters from a look-up table.
-This table is implemented as an array.
-        \begin{haskell}{HmmNetworkDic}
-
-> type HmmNetworkDic = Array Phone (HmmTsL HmmState)
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {``{\tt lookupHmms}''}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        Looking at the final network in
-Figure~\ref{fg:flow-upto-hmms}, we note that each node has a pair of
-values as data.  The first is the phone, i.e., which HMM to retrieve
-from the HMM look-up table.  The second is the number of successors
-for that node in the pronunciation network.  This number is used to
-adjust the exit probabilities of the HMM, i.e., the transition
-probabilities associated with the exiting arcs.  We now define a
-function \verb~lookup_an_hmm~ that retrieves an HMM from the look-up
-table, adjusts the exit probabilities, and makes the HMM node data a
-pair consisting of the phone and the state index (the node data for
-the HMM look-up table entries is just the state index).  Note that
-this function assumes that the HMMs in the dictionary use log
-probabilities.
-        \begin{haskell}{lookup_an_hmm}
-
-> lookup_an_hmm :: HmmNetworkDic -> (Phone, Int) -> HmmTsL HmmData
-
-> lookup_an_hmm  hmm_dg_dic  (p,j)  =  HmmTsL n is ts' dg'
->       where
->       HmmTsL n is ts dg = hmm_dg_dic ! p
->       ts' = if j <= 1
->             then ts        -- 0 or 1 successor nodes
->             else let       -- 2 or more successor nodes
->                    log_of_divisor = log (fromIntegral j)
->                  in
->                    [(i,ep - log_of_divisor) | (i,ep) <- ts]
->
->       dg' = mapfst (\s -> (p, s)) dg  -- add the phone symbol to the
->                                       -- HMM node data, leaving the
->                                       -- predecessor list unchanged
-
-\end{haskell}
-
-
-        Now we can take the pronunciation network and change the data
-associated with every node from a pair consisting of the phone and the
-number of successors to an HMM network with modified exit
-probabilities.  Note that the structure of the pronunciation network
-is unchanged; only the node data is changed.
-        \begin{haskell}{lookupHmms}
-
-> lookupHmms :: HmmNetworkDic ->
->               PrnNetwork (Phone, Int) ->
->               PrnNetwork (HmmTsL HmmData)
-
-> lookupHmms  hmm_dic  (PrnN n is ts dg)  =  PrnN n is ts dg'
->       where dg' = mapfst (lookup_an_hmm hmm_dic) dg
-
-\end{haskell}
-
-
-        As a concrete example, consider nodes 5, 6 and 7 in the last
-pronunciation network of Figure~\ref{fg:flow-upto-hmms}.  The
-situation after substituting the HMMs of Figure~\ref{fg:phoneHMM3} for
-the node data for these three nodes is shown in
-Figure~\ref{fg:initial-hmm-sub}.
-        \begin{figure}
-        \begin{center}
-        \input{figs/InitialHMMSub}
-        \end{center}
-        \caption[]{A subportion of the pronunciation network
-for ``PLEASE EXIT NOW'' with 3-state HMMs as the node data.}
-        \label{fg:initial-hmm-sub}
-        \end{figure}
-
-
-        Figure~\ref{fg:final-hmm} shows the portion of the final
-whole-utterance HMM that corresponds to the portion of the
-pronunciation network shown in Figure~\ref{fg:initial-hmm-sub}
-        \begin{figure}
-        \begin{center}
-        \input{figs/CombinedHMMs}
-        \end{center}
-        \caption[]{A subportion of the desired whole-utterance HMM.}
-        \label{fg:final-hmm}
-        \end{figure}
-        The remainder of this section is concerned with defining the
-functions that are needed to transform the structure shown in
-Figure~\ref{fg:initial-hmm-sub} into that of
-Figure~\ref{fg:final-hmm}.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {``{\tt reindexHmms}''}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        One thing we need to do is change the indices associated with
-the nodes of the HMM digraphs, as we did for pronunciation networks.
-It will simplify things to do this to each HMM before merging them.
-That is, we will first go through the pronunciation network and change
-the node indices used within each HMM network representation to the
-indices that these nodes will be assigned when they take their place
-within the whole-utterance HMM.
-
-
-        The function \verb~reindex_an_hmm~ takes a probabilistic
-network whose nodes are indexed from 1 to $n$ (as is the case for the
-HMM networks in the HMM look-up table) and increments them by a
-specified amount.  The node data in the digraph is left unchanged.
-Thus, even through the nodes of each HMM network are assigned new
-indices in order to represent the structure of the final
-whole-utterance network, each HMM node still remembers what phonetic
-HMM and state it came from.  This is necessary so that we can access
-the proper observation probability model during the alignment phase
-(Chapter~\ref{ch:Viterbi}).  Furthermore, this function replaces the
-list representation of the probabilistic digraph by an array
-representation for greater efficiency in the steps that follow.
-        \begin{haskell}{reindex_an_hmm}
-
-> reindex_an_hmm :: Int -> HmmTsL a -> (Int, HmmTsA a)
-
-> reindex_an_hmm  m  (HmmTsL n is ts dg)  =  (m_plus_n, HmmTsA is' ts' dg')
->       where
->       m_plus_n = n+m
->       is' = mapfst (m+) is
->       ts' = mapfst (m+) ts
->       dg' = listArray (m+1, m_plus_n) (mapsnd (mapfst (m+)) dg)
-
-\end{haskell}
-
-
-        We need to re-index every HMM in the pronunciation network.
-The key to doing this easily is to use a modified version of the
-function \verb~mapAccuml~ that is defined in the system library module
-\verb~ListUtil~ provided with the Chalmers compiler.  \verb~mapAccuml~
-is an extension of the Standard Prelude function \verb~map~; the
-difference is that \verb~mapAccuml~ allows a state to be passed along
-the list as part of the calculations.  Our version, called
-\verb~mapAccumlfst~ and defined in the library module \verb~Lists~
-(Chapter~\ref{ch:Lists}), is essentially the same but operates only
-over the first components in a list of pairs, leaving the second
-components unchanged.
-        \begin{haskell}{reindexHmms}
-
-> reindexHmms :: PrnNetwork (HmmTsL HmmData) ->
->                PrnNetwork (HmmTsA HmmData)
-
-> reindexHmms (PrnN n is ts dg)  =  PrnN n is ts dg'
->       where (_, dg') = mapAccumlfst reindex_an_hmm 0 dg
-
-\end{haskell}
-
-
-        The re-indexed HMMs for our example subdigraph are shown in
-Figure~\ref{fg:reindexed-hmms}.
-        \begin{figure}
-        \begin{center}
-        \input{figs/ReindexedHMMs}
-        \end{center}
-        \caption[]{Re-indexed HMMs.  Note that the node data for each
-HMM state is unchanged.  For example, the node with data {\tt (EH,1)}
-will be assigned an index of 19 within the whole-utterance HMM, but it
-remembers via the node data that it came from the first state of the
-HMM for ``{\tt EH}'' so that the proper observation probability model
-can be accessed during Viterbi alignment.}
-        \label{fg:reindexed-hmms}
-        \end{figure}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {``{\tt combineHmms}''}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        Referring again to Figure~\ref{fg:reindexed-hmms}, we see that
-in the whole-utterance HMM the arcs into states 19 and 20 will include
-the exiting arcs of the HMMs associated with pronunciation-network
-nodes 5 and 6 because these are the pronunciation network predecessors
-of node 7.  Thus, the next step in constructing the whole-utterance
-HMM is to modify the individual HMM networks by augmenting the
-predecessor lists of their starting states with the exiting arcs of
-their pronunciation network predecessors.  This task will be performed
-by the function \verb~change_preds~.
-
-
-        The function \verb~change_preds~ works on a single node in the
-pronunciation digraph.  The first argument is an array of all the HMMs
-in the pronunciation network.  The second argument is the node to be
-changed.  Once we have modified the predecessor lists of the starting
-states, we only need the probabilistic digraph in future calculations,
-not the entire HMM, so only the digraph part of the HMM is returned.
-
-
-        The calculation is summarized as follows.  For a given
-pronunciation network node $n$, let $i$ be the index of any of the
-starting states of the associated HMM and let $\pi_i$ be its starting
-probability.  For each node $j$ in the pronunciation network that is a
-predecessor of $n$, take each exiting arc $(p,q)$ associated with node
-$j$'s HMM and add $(p, q\times \pi_i)$ to the predecessor list of $i$.
-For practical reasons, the HMMs use log probabilities, so the
-multiplication is actually implemented as an addition.
-
-
-        The implementation of \verb~change_preds~ uses the array
-building function \verb~accum~.  The variable \verb~new_preds~ is an
-association list: each starting state $i$ is associated with a list of
-new predecessor states.  This list will be prefixed to $i$'s existing
-list of predecessor states using the binary operator \verb~op~.  The
-function \verb~accum~ can be used because the probabilistic digraph
-\verb~pdg~ is represented using an array.
-        \begin{haskell}{change_preds}
-
-> change_preds :: Array Int (HmmTsA HmmData)    ->
->                 DigraphNode (HmmTsA HmmData)  ->
->                 ProbDigraphA HmmData
-
-> change_preds  hmma  (HmmTsA is _ pdg, ps)  =  accum op pdg new_preds
->     where
->     new_preds = [(i, [(p, q + pi_i) | j <- ps,
->                                       (p,q) <- stop_states (hmma!j)])
->                  | (i, pi_i) <- is ]
->
->     (x, y) `op` z = (x, z++y)
-
-\end{haskell}
-
-
-        The function \verb~combineHmms~ determines the starting and
-stopping states of the whole-utterance HMM, and uses the function
-\verb~change_preds~ to modify each HMM before collapsing the network
-of HMMs down to a single HMM.
-        \begin{haskell}{combineHmms}
-
-> combineHmms :: PrnNetwork (HmmTsA HmmData) -> HmmTsA HmmData
-
-> combineHmms (PrnN n is ts dg) = HmmTsA is' ts' dga
->       where
->       (hmms, _) = unzip dg
->       hmma      = listArray (1,n) hmms
->
->       is'       = concat [start_states (hmma ! i) | i <- is]
->       ts'       = concat [stop_states  (hmma ! t) | t <- ts]
->
->       n'        = snd (bounds (prb_digraph (hmma ! n)))
->       new_hmms  = concat (map (assocs . change_preds hmma) dg)
->       dga       = array (1,n') new_hmms
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {``{\tt buildHmm}''}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        We now collect the functions defined in the previous
-subsections into a single function \verb~buildHmm~ that transforms a
-pronunciation network into an hmm.
-        \begin{haskell}{buildHmm}
-
-> buildHmm :: HmmNetworkDic -> PrnNetwork (Phone,Int) -> HmmTsA HmmData
-
-> buildHmm hmm_dgs =  combineHmms . reindexHmms . lookupHmms hmm_dgs
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Reading HMMs from a Plain Text File}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        We keep the network descriptions and the observation models
-(Chapter~\ref{ch:HmmDensities}) in separate files.  For the network
-descriptions, the file is a plain text file containing an association
-list of phone symbols and their HMM networks.  The HMM networks are
-stored using probabilities for easy reading and modification; the
-function \verb~build_hmm_array~ converts the probabilities to the log
-domain.  An example of a portion of a HMM network file is shown in
-Figure~\ref{fg:hmm.dgs}; the HMMs in this file have the topology shown
-in Figure~\ref{fg:phoneHMM2}.
-        \begin{figure}
-        \input{figs/hmm.dgs}
-        \caption[]{An example of a portion of a plain-text HMM network
-description file.}
-        \label{fg:hmm.dgs}
-        \end{figure}
-
-
-        The following functions are for reading the plain-text HMM
-network descriptions.  The function \verb~readElements~ is defined in
-the library module \verb~PlainTextIO~ (Chapter~\ref{ch:PlainTextIO}).
-The function \verb~readElements~ is polymorphic; it is all we need
-since we declared the type \verb~HmmTsL~ to be a member of the class
-\verb~Text~.
-        \begin{haskell}{readHmms}
-
-> readHmms :: [Char] -> [(Phone, (HmmTsL Int))]
-> readHmms = readElements
-
-\end{haskell}
-
-
-        The HMMs are stored in an array for efficient random access.
-        \begin{haskell}{build_hmm_array}
-
-> build_hmm_array :: [(Phone, (HmmTsL HmmState))] ->
->                     Array Phone (HmmTsL HmmState)
-> build_hmm_array = array phone_bounds
-
-\end{haskell}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Converting to Log Probabilities}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        Although it is convenient to initialize and study HMMs using
-probabilities, the Viterbi algorithm is more efficiently implemented
-using log probabilities.  The function \verb~get_log_probs~ converts
-the probabilities for all HMMs in an array.
-        \begin{haskell}{get_log_probs}
-
-> get_log_probs :: (Ix a) => Array a (HmmTsL b) -> Array a (HmmTsL b)
-> get_log_probs = amap convert_to_log_probs
-
-\end{haskell}
-
-
-        The function \verb~convert_to_log_probs~ converts
-probabilities to log probabilities for a single HMM.  If a probability
-is too small, however, we replace its true log by a floor value.
-        \begin{haskell}{convert_to_log_probs}
-
-> convert_to_log_probs :: HmmTsL a -> HmmTsL a
-
-> convert_to_log_probs (HmmTsL n is ts dg) = HmmTsL n is' ts' dg'
->       where
->       is' = mapsnd safelog is
->       ts' = mapsnd safelog ts
->       dg' = mapsnd (mapsnd safelog) dg
->       safelog x = if x <= 1.0e-05 then  -11.5129255 else log x
-
-\end{haskell}
-
-
-%%%%%%%%%%  End of HmmDigraphs.lhs  %%%%%%%%%%
diff --git a/real/HMMS/Jmakefile b/real/HMMS/Jmakefile
deleted file mode 100644 (file)
index 751b325..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/* this program uses "native" files on a Sun; so
-   it may not work on other platforms (without
-   regenerating the "native" files -- feel free...).
-   See "setup" below.
-*/
-#if ! sparc_HOST_ARCH
-all depend runtests ::
-       @echo '*** HMMS test only works on SPARC machines ****'
-#else
-
-/* extra stuff for "setup" is at the end */
-
-SRCS_LHS =  Alignments.lhs     \
-           BalBinSTrees.lhs    \
-           Extrema.lhs         \
-           HmmConstants.lhs    \
-           HmmDensities.lhs    \
-           HmmDigraphs.lhs     \
-           Lists.lhs           \
-           MathTypes.lhs       \
-           MaybeStateT.lhs     \
-           NativeIO.lhs        \
-           Phones.lhs          \
-           PlainTextIO.lhs     \
-           Pronunciations.lhs  \
-           StateT.lhs          \
-           Viterbi.lhs         \
-           BatchAlign.lhs /* Main */ \
-           BatchTranscribe.lhs /* extras here on */ \
-           ConvertLinearDic.lhs
-
-/* OBJS_O is for the BatchAlign pgm only -- important */
-OBJS_O =    Alignments.o       \
-           BalBinSTrees.o      \
-           Extrema.o           \
-           HmmConstants.o      \
-           HmmDensities.o      \
-           HmmDigraphs.o       \
-           Lists.o             \
-           MathTypes.o         \
-           MaybeStateT.o       \
-           NativeIO.o          \
-           Phones.o            \
-           PlainTextIO.o       \
-           Pronunciations.o    \
-           StateT.o            \
-           Viterbi.o           \
-           BatchAlign.o
-
-MKDEPENDHS_OPTS = -syslib hbc /* really should not be here (ToDo) */
-
-NoFibMultiModuleCompileAndRun(HMMS, -o2 HMMS.stderr hmms/h9 hmms/h9.ties hmms/h9.dgs sentences)
-
-NoFibHaskellCompile(HMMS,Alignments,lhs)
-NoFibHaskellCompile(HMMS,BalBinSTrees,lhs)
-NoFibHaskellCompile(HMMS,Extrema,lhs)
-NoFibHaskellCompile(HMMS,HmmConstants,lhs)
-NoFibHaskellCompile(HMMS,HmmDensities,lhs)
-NoFibHaskellCompile(HMMS,HmmDigraphs,lhs)
-NoFibHaskellCompile(HMMS,Lists,lhs)
-NoFibHaskellCompile(HMMS,MathTypes,lhs)
-NoFibHaskellCompile(HMMS,MaybeStateT,lhs)
-NoFibHaskellCompile(HMMS,NativeIO,lhs)
-NoFibHaskellCompile(HMMS,Phones,lhs)
-NoFibHaskellCompile(HMMS,PlainTextIO,lhs)
-NoFibHaskellCompile(HMMS,Pronunciations,lhs)
-NoFibHaskellCompile(HMMS,StateT,lhs)
-NoFibHaskellCompile(HMMS,Viterbi,lhs)
-NoFibHaskellCompile(HMMS,BatchAlign,lhs)
-
-/* extras: a slightly unkosher way to do this */
-NoFibHaskellCompile(HMMS,BatchTranscribe,lhs)
-NoFibHaskellCompile(HMMS,ConvertLinearDic,lhs)
-
-NoFibDependTarget(HMMS, $(SRCS_LHS))
-
-OBJS_BatchTranscribe  =        BalBinSTrees.o      \
-                       Pronunciations.o    \
-                       Lists.o             \
-                       MaybeStateT.o       \
-                       PlainTextIO.o       \
-                       StateT.o            \
-                       Phones.o            \
-                       BatchTranscribe.o
-
-OBJS_ConvertLinearDic = Phones.o           \
-                       ConvertLinearDic.o
-
-BatchTranscribe : $(OBJS_BatchTranscribe)
-       $(HC) -o BatchTranscribe $(HCFLAGS) $(OBJS_BatchTranscribe) -syslib hbc
-
-ConvertLinearDic : $(OBJS_ConvertLinearDic)
-       $(HC) -o ConvertLinearDic $(HCFLAGS) $(OBJS_ConvertLinearDic) -syslib hbc
-
-setup : BatchTranscribe ConvertLinearDic
-       @echo "*** Running part of app/test/demo to set up ***"
-       @echo " "
-       @echo Running ConvertLinearDic
-       @echo " "
-       ./ConvertLinearDic dictionary.0
-       @echo " "
-       @echo Running BatchTranscribe
-       @echo " "
-       ./BatchTranscribe  dictionary.0.dgs sentences
-       @echo " "
-       @echo "*** Ready to run BatchAlign (via: make runtests) ***"
-
-#endif
diff --git a/real/HMMS/Lists.lhs b/real/HMMS/Lists.lhs
deleted file mode 100644 (file)
index 6b43e3d..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-        This module provides a number of useful general purpose
-functions for processing lists that are not provided in the Haskell
-Standard Prelude.
-        \begin{haskell}{Lists}
-
-> module Lists( blocks, interleave, interleaveRight,
->               mapfst, mapsnd, mapAccumlfst,
->               foldr1_2op,
->               hamming
->       ) where
-> import Data.List(genericSplitAt)
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section*{blocks}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        The function \verb~blocks~ breaks a list into a list of
-non-overlapping fixed-length sublists (``blocks''), except that the
-last block may be shorter than the requested block-size.  Note that
-\verb~blocks 0~ applied to a non-empty list returns an infinite list
-of empty lists.
-        \begin{haskell}{blocks}
-
-> blocks        :: (Integral b) => b -> [a] -> [[a]]
-> blocks n []  =  []
-> blocks n xs   =  block : blocks n rest
->       where
->      (block, rest) = genericSplitAt n xs
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section*{interleave, interleaveRight}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        \begin{haskell}{interleave}
-
-> interleave a xs = a : interleaveRight a xs
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{interleaveRight}
-
-> interleaveRight a (x:xs) = x : a : interleaveRight a xs
-> interleaveRight a   []   = []
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section*{mapfst, mapsnd}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        It will be useful to be able to apply a function pointwise to
-the first components in a list of pairs, leaving the second components
-untouched.  The function \verb~mapfst~ provides this capability.
-        \begin{haskell}{mapfst}
-
-> mapfst                :: (a -> c) -> [(a, b)] -> [(c, b)]
-> mapfst  _  []         =  []
-> mapfst  f ((a,b):rps) =  (f a, b) : mapfst f rps
-
-\end{haskell}
-
-        The function \verb~mapsnd~ applies a function to the second
-components in a list of pairs, leaving the first components untouched:
-        \begin{haskell}{mapsnd}
-
-> mapsnd                :: (b -> c) -> [(a, b)] -> [(a, c)]
-> mapsnd  _  []         =  []
-> mapsnd  f ((a,b):rps) = (a, f b) : mapsnd f rps
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section*{mapAccumlfst}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        This function is a modified version of the function
-\verb~mapAccuml~ provided with \verb~hbc~ in the library module
-\verb~ListUtil~.  This version transforms only the first coordinates
-of a list of pairs, leaving the second coordinates untouched.
-        \begin{haskell}{mapAccumlfst}
-
-> mapAccumlfst :: (s -> a -> (s,b)) ->
->                 s ->
->                 [(a,c)] ->
->                 (s, [(b,c)])
-
-> mapAccumlfst f s []          = (s, [])
-> mapAccumlfst f s ((x,d):rps) = (s'', (y,d):rys)
->       where
->       (s', y)    = f s x
->       (s'', rys) = mapAccumlfst f s' rps
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section*{foldr1\_2op}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        This is a variant of the Standard Prelude function
-\verb~foldr1~ that takes two operators.
-        \begin{haskell}{foldr1_2op}
-
-> foldr1_2op  op1 _   [x,y]     =  x `op1` y
-> foldr1_2op  op1 op2 (x:y:rxs) = (x `op1` y) `op2` foldr1_2op op1 op2 rxs
-> foldr1_2op  _   _   []        = error "foldr1_2op []"
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section*{hamming}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        The function \verb~hamming~ counts the number of positions in
-which two equal-length lists differ.  Obviously, generalizations could
-be defined for lists of different length, but our only application at
-the moment is for lists of equal length.
-        \begin{haskell}{hamming}
-
-> hamming :: (Eq a) => [a] -> [a] -> Int
-
-> hamming (x:rxs) (y:rys)
->       | x == y        =     hamming rxs rys
->       | otherwise     = 1 + hamming rxs rys
-
-> hamming []    []      = 0
-
-> hamming []   (_:_)    = error hamming_error
-
-> hamming (_:_) []      = error hamming_error
-
-> hamming_error = "hamming applied to two lists having different lengths"
-
-\end{haskell}
-
-%%%%%%%%%%  End of Lists.lhs  %%%%%%%%%%
diff --git a/real/HMMS/Makefile b/real/HMMS/Makefile
deleted file mode 100644 (file)
index e02c1c4..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-# this program uses "native" files on a Sun; so
-#  it may not work on other platforms (without
-#  regenerating the "native" files -- feel free...).
-#  See "setup" below.
-#
-
-TOP=../..
-include $(TOP)/mk/boilerplate.mk
-
-# if ! sparc_HOST_ARCH
-#all depend runtests ::
-#      @echo '*** HMMS test only works on SPARC machines ****'
-#else
-#
-
-# extra stuff for "setup" is at the end 
-
-HS_SRCS =  Alignments.lhs      \
-          BalBinSTrees.lhs     \
-          Extrema.lhs          \
-          HmmConstants.lhs     \
-          HmmDensities.lhs     \
-          HmmDigraphs.lhs      \
-          Lists.lhs            \
-          MathTypes.lhs        \
-          MaybeStateT.lhs      \
-          NativeIO.lhs \
-          Phones.lhs           \
-          PlainTextIO.lhs      \
-           Pronunciations.lhs  \
-          StateT.lhs           \
-          Viterbi.lhs          \
-           BatchAlign.lhs      \
-          BatchTranscribe.lhs \
-          ConvertLinearDic.lhs
-
-# OBJS_O is for the BatchAlign pgm only -- important
-
-HS_OBJS =   Alignments.o       \
-           BalBinSTrees.o      \
-           Extrema.o           \
-           HmmConstants.o      \
-           HmmDensities.o      \
-           HmmDigraphs.o       \
-           Lists.o             \
-           MathTypes.o         \
-           MaybeStateT.o       \
-           NativeIO.o          \
-           Phones.o            \
-           PlainTextIO.o       \
-           Pronunciations.o    \
-           StateT.o            \
-           Viterbi.o           \
-           BatchAlign.o
-
-PROG_ARGS = hmms-data/h9 hmms-data/h9.ties hmms-data/h9.dgs sentences
-SRC_HC_OPTS += -fglasgow-exts -syslib util -cpp
-
-OBJS_BatchTranscribe  =        BalBinSTrees.o      \
-                       Pronunciations.o    \
-                       Lists.o             \
-                       MaybeStateT.o       \
-                       PlainTextIO.o       \
-                       StateT.o            \
-                       Phones.o            \
-                       BatchTranscribe.o
-
-OBJS_ConvertLinearDic = Phones.o           \
-                       ConvertLinearDic.o
-
-BatchTranscribe : $(OBJS_BatchTranscribe)
-       $(HC) -o BatchTranscribe $(HC_OPTS) $(OBJS_BatchTranscribe) -syslib hbc
-
-ConvertLinearDic : $(OBJS_ConvertLinearDic)
-       $(HC) -o ConvertLinearDic $(HC_OPTS) $(OBJS_ConvertLinearDic) -syslib hbc
-
-setup : BatchTranscribe ConvertLinearDic
-       @echo "*** Running part of app/test/demo to set up ***"
-       @echo " "
-       @echo Running ConvertLinearDic
-       @echo " "
-       ./ConvertLinearDic dictionary.0
-       @echo " "
-       @echo Running BatchTranscribe
-       @echo " "
-       ./BatchTranscribe  dictionary.0.dgs sentences
-       @echo " "
-       @echo "*** Ready to run BatchAlign (via: make runtests) ***"
-
-#
-# Standard trgts
-# 
-include $(TOP)/mk/target.mk
diff --git a/real/HMMS/MathTypes.lhs b/real/HMMS/MathTypes.lhs
deleted file mode 100644 (file)
index c631d8f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-        \begin{haskell}{MathTypes}
-
-> module MathTypes( Vector ) where
-
-\end{haskell}
-
-        \begin{haskell}{Vector}
-
-> type Vector = [Float]
-
-\end{haskell}
diff --git a/real/HMMS/MaybeStateT.lhs b/real/HMMS/MaybeStateT.lhs
deleted file mode 100644 (file)
index adc3a8d..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-        This module implements the {\em maybe state transformer},
-which is the state transformer monad (Chapter~\ref{ch:StateT}) coupled
-with the ``Maybe'' monad, where the ``Maybe'' type is wrapped around
-the pair containing the result and the new state.  This approach to
-combining the State Transformer monad with another monad was suggested
-in~\cite{KingWadl93}.  The ``Maybe'' type is implemented in the
-\verb~hbc~ library module \verb~Maybe~.  Like the state transformer,
-the maybe state transformer represents a calculation that takes an
-initial state and returns a result paired with a new value of the
-state; however, the maybe state transformer is used when it is
-possible for the calculation to fail.  We mostly use this monad to
-structure functions that read data files.
-        \begin{haskell}{MaybeStateT}
-
-> module MaybeStateT(
->#ifndef __GLASGOW_HASKELL__
->       module Maybe,
->#endif
->       MST,
->       returnMST, bindMST, thenMST
->       ) where
-
->#ifndef __GLASGOW_HASKELL__
-> import Maybe
->#endif
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{MST}
-
-> type MST s a  =  s -> Maybe (a, s)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{returnMST}
-
-> returnMST     :: a -> MST s a
-> returnMST x   = \s -> Just (x, s)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{bindMST}
-
-> bindMST       :: MST s a -> (a -> MST s b) -> MST s b
-> bindMST m k s =  m s `thenM` \(x, s') -> k x s'
->   where
->     m `thenM` k = case m of
->                Nothing -> Nothing
->                Just a  -> k a
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{thenMST}
-
-> thenMST       :: MST s a -> (a -> MST s b) -> MST s b
-> thenMST m k s =  case  m s of
->                  Nothing      -> Nothing
->                  Just (x, s') -> k x s'
-
-\end{haskell}
diff --git a/real/HMMS/NativeIO.lhs b/real/HMMS/NativeIO.lhs
deleted file mode 100644 (file)
index 11802d1..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-        \begin{haskell}{NativeIO}
-
-> module NativeIO( module Native,  module MaybeStateT, module NativeIO ) where
-
-> import Native
-
-> import MaybeStateT
-
-\end{haskell}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Functions for Reading Data}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        The function \verb~readVectors~ reads as many lists of values
-having length \verb~n~ as it can from the binary stream \verb~bs~.
-When it can't read any more, it stops.  If there are left-over bytes,
-an error is signaled and execution will stop. Since reading vector
-signals is such a common task, we create a specialized version of
-\verb~readVectors~ for this case.
-        \begin{haskell}{readVectors}
-
-> {-# SPECIALIZE readVectors :: Int -> Bytes -> [[Float]] #-}
-
-> readVectors :: (Native a) => Int -> Bytes -> [[a]]
-
-> readVectors n bs =
->       case (listReadBytes n bs) of
->       Nothing         -> if null bs
->                          then []
->                          else error "there are left-over bytes!"
->       Just (x,bs')   -> x : readVectors n bs'
-
-\end{haskell}
-
diff --git a/real/HMMS/Phones.lhs b/real/HMMS/Phones.lhs
deleted file mode 100644 (file)
index 85cbc7a..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-
-        \begin{haskell}{Phones}
-
-> module Phones( Phone(..), phone_bounds, phone_list ) where
-> import Data.Ix
-
-\end{haskell}
-
-
-        The symbols for the basic within-word sounds as well as the
-between-word sounds are defined as data constructors for the type
-\verb~Phone~:
-        \begin{haskell}{Phone}
-
-> data Phone =
->       -- within-word sounds --
->       AA  | AE  | AH | AO | AW | AX | AXR | AY |      -- vowels
->       EH  | ER  | EY | IH | IX | IY | OW  | OY |
->       UH  | UW  |
->       L   | EL  | R  | W  | Y  |                      -- semivowels
->       M   | N   | EN | NG |                           -- nasals
->       F   | TH  | S  | SH | HH |                      -- fricatives
->       V   | DH  | Z  | ZH |
->       CH  | JH  |                                     -- affricates
->       P   | T   | K  | B  | D  | G  |                 -- stops
->       DX  |                                           -- flap
->       -- between-word sounds --
->       SIL                                             -- silence
->       deriving (Eq, Ord, Enum, Ix, Read, Show)
-
-\end{haskell}
-        The data constructors are the same as a subset of the symbols
-in the ``ARPAbet'' phonetic alphabet~\cite[Table 2.1, p.\
-24]{RabiJuan93}, except for the ``\verb~SIL~'' constructor which is
-represented in the ARPAbet as ``h\#.'' As in \cite[Table II]{Lee90},
-\cite[Table 2.1]{RabiJuan93}, and \cite[Table I]{LeeRabiPierWilp90},
-the relationships between the phonetic symbols and the sounds they
-represent are shown by example in Table~\ref{tb:phones}.
-        \begin{table}
-        \caption[]{The phonetic symbols and their corresponding sounds
-using examples from general North American English.}
-        \label{tb:phones}
-        \begin{center}
-\begin{tabular}{|ll|ll|ll|}
-\hline
-Symbol & Example & Symbol & Example & Symbol & Example \\
-\hline
-%%
-AA & b\underline{o}b &
-ER & b\underline{ir}d &
-P  & \underline{p}o\underline{p}  \\
-%%
-AE & b\underline{a}t &
-EY & b\underline{ay} &
-R  & \underline{r}ay  \\ 
-%%
-AH & b\underline{u}tt &
-F  & \underline{f}ee &
-S  & \underline{s}ee  \\  
-%%
-AO & b\underline{ough}t &
-G  & \underline{g}i\underline{g} &
-SH & \underline{sh}e  \\  
-%%
-AW & b\underline{ou}t &
-HH & \underline{h}ay &
-T  & \underline{t}o\underline{t}  \\
-%%
-AX & \underline{a}gain &
-IH & b\underline{i}t &
-TH & \underline{th}in \\
-%%
-AXR & din\underline{er} &
-IX & ros\underline{e}s &
-UH & b\underline{oo}k \\
-%%
-AY & b\underline{uy} &
-IY & b\underline{ee} &
-UW & b\underline{oo}t \\
-%%
-B  & \underline{b}o\underline{b} &
-JH & \underline{j}u\underline{dge} &
-V  & \underline{v}ee  \\
-%%
-CH & \underline{ch}ur\underline{ch} &
-K  & \underline{k}i\underline{ck} &
-W  & \underline{w}ee  \\
-%%
-D  & \underline{d}i\underline{d} &
-L  & \underline{l}ay &
-Y  & \underline{y}ou  \\
-%%
-DH & \underline{th}ey &
-M  & \underline{m}o\underline{m} &
-Z  & \underline{z}oo  \\
-%%
-DX & bu\underline{tt}er &
-N  & \underline{n}o\underline{n} &
-ZH & a\underline{z}ure \\
-%%
-EL & bott\underline{le} &
-NG & si\underline{ng} &
-   & \\
-%%
-EH & b\underline{e}t &
-OW & b\underline{oa}t &
-   & \\
-%%
-EN & butt\underline{on} &
-OY & b\underline{oy} &
-   & \\
-%%
- & &   & &   &  \\
-\hline
-\end{tabular}
-        \end{center}
-        \end{table}
-
-
-        The variable \verb~phone_bounds~ is a pair comprised of the
-first and last phones.  It can be used for specifying array bounds.
-        \begin{haskell}{phone_bounds}
-
-> phone_bounds = (AA, SIL)
-
-\end{haskell}
-        The variable \verb~phone_list~ is the complete list of
-phones:
-        \begin{haskell}{phone_list}
-
-> phone_list = range phone_bounds
-
-\end{haskell}
-
-
-        The list of phones provided here is sufficient to cover all
-English words.  However, for better recognition accuracy, we may want
-to expand the symbol set to allow finer distinctions, e.g., {\em
-context-dependent phones\/}~\cite[Section 2.6.3]{LeeRabiPierWilp90}.
-On the other hand, when building recognizers for small-vocabulary
-tasks such as digit or isolated letter recognition, this set could be
-reduced.
diff --git a/real/HMMS/PlainTextIO.lhs b/real/HMMS/PlainTextIO.lhs
deleted file mode 100644 (file)
index 5275edf..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-        \begin{haskell}{PlainTextIO}
-
-> module PlainTextIO( module MaybeStateT, module PlainTextIO ) where
-
-> import MaybeStateT
-> import Data.Char(isSpace)--1.3
-
-\end{haskell}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Functions for Reading Data}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        The function \verb~readElements~ reads a list from a character
-stream where that stream contains just the plain-text representations
-of the elements of the list one after the other but {\em without\/}
-the Haskell list notation, i.e., without the starting and ending
-square bracks and commas between the elements.  It is important to
-note that it is {\em only\/} intended for reading from character
-streams that contain {\em only\/} the desired list elements and
-nothing else; any characters which can't be parsed to a produce an
-element of the desired type will cause a fatal error.
-
-        Most often, \verb~readElements~ will be used to read the
-contents of a file.  However, \verb~readElements~ can be used to
-extract lists from any character stream---provided that the stream
-contains nothing but legal list elements---so another common use might
-be to use it to extract lists from the end of each line of a file,
-e.g., a pronunciation dictionary.
-
-        The reason we explicitly drop whitespace prior to applying
-\verb~reads~ is that this allows us to easily check for the
-end-of-file condition if \verb~reads~ can't produce a parse.  If
-\verb~reads~ can't produce a parse and we haven't reached the end of
-the file, we halt the program and print out a message. That message
-includes up to 32 characters from the input stream to help the user
-find the problem.
-        \begin{haskell}{readElements}
-
-> readElements :: (Read a) => [Char] -> [a]
-> readElements cs =
->       let cs' = dropWhile isSpace cs in
->       case reads cs' of
->       [(x,cs'')]   -> x : readElements cs''
->
->       []           -> if null cs'
->                       then []
->                       else error ("readElements: unparsable chars \ 
->                                  \encountered:\n\n" ++ take 32 cs'
->                                  ++ "\n")
->
->       _            -> error ("readElements: ambiguous parse:\n\n"
->                              ++ take 32 cs' ++ "\n")
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{readsItem}
-
-> readsItem :: (Read a) => MST [Char] a
-> readsItem cs =
->       case reads cs of
->       [(a, cs')] -> Just (a, cs')
->       _          -> Nothing
-
-\end{haskell}
-
-        Some special versions of \verb~readsItem~ for when the type
-checker would have difficulty deriving the type of the data to be
-read.
-        \begin{haskell}{readsInt}
-
-> readsInt :: MST [Char] Int
-> readsInt = readsItem
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{readsFloat}
-
-> readsFloat :: MST [Char] Float
-> readsFloat = readsItem
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Functions for ``Pretty Printing''}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-Another way of defining pprintElements might be
-
-        pprintElements f = unlines . map f
-
-where f is a showing function, but then we don't have the
-third-argument accumulator string.
-
-
-        \begin{haskell}{pprintElements}
-
-> pprintElements :: (a -> String -> String) -> [a] -> String -> String
-
-> pprintElements  f  (x:xs)  s =
->       f x ('\n' : pprintElements f xs s)
-
-> pprintElements  _   []     s = s
-
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{pprintAsList}
-
-> pprintAsList :: (a -> String -> String) -> [a] -> String -> String
-
-> pprintAsList  f  xs    s = '[' : pprintAsList' f xs s
-
-> pprintAsList' _  []    s = "]\n" ++ s
-
-> pprintAsList' f (x:xs) s
->       | null xs        = f x (" ]\n" ++ s)
->       | otherwise      = f x (",\n " ++ pprintAsList' f xs s)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{consNewLine}
-
-> consNewline :: String -> String
-
-> consNewline = ('\n' :)
-
-\end{haskell}
diff --git a/real/HMMS/Pronunciations.lhs b/real/HMMS/Pronunciations.lhs
deleted file mode 100644 (file)
index 4c0f55a..0000000
+++ /dev/null
@@ -1,898 +0,0 @@
-
-        This module defines data structures for representing
-pronunciation models of words and utterances.
-        \begin{haskell}{Pronunciations}
-
-> module Pronunciations(
->       module Phones,
->       module BalBinSTrees, module MaybeStateT,
->       Word, DigraphNode, Digraph, PrnNetwork(..),
->       DictionaryEntry,
->       readDictionary, readsPrnNetwork, showPrnNetwork,
->       pre_hmm
->       ) where
-> import Data.Char(isSpace,toUpper,isDigit)
-
-\end{haskell}
-
-
-        The following modules are part of a general library and are
-described in later chapters in Part~\ref{part:library}.
-        \begin{verbatim}
-
-> import BalBinSTrees
-> import Lists
-> import MaybeStateT
-> import PlainTextIO
-> import StateT
-> import Prelude hiding (Word)
-
-\end{verbatim}
-
-
-        The module \verb~Phones~ was defined in
-Chapter~\ref{ch:Phones}.
-        \begin{verbatim}
-
-> import Phones
-
-\end{verbatim}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Mathematical Representation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        The pronunciation model for a word is a {\em pronunciation
-network}\index{pronunciation network}, consisting of (1) an acyclic
-directed graph~\cite{Harary69} called the {\em pronunciation
-digraph}\index{pronunciation digraph}, (2) a subset of nodes
-designated as the {\em initial nodes}\index{initial nodes}, and (3) a
-subset of nodes designated as the {\em terminal nodes}\index{terminal
-nodes}. Each node of a pronunciation digraph is associated with some
-data, e.g., a subword unit or a hidden Markov model of a subword unit
-(Chapter~\ref{ch:HmmDigraphs}).
-
-
-        As an example, the pronunciation network for ``EXIT'' is shown
-in Figure~\ref{fg:dg1-exit}.  We represent the written form of a word
-entirely in upper-case letters for consistency with the format used by
-the evaluation software provided by the National Institute of
-Standards and Technology (NIST)\index{NIST}.  The initial nodes---only
-one in this case---are the destination nodes of the arcs eminating
-from the smaller filled circle on the left side of the figure.  The
-terminal nodes---again, only one in this case---are the starting nodes
-of the arcs leading into the smaller filled circle on the right side
-of the figure.  In general, a word can have multiple initial nodes,
-multiple terminal nodes, or both.  The two smaller filled circles are
-used only for displaying the network structure; they do not represent
-nodes in the network. In Figure~\ref{fg:dg1-exit}, the node data are
-data constructors of the type \verb~Phone~, which was defined in
-Chapter~\ref{ch:Phones}.
-        \begin{haskell}{Word}
-
-> type Word = String
-
-\end{haskell}
-        \begin{figure}
-        \begin{center}
-        \input{figs/dg1-EXIT}
-        \end{center}
-        \caption[]{Pronunciation network for ``EXIT.''}
-        \label{fg:dg1-exit}
-        \end{figure}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Haskell Representation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        We need to give a name to each node in order to represent the
-pronunciation network in the computer.  We can't use the phones
-associated with the nodes because the same phone may appear more than
-once within the same word.  Also, the network will undergo a series of
-transformations that will change the data values.  Without loss of
-generality, we elect to use positive integers to name the nodes.  The
-integer assigned to a node is that node's {\em index}\index{index}.
-These indices can be used to construct the predecessor list for each
-node, which is how we will represent the pronunciation digraph.  To
-provide a uniform representation of all the words in the vocabulary
-and to simplify some of the algorithms, we will index the digraph
-nodes according to the following conventions:
-        \begin{enumerate}
-        \label{conventions}
-
-        \item Integers are used in ascending order starting from
-              some positive integer with no skips. (Within the dictionary
-              file, this starting integer will be 1, but
-              under more general circumstances the starting integer
-              could be something different.)
-
-        \item A node's index is always larger than the
-              indices of all the nodes that precede it in the
-              digraph.  A node $x$ {\em precedes\/} a node $y$ if
-              there is a directed path starting at $x$ and ending at
-              $y$~\cite[p.\ 198]{Harary69}.  Thus, the acyclic
-              digraph is {\em topologically sorted}.
-
-        \end{enumerate}
-        Under these conventions, the highest indexed node is always a
-terminal node, but not necessarily the only one (in general, words may
-have more than one terminal node).  Also, the lowest indexed node is
-always an initial node, but, again, not necessarily the only one.
-
-
-        Following these conventions, the nodes of the pronunciation
-network for ``EXIT'' can be indexed as shown in
-Figure~\ref{fg:dg2-exit}.  Other numberings are possible.
-        \begin{figure}
-        \begin{center}
-        \input{figs/dg2-EXIT}
-        \end{center}
-        \caption[]{Pronunciation network for ``EXIT,'' where
-each node has been assigned an index according to the conventions
-listed in the text.}
-        \label{fg:dg2-exit}
-        \end{figure}
-
-
-
-        A single node of a pronunciation digraph is represented as a
-pair.  The first component is the data stored with the node (e.g., the
-phone symbol) and the second component is the predecessor list for
-that node.  By using a type variable for the node data we provide
-ourselves the flexibility of having different digraph types.
-        \begin{haskell}{DigraphNode}
-
-> type DigraphNode a = (a, [Int])
-
-\end{haskell}
-
-
-        There are two obvious possibilities for storing the collection
-of digraph nodes; we could use either a list or an array.  For
-building composite pronunciation networks we will not need to randomly
-access the digraph nodes, so it will be convenient to just use lists.
-        \begin{haskell}{Digraph}
-
-> type Digraph a = [DigraphNode a]
-
-\end{haskell}
-
-
-        The digraph nodes are placed in the list in the order of their
-indices.  Thus, the index for each node is implicitly encoded by its
-position in the list, although it should be remembered that Haskell
-lists are indexed from zero while we are indexing digraph nodes
-starting with 1 in the dictionary and possibly something else in other
-contexts.  Our digraph representation for ``EXIT'' is shown in
-Figure~\ref{fg:dgHaskell-EXIT}.
-        \begin{figure}
-        \begin{verbatim}
- [(EH, []), (K, [1]), (S, [2]), (G, [1]), (Z, [4]), (IX, [3,5]), (T, [6])]
-\end{verbatim}
-        \caption[]{Digraph representation for ``EXIT.''}
-        \label{fg:dgHaskell-EXIT}
-        \end{figure}
-
-
-        The \verb~Digraph~ data structure doesn't include information
-about the initial and terminal nodes, the information needed to
-completely specify a pronunciation network.  To include this
-information, the pronunciation network is represented using an
-algebraic datatype.  The data constructor \verb~PrnN~ (for
-``pronunciation network'') takes four arguments: the highest node
-index used in the digraph representation (this equals the number of
-nodes when the lowest index is 1), the list of initial nodes, the list
-of terminal nodes, and the list-based digraph representation.  We make
-the data type inherit properties from the class \verb~Text~ so we can
-easily read and write the representation as plain text.
-        \begin{haskell}{PrnNetwork}
-
-> data PrnNetwork a = PrnN Int [Int] [Int] (Digraph a)  deriving Show{-was:Text-}
-
-\end{haskell}
-        The Haskell representation for the pronunciation network for
-``EXIT'' is shown in Figure~\ref{fg:pm-EXIT}.
-        \begin{figure}
-        \begin{verbatim}
-     PrnN 7 [1] [7] [(EH, []), (K, [1]), (S, [2]), (G, [1]), (Z, [4]),
-                     (IX, [3,5]), (T, [6])]
-\end{verbatim}
-        \caption[]{Pronunciation network representation for ``EXIT.''}
-        \label{fg:pm-EXIT}
-        \end{figure}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {The User-Supplied Dictionary File}
-\label{sc:dictionary}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        The word ``EXIT'' can be represented in a dictionary file as
-shown in Figure~\ref{fg:dic-exit}.  First there is a line containing
-the word itself.  Then there is a line with three fields: the total
-number of nodes in the network, the list of initial node indices, and
-the list of terminal node indices.  This is followed by a series of
-lines, one for each node.  Each node-description line contains the
-node index, followed by the phone symbol, followed by the predecessor
-list for that node.  The first field of each node-description
-line---the node index---is not really needed, but we include it in the
-file as an aid to checking and modifying word pronunciation networks
-by hand.
-        \begin{figure}
-        \begin{center}
-        \begin{verbatim}
-                         EXIT
-                         7  [1]  [7]
-                         1       EH      []
-                         2       K       [1]
-                         3       S       [2]
-                         4       G       [1]
-                         5       Z       [4]
-                         6       IX      [3,5]
-                         7       T       [6]
-\end{verbatim}
-        \end{center}
-        \caption[]{Dictionary file entry for the word ``EXIT.''}
-        \label{fg:dic-exit}
-        \end{figure}
-
-
-        An example of a dictionary file containing the words ``EXIT,''
-``NOW,'' and ``PLEASE'' is shown in Figure~\ref{fg:dictionary}.  Word
-representations are separated from each other by blank lines.
-        \begin{figure}
-        \begin{center}
-        \begin{verbatim}
-                         EXIT
-                         7  [1]  [7]
-                         1       EH      []
-                         2       K       [1]
-                         3       S       [2]
-                         4       G       [1]
-                         5       Z       [4]
-                         6       IX      [3,5]
-                         7       T       [6]
-
-                         NOW
-                         2  [1]  [2]
-                         1       N       []
-                         2       AW      [1]
-
-                         PLEASE
-                         4  [1]  [4]
-                         1       P       []
-                         2       L       [1]
-                         3       IY      [2]
-                         4       Z       [3]
-
-\end{verbatim}
-        \end{center}
-        \caption[]{An example of a small dictionary file.}
-        \label{fg:dictionary}
-        \end{figure}
-
-
-        Thus, the user-provided dictionary file is a plain text file
-that contains the pronunciation networks for all the words in the
-vocabulary.  The program \verb~ConvertLinearDic~
-(Chapter~\ref{ch:ConvertLinearDic}) can be used to convert a simpler
-form of dictionary file to this format.
-
-
-        We now define the functions used to read the dictionary file.
-We begin with the following type synonym.  A {\em dictionary entry\/}
-is a word paired with its pronunciation network.
-        \begin{haskell}{DictionaryEntry}
-
-> type DictionaryEntry a = (Word, PrnNetwork a)
-
-\end{haskell}
-
-
-        The function \verb~readDictionary~ takes the contents of the
-dictionary file and returns a list of the entries.  Later, these
-entries could be stored in a data structure that provides more
-efficient retrieval than is possible using a linear list.  For
-example, the programs ``Transcribe'' and ``BatchTranscribe'' described
-in Chapters~\ref{ch:Transcribe} and~\ref{ch:BatchTranscribe} will
-convert the dictionary to a balanced binary search tree.  Because of
-the tree-building algorithm used, the entries in the user-supplied
-dictionary file do not have to be in alphabetical order.
-        \begin{haskell}{readDictionary}
-
-> readDictionary :: [Char] -> [DictionaryEntry Phone]
-> readDictionary cs =
->       let
->         (w, cs') = break isSpace (dropWhile isSpace cs)
->       in
->         if null w
->         then  []
->         else  case  readsPrnNetwork cs'  of
->               Nothing         -> error ("readDictionary: can't read \
->                                         \the pronunciation network \
->                                         \for `" ++ w ++ "'")
->               Just (pn, cs'') -> (w, pn) : readDictionary cs''
-
-\end{haskell}
-        In the definition of \verb~readDictionary~, we get the written
-form of the word via the expression \verb~break isSpace (... cs)~
-instead of using the Standard Prelude function \verb~lex~ because we
-want to allow some characters in our words that aren't handled the way
-we want by \verb~lex~, e.g., hyphens.
-
-
-        The function \verb~readsPrnNetwork~ reads the pronunciation
-network information following a word.  We use a ``Maybe State
-Transformer'' monad (Chapter~\ref{ch:MaybeStateT}) to structure the
-code.  We also make the function polymorphic in the node data,
-requiring only that it belong to the class \verb~Text~ so that
-pronunciation networks containing different types of node data can be
-read.  The function \verb~readsItem~ is defined in the module
-\verb~PlainTextIO~ (Chapter~\ref{ch:PlainTextIO}).
-        \begin{haskell}{readsPrnNetwork}
-> readsPrnNetwork :: (Read d) => MST [Char] (PrnNetwork d)
-> readsPrnNetwork = readsItem           `thenMST`  \ n  ->
->                   readsItem           `thenMST`  \ is ->
->                   readsItem           `thenMST`  \ ts ->
->                   readsDigraph n      `thenMST`  \ dg ->
->                   returnMST (PrnN n is ts dg)
-
-\end{haskell}
-
-
-        The function \verb~readsDigraph~ reads in the data for each
-node in the digraph.  This function is also polymorphic in the type of
-the node data.  The first argument, \verb~n~, is the number of nodes
-in the digraph.
-        \begin{haskell}{readsDigraph}
-
-> readsDigraph :: (Read d) => Int -> MST [Char] (Digraph d)
-> readsDigraph n = if n <= 0
->                  then returnMST []
->                  else readsNode            `thenMST` \ node ->
->                       readsDigraph (n-1)   `thenMST` \ rdg ->
->                       returnMST (node : rdg)
-
-\end{haskell}
-
-
-        The function \verb~readsNode~ reads the information for a
-single node of the pronunciation digraph.  The function
-\verb~readsInt~ is defined in the module \verb~PlainTextIO~
-(Chapter~\ref{ch:PlainTextIO}).  We need it because the node index is
-read but discarded by this function, so the type checker wouldn't know
-that \verb~readsItem~ was supposed to be looking for an \verb~Int~.
-Thus, we need to be explicit about the fact that the first item to be
-read is an \verb~Int~.
-        \begin{haskell}{readsNode}
-
-> readsNode :: (Read d) => MST [Char] (DigraphNode d)
-> readsNode = readsInt          `thenMST` \ _  ->       -- node index
->             readsItem         `thenMST` \ d  ->       -- node data
->             readsItem         `thenMST` \ preds ->    -- pred list
->             returnMST (d, preds)
-
-\end{haskell}
-
-
-        For example, applying \verb~readDictionary~ to the file
-shown in Figure~\ref{fg:dictionary} yields the list
-        \begin{verbatim}
-     [ ( "EXIT",   PrnN 7 [1] [7] [(EH,[]), (K,[1]), (S,[2]),
-                                   (G,[1]), (Z,[4]), (IX,[3,5]),
-                                   (T,[6])] ),
-       ( "NOW",    PrnN 2 [1] [2] [(N,[]), (AW, [1])] ),
-       ( "PLEASE", PrnN 4 [1] [4] [(P,[]), (L,[1]), (IY,[2]),
-                                   (Z,[3])] )
-     ]
-\end{verbatim}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Building Pronunciation Networks for Complete Utterances}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        We need to build pronunciation networks for complete
-utterances, not just single words.  This construction is performed as
-a series of steps.  In the following list, the name of the
-corresponding function is shown in parentheses.
-        \begin{itemize}
-
-        \item Convert the text to a canonical form
-(\verb~prepare_text~, Section~\ref{sb:preparetext}).
-
-        \item Break the text into individual words (\verb~words~,
-Standard Prelude).
-
-        \item Look up each word in the pronunciation dictionary
-(\verb~look_up_words~, Section~\ref{sb:lookup}).
-
-        \item Place an optional between-word model
-(Section~\ref{sb:betweenword}) at the beginning of the utterance and
-after each word.
-
-        \item Reindex each pronunciation network
-(\verb~reindexPrnNetworks~, Section~\ref{sb:reindex}).
-
-        \item Join the individual models into a single network model
-for the entire utterance.\footnote{In the first version of this
-module, the reindexing and joining was done within one function.
-While simple, this approach resulted in an algorithm with quadratic
-complexity.}
-
-        \end{itemize}
-
-
-        The flow of processing is summarized in
-Figure~\ref{fg:overall-flow}.  As a concrete example, the models for
-the words ``PLEASE,'' ``EXIT,'' and ``NOW'' and for the utterance
-``PLEASE EXIT NOW'' are shown in Figure~\ref{fg:please-exit-now}.
-        \begin{figure}
-        \begin{center}
-\begin{tabular}{cp{2.3in}}
-\hline
-\rule{0in}{3ex} $Text$ & \\
-$\Downarrow$ & \\
-$Text'$ & Convert to canonical form\\
-$\Downarrow$ & \\
-$[w_1,w_2,\ldots,w_L]$ & break into individual words\\
-$\Downarrow$ & \\
-$[P_{w_1},P_{w_2},\ldots,P_{w_L}]$ & look up the pronunciation models \\
-$\Downarrow$ & \\
-$[P_{bwm},P_{w_1},P_{bwm},P_{w_2},P_{bwm},\ldots,P_{bwm},P_{w_L},P_{bwm}]$
-& interleave the between-word model \\
-$\Downarrow$ & \\
-$[P'_{bwm},P'_{w_1},P'_{bwm},P'_{w_2},P'_{bwm},\ldots,P'_{bwm},P'_{w_L},P'_{bwm}]$
-& reindex each network \\
-$\Downarrow$ & \\
-$P'_{bwm} \oslash ( (P'_{w_1} \oplus P'_{bwm}) \otimes \ldots \otimes
-                    (P'_{w_L} \oplus P'_{bwm}) )$
-& reduce to a single network for the entire utterance \\
-$\Downarrow$ & \\
-$P_{Text}$  & \\[0.10in]
-\hline
-\end{tabular}
-\end{center}
-        \caption[]{Overall flow of processing.  $P_{bwm}$ denotes the
-pronunciation network of the between-word model and $P_{Text}$ denotes
-the pronunciation network for the utterance text.  The operators
-$\oslash$, $\oplus$, and $\otimes$ correspond to the functions
-\verb~joinNets1~, \verb~joinNets2~ and \verb~joinNets~, respectively,
-(Section~\ref{sb:joining}).}
-        \label{fg:overall-flow}
-        \end{figure}
-
-
-        \begin{figure}
-        %
-        \begin{center}
-        \subfigure[``PLEASE'']{%
-        \hbox to 4.00in{
-        \input{figs/dg-PLEASE}}}
-        \end{center}
-        %
-        \begin{center}
-        \subfigure[``EXIT'']{%
-        \input{figs/dg2-EXIT}}
-        \end{center}
-        %
-        \begin{center}
-        \subfigure[``NOW'']{%
-        \hbox to 4.00in{
-        \input{figs/dg-NOW}}}
-        \end{center}
-        %
-        \begin{center}
-        \subfigure[``PLEASE EXIT NOW.'']{%
-        \input{figs/dg-PLEASEEXITNOW}}
-        \end{center}
-        %
-        \caption[]{Pronunciation networks for the words ``PLEASE,''
-``EXIT'' and ``NOW,'' and for the complete utterance ``PLEASE EXIT
-NOW.''  The model for the complete utterance includes an optional
-silence model at the beginning, end, and between each word.}
-        \label{fg:please-exit-now}
-        \end{figure}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Converting the Text to a Canonical Form}
-\label{sb:preparetext}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        The first task is to transform the text string into a
-canonical form.  We define a function \verb~prepare_text~ to perform
-this transformation.  The function implements the following steps:
-        \begin{itemize}
-
-        \item Sometimes the transcription file contains two integers
-preceding the text of the utterance (e.g., the TIMIT ``\verb~.txt~''
-transcription files).  These numbers represent the starting and
-stopping sample numbers for the entire utterance.  We need to remove
-them and any white space that preceeds the text.  Note that the text
-itself cannot start with a digit or the function \verb~prepare_text~
-will remove that too!
-
-        \item Drop any word-external punctuation
-characters.\footnote{Since we control the contents of the textual
-transcription files, we can forbid abbreviations like `e.g.,', `c.f.,'
-etc., requiring that they be spelled out.  This requirement allows us
-to remove all periods without having to check to see if they are part
-of an abbreviation.}  We retain some characters, like hyphens,
-underscores, and tildes.
-
-        \item Change all of the letters in the string to upper-case.
-Each word is represented in the dictionary in only one form, and we
-have chosen to use all upper-case letters since that is consistent
-with NIST's ``snr'' format.
-
-        \end{itemize}
-        \begin{haskell}{prepare_text}
-
-> prepare_text = map toUpper . 
->                  filter (`notElem` "!,.:;?") .
->                    dropWhile (\c -> isDigit c || isSpace c)
-
-\end{haskell}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Looking Up Pronunciation Models}
-\label{sb:lookup}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        \begin{haskell}{look_up_words}
-
-> look_up_words :: BalBinSTree Word (PrnNetwork Phone) ->
->                  [Word] ->
->                  [PrnNetwork Phone]
-
-> look_up_words dictionary = map (bbstLookUp dictionary)
-
-\end{haskell}
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {A Between-Word Model}
-\label{sb:betweenword}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        We create a between-word model to be placed before and at the
-end of an utterance as well as between each word of an utterance.  For
-now this is just silence, represented by the constructor
-\verb~SIL~. Later, we might want to enhance the model to include
-filled pauses, e.g., ``ums'' and ``ahs.''
-        \begin{haskell}{between_word_model}
-
-> between_word_model = PrnN 1 [1] [1] [(SIL,[])]
-
-\end{haskell}
-        The function \verb~interleave~ in the library module
-\verb~Lists~ (Chapter~ref{ch:Lists}) can be used to interleave the
-between-word model through the list of words.
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Reindexing Pronunciation Networks}
-\label{sb:reindex}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        The function \verb~reindexPrnNetwork~ is used to increment the
-node indices by a fixed amount.  It returns the newly indexed network
-and the sum of the increment and the old highest index value.  The
-function uses a State Transformer monad (Chapter~\ref{ch:StateT}).
-        \begin{haskell}{reindexPrnNetwork}
-
-> reindexPrnNetwork :: (PrnNetwork a) -> ST Int (PrnNetwork a)
-> reindexPrnNetwork (PrnN n is ts dg) inc = (PrnN n' is' ts' dg', n')
->       where
->       n'        = n + inc
->       increment = (inc+)
->       is'       = map increment is
->       ts'       = map increment ts
->       dg'       = mapsnd (map increment) dg
-
-\end{haskell}
-
-
-        The function \verb~reindexPrnNetworks~ is used to reindex
-every pronunciation network in a list of such networks, starting with
-an increment of 0.  Thus, the first network in the list will be
-unchanged, the second network's indices will be incremented by the
-number of nodes in the first network, the third network's indices will
-be incremented by the number of nodes in the first two, etc.  The
-functions \verb~maplST~ and \verb~startingFrom~ are defined in the
-module \verb~StateT~ (Chapter~\ref{ch:StateT}).
-        \begin{haskell}{reindexPrnNetworks}
-
-> reindexPrnNetworks :: [PrnNetwork a] -> [PrnNetwork a]
-> reindexPrnNetworks ps = maplST reindexPrnNetwork ps `startingFrom` 0
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Joining Pronunciation Networks}
-\label{sb:joining}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        We now define three functions for joining pronunciation
-networks.  Note that in all three cases, the functions assume that the
-second network of the pair has been properly reindexed so that the new
-combination satisfies our indexing conventions
-(page~\pageref{conventions}).  The required condition is that the
-lowest index of the second network equals the highest index of the
-first network plus 1.
-
-
-
-        The function \verb~joinNets~ joins two pronunciation networks
-into a single pronunciation model where neither network is optional.
-The initial nodes of the new network are those of the first, the
-terminal nodes are those of the second, and every node that is an
-initial node of the second network has its predecessor list augmented
-by the terminal nodes of the first.
-        \begin{haskell}{joinNets}
-
-> joinNets :: PrnNetwork a -> PrnNetwork a -> PrnNetwork a
-
-> joinNets (PrnN n1 is1 ts1 dg1) (PrnN n2 is2 ts2 dg2) =
->       PrnN n2 is1 ts2 dg'
->       where
->       dg' = dg1 ++ [ if k `elem` is2
->                         then  (d, ts1 ++ ps)
->                         else  (d,     ps   )
->                      | (k, (d,ps)) <- zip [n1+1..] dg2 ]
-
-\end{haskell}
-
-
-        We need another version of this function for joining two word
-models when the second word of the pair is optional but the first word
-is not, e.g., when the second word is an optional ``between-word''
-model (Section~\ref{sb:betweenword}).  The only difference between
-\verb~joinNets~ and \verb~joinNets2~ is that \verb~joinNets2~ produces
-a different terminal node list; all of the terminal nodes of the first
-network are also terminal nodes of the new network.
-        \begin{haskell}{joinNets2}
-
-> joinNets2 :: PrnNetwork a -> PrnNetwork a -> PrnNetwork a
-
-> joinNets2 (PrnN n1 is1 ts1 dg1) (PrnN n2 is2 ts2 dg2) =
->       PrnN n2 is1 (ts1 ++ ts2) dg'
->       where
->       dg' = dg1 ++ [ if k `elem` is2
->                         then  (d, ts1 ++ ps)
->                         else  (d,     ps   )
->                      | (k, (d,ps)) <- zip [n1+1..] dg2 ]
-
-
-\end{haskell}
-
-        Finally, we need still another version for joining two
-networks when the first network of the pair is optional but the second
-is not.
-        \begin{haskell}{joinNets1}
-
-> joinNets1 :: PrnNetwork a -> PrnNetwork a -> PrnNetwork a
-
-> joinNets1 (PrnN n1 is1 ts1 dg1) (PrnN n2 is2 ts2 dg2) =
->       PrnN n2 (is1 ++ is2) ts2 dg'
->       where
->       dg' = dg1 ++ [ if k `elem` is2
->                         then  (d, ts1 ++ ps)
->                         else  (d,     ps   )
->                      | (k, (d,ps)) <- zip [n1+1..] dg2 ]
-
-\end{haskell}
-
-        In the future these functions will be modified to incorporate
-word-junction phonological rules\index{phonological rules}.
-
-
-        In order to carry out the last transformation shown in
-Figure~\ref{fg:overall-flow}, we use a two-operator
-generalization of the Standard Prelude function \verb~foldr1~ called
-\verb~foldr1_2op~, defined in the module \verb~Lists~
-(Chapter~\ref{ch:Lists}).
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Modeling an Utterance}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        We now take the tools developed so far and define the
-functions that will take a string like ``PLEASE EXIT NOW'' and return
-its phonetic pronunciation network.  We will also define a function
-that modifies the network in preparation for the use of hidden Markov
-models.  In that version of the network, the node data will be an
-ordered pair.  The first component of the pair will be the phone and
-the second component will be the number of successors of that node in
-the pronunciation digraph.  The number of successors is used to adjust
-the exit probabilities of the corresponding HMM.
-
-
-        The function \verb~build_pron_network~ implements these steps:
-        \begin{haskell}{build_pron_network}
-
-> build_pron_network :: BalBinSTree Word (PrnNetwork Phone) ->
->                       String ->
->                       PrnNetwork Phone
-
-> build_pron_network dictionary =
->         (\(n:rns) -> n `joinNets1` (foldr1_2op joinNets2 joinNets rns))
->       . reindexPrnNetworks
->       . interleave between_word_model
->       . look_up_words dictionary
->       . words
-
-\end{haskell}
-
-
-        In order to properly adjust the exit probabilities for the
-phonetic HMMs, we need to know the number of successors for each node
-in the pronunciation digraph.  This number is made part of the node
-data; specifically, it becomes the second component of an ordered
-pair.
-        \begin{haskell}{add_num_succs}
-
-> add_num_succs :: PrnNetwork a -> PrnNetwork (a, Int)
-
-> add_num_succs  (PrnN n is ts dg)  =  PrnN n is ts dg'
->       where
->       dg' = add_num_succs' 1 dg  -- recall that the first node is
->                                  --   indexed with a `1'
-
-> add_num_succs'  indx  ((d,preds):remnodes) =
->       ((d, nsuccs),preds) : add_num_succs' (indx + 1) remnodes
->       where
->       (_, predls) = unzip remnodes
->       nsuccs      = length (filter (indx `elem`) predls)
-
-> add_num_succs' indx [] = []
-
-\end{haskell}
-
-
-        A flow diagram of the processing up to this point is shown in
-Figure~\ref{fg:flow-upto-hmms}.
-\begin{figure}
-\begin{center}
-        {\tt "PLEASE EXIT, NOW."}
-        \[
-        \Downarrow
-        \]
-        {\tt ["PLEASE", "EXIT,", "NOW."]}
-        \[
-        \Downarrow
-        \]
-        {\tt ["PLEASE", "EXIT", "NOW"]}
-        \[
-        \Downarrow
-        \]
-        \input{figs/word_pieces}
-        \[
-        \Downarrow
-        \]
-        \input{figs/dg-PLEASEEXITNOW}
-        \vspace{-0.50in}
-        \[
-        \Downarrow
-        \]
-        \input{figs/dg2-PLEASEEXITNOW}
-        \end{center}
-        \caption[]{An example showing the flow of processing up to the
-point at which we are ready to incorporate the HMMs.}
-        \label{fg:flow-upto-hmms}
-\end{figure}
-
-        For the program ``BatchTranscribe''
-(Chapter~\ref{ch:BatchTranscribe}) it will be useful to combine these
-functions into a single function that performs all the steps.
-        \begin{haskell}{pre_hmm}
-
-> pre_hmm dic = add_num_succs . build_pron_network dic . prepare_text
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Pretty-Printing a Pronunciation Network}
-\label{sc:pprintNetwork}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        It is useful to have a function to print easily readable
-representations of pronunciation digraphs whenever the node data is in
-the class \verb~Text~.  The function \verb~showPrnNetwork~ prints a
-list-based pronunciation network in the same format as it would appear
-for a word in the dictionary file (see Section~\ref{sc:dictionary}).
-        \begin{haskell}{showPrnNetwork}
-
-> showPrnNetwork  (PrnN n is ts dg) =
->       show n ++ "  " ++ show is ++ "  " ++ show ts ++ "\n"  ++ 
->         unlines (map showIndexedDigraphNode (zip [1..] dg))
-
-\end{haskell}
-\fixhaskellspacing\begin{haskell}{showIndexedDigraphNode}
-
-> showIndexedDigraphNode :: (Show d) => (Int, DigraphNode d) -> String
-> showIndexedDigraphNode (n,(d,ps)) =
->       shows n ('\t' : shows d ("  \t" ++ show ps))
-
-\end{haskell}
-
-
-        Using this pretty-printing function, the results of processing
-the text ``SHOW DEPARTURES FROM ATLANTA FOR AMERICAN,'' one of the Air
-Travel Information System (ATIS) sentences from the ATIS2 database
-distributed by the Linguistic Data Consortium (LDC), is shown in
-Figure~\ref{fg:atis2-example}.
-        \begin{figure}
-        \begin{verbatim}
-                 40  [1, 2]  [39, 40]
-                 1      (SIL, 1)        []
-                 2      (SH, 1)         [1]
-                 3      (OW, 2)         [2]
-                 4      (SIL, 1)        [3]
-                 5      (D, 1)          [3, 4]
-                 6      (AX, 1)         [5]
-                 7      (P, 1)          [6]
-                 8      (AA, 1)         [7]
-                 9      (R, 1)          [8]
-                 10     (CH, 1)         [9]
-                 11     (AXR, 1)        [10]
-                 12     (Z, 2)          [11]
-                 13     (SIL, 1)        [12]
-                 14     (F, 1)          [12, 13]
-                 15     (R, 1)          [14]
-                 16     (AH, 1)         [15]
-                 17     (M, 2)          [16]
-                 18     (SIL, 1)        [17]
-                 19     (AE, 1)         [17, 18]
-                 20     (T, 1)          [19]
-                 21     (L, 1)          [20]
-                 22     (AE, 1)         [21]
-                 23     (N, 1)          [22]
-                 24     (T, 1)          [23]
-                 25     (AX, 2)         [24]
-                 26     (SIL, 1)        [25]
-                 27     (F, 2)          [25, 26]
-                 28     (AO, 1)         [27]
-                 29     (R, 2)          [28]
-                 30     (AXR, 2)        [27]
-                 31     (SIL, 1)        [29, 30]
-                 32     (AX, 1)         [29, 30, 31]
-                 33     (M, 1)          [32]
-                 34     (EH, 1)         [33]
-                 35     (R, 1)          [34]
-                 36     (IX, 1)         [35]
-                 37     (K, 1)          [36]
-                 38     (IX, 1)         [37]
-                 39     (N, 1)          [38]
-                 40     (SIL, 0)        [39]
-        \end{verbatim}
-        \caption[]{The results of applying the function {\tt pre\_hmm}
-to the utterance ``SHOW DEPARTURES FROM ATLANTA FOR AMERICAN'' as
-displayed using the pretty-printing function {\tt showPrnNetwork}.}
-        \label{fg:atis2-example}
-        \end{figure}
-
-
-%%%%%%%%%%  End of Words.lhs  %%%%%%%%%%
diff --git a/real/HMMS/README b/real/HMMS/README
deleted file mode 100644 (file)
index 3060eda..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-
-File:  <whatever>/v2.0/README
-
-Author:  David M. Goblirsch
-        The MITRE Corporation
-        7525 Colshire Drive
-        McLean VA 22102
-        Voice: (703) 883-5450
-        Email: dmgob@mitre.org
-
-       NOTICE: THIS IS COPYRIGHTED FREE SOFTWARE.  YOU MUST READ THE
-COPYRIGHT FILE IN THIS DIRECTORY FOR CONDITIONS OF USE.
-
-
-       This README file is in the main directory of the HMM training
-distribution.  This is the directory that the environmental variable
-HMMS, referred to in the README file in <whatever>/v2.0/app/test and
-in the Makefile in <whatever>/v2.0/src/haskell should be set to:
-
-       % setenv HMMS <whatever>/v2.0
-
-       Note: <whatever> refers to the pathname of the directory in
-which you have unloaded this stuff.
-
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-I.  Overview of Subdirectories
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-       Here is a brief description of what is contained in the
-subdirectories of this main directory.
-
-----------     --------------------------------------------------
-Directory      Purpose
-----------     --------------------------------------------------
-
-app            Applications.  The distribution contains only one
-               application, a ``test'' application with a 27 word
-               vocabulary and 6 example sentences.  The instructions
-               for running the programs are in a README file
-               in the directory app/test.
-
-
-bin            Executables.  This directory is initially empty,
-               and is filled by moving to the directory src/haskell
-               and typing ``make''.  The programs and makefile
-               are originally set up for hbc, the Chalmers compiler.
-               If you edit the makefile and two of the programs,
-               however, you can use ghc v0.19 as well.
-
-
-doc            Documentation; look for the compressed PostScript
-                files.
-
-
-HMMS           HMM parameters.  The HMM topologies are kept in a
-               plain-text file with the extension ``.dgs'' (for
-               ``digraphs'').  The mixture-tying information is
-               kept in a plain-text file with the extension ``.ties''.
-               The Gaussian mixture parameters (means, covariances,
-               component probabilities) are kept in individual
-               binary files in a subdirectory that has the same
-               root name as the .dgs and .ties files.
-               [renamed from "hmms" by partain]
-
-
-lib            General purpose library modules.  The haskell library
-               is created by moving to the directory lib/haskell
-               and typing ``make''.  NOTE:  The library must be made
-               before the programs in the bin directory!  Also,
-               the Makefile is configured for hbc; it needs to be
-               edited to use ghc.
-
-
-src            The subdirectory ``haskell'' contains the HMM training
-                program source code in Haskell v1.2. 
-
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-II. USAGE
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-       This distribution contains the Haskell programs from an HMM
-design suite that has been developed at MITRE as part of our
-internally funded research program.
-
-        Step 1.  In this directory, define the environmental
-        variables HMMS by
-        
-                % setenv HMMS `pwd`
-
-
-        Step 2.  cd to lib/haskell and type ``make''
-
-
-        Step 3.  cd to src/haskell and type ``make''.
-
-        NOTICE: The makefiles are configured for the Chalmers
-distribution, hbc.  But there are commands for using the Glasgow
-distribution, ghc; just edit the makefiles to comment and uncomment
-the appropriate lines.
-
-        WARNING: The program requires hbc 0.999.4 because the HMM
-digraphs file includes the association operator `:=' in the data
-representation, which will not be read properly by hbc 0.999.5.  If
-you don't have access to 0.999.4, you'll have to modify the
-representation by using a different operator in the class Text and
-modifying the appropriate functions.
-
-
-        Step 4.  cd to app/test and read the file README to see
-        how to proceed to test the software up through the program
-        BatchAlign.
-
-        WARNING:  We do not provide enough data to test the program
-        ComputeNewDgs.
-
-
-end of main README
-
diff --git a/real/HMMS/README.nofib b/real/HMMS/README.nofib
deleted file mode 100644 (file)
index c617837..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-We are using "BatchAlign" as the benchmark.
-
-* Copied src/haskell/* to . (this dir)
-* Added a Jmakefile
-* Lifted lib/haskell/*.lhs modules needed by BatchAlign to this dir
-* Lifted app/test/{data,dictionary.0,sentences,vocabulary} to this dir
-
-But you need to be able to run the previous programs (as described in
-app/test/README: ConvertLinearDic & BatchTranscribe), so there's some
-stuff in the Jmakefile to build them, too.  NB: *not* using special
-NoFib macros!  Use "make setup" to build & run previous programs.
diff --git a/real/HMMS/StateT.lhs b/real/HMMS/StateT.lhs
deleted file mode 100644 (file)
index ee1d623..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-
-        This module implements the standard ``State Transformer''
-monad\index{state transformer
-monad}~\cite{Wadler92,Wadler94,KingWadl93}.  Some of the definitions
-in this module are taken from the Glasgow distribution (\verb~ghc~)
-library file
-        \begin{verbatim}
-        src/ghc-0.19/ghc/lib/glaExts/PreludeST.lhs
-        \end{verbatim}
-        and the files
-        \begin{quote}
-        \verb~demos/Cse/stateMonad.gs ~          and
-        \verb~ demos/Ccexamples/ccexamples.gs~
-        \end{quote}
-        that are part of the Gofer
-distribution~\cite{Jones_Gofer2.28,Jones_Gofer2.20}, and are included
-here by permission of the authors.  For an elementary introduction to
-the monadic style of programming, see~\cite{Partain93}.
-        \begin{haskell}{StateT}
-
-> module StateT(
->       ST,
->       returnST, bindST, bindST_, thenST, thenST_,
->       startingFrom, startingWith, maplST, maprST
->       ) where
-
-\end{haskell}
-
-
-        The type constructor \verb~ST~ represents a {\em state
-transformer}\index{state transformer}.  A state transformer represents
-a computation that takes an initial state and returns a result paired
-with a new value of the state.  The type variable \verb~s~ is the type
-of the state and the type variable \verb~a~ is the type of the result.
-        \begin{haskell}{ST}
-
-> type ST s a           =  s -> (a, s)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{returnST}
-
-> returnST              :: a -> ST s a
-> returnST x s          = (x,s)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{bindST}
-
-> bindST                :: ST s a -> (a -> ST s b) -> ST s b
-> bindST m k s          = let  (a, s') = m s  in  k a s'
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{bindST_}
-
-> bindST_               :: ST s a -> ST s b -> ST s b
-> bindST_ m k s         = let  (_, s') = m s  in  k s'
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{thenST}
-
-> thenST                :: ST s a -> (a -> ST s b) -> ST s b
-> thenST m k s          = case  m s  of
->                         (a, s') -> k a s'
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{thenST_}
-
-> thenST_               :: ST s a -> ST s b -> ST s b
-> thenST_ m k s         = case  m s  of
->                         (_, s') -> k s'
-
-\end{haskell}
-
-
-        The function \verb~startingWith~ applies a state transformer
-to an initial state and returns a pair containing the final result and
-the final state, while the function \verb~startingFrom~ returns only
-the final result, dropping the final state.
-        \begin{haskell}{startingWith}
-
-> startingWith          :: ST s a -> s -> (a, s)
-> m `startingWith` s0   =  m s0
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{startingFrom}
-
-> startingFrom          :: ST s a -> s -> a
-> m `startingFrom` s0   =  fst (m s0)
-
-\end{haskell}
-
-
-        The following two functions were found in the file
-\verb~demos/Cse/stateMonad.gs~ that is part of the Gofer distribution.
-They are like \verb~map~ but thread a state through the calculation.
-Here, \verb~maplST~ threads the state from left to right and
-\verb~maprST~ threads the state from right to left.  Thus,
-\verb~maplST~ is like the function \verb~mapAccuml~ in the
-\verb~ListUtil~ module provided with the Chalmer's Haskell system
-\verb~hbc~.  The function \verb~maplST~ is also found in the Glasgow
-library under the name \verb~mapST~.  I use `thenST' in both
-definitions because that is what Glasgow uses in the definition of
-their function \verb~mapST~.
-        \begin{haskell}{maplST}
-
-> maplST                :: (a -> ST s b) -> [a] -> ST s [b]
-> maplST k []           = returnST []
-> maplST k (x:xs)       = k x           `thenST`  \y  ->
->                         maplST k xs   `thenST`  \ys ->
->                         returnST (y:ys)
-
-\end{haskell}
-        \fixhaskellspacing\begin{haskell}{maprST}
-
-> maprST                :: (a -> ST s b) -> [a] -> ST s [b]
-> maprST k []           = returnST []
-> maprST k (x:xs)       = maprST k xs   `thenST`  \ys ->
->                         k x           `thenST`  \y  ->
->                         returnST (y:ys)
-
-\end{haskell}
-
-
-
-%%%%%%%%%%  End of StateTransformer.lhs  %%%%%%%%%%
diff --git a/real/HMMS/Transcribe.lhs b/real/HMMS/Transcribe.lhs
deleted file mode 100644 (file)
index 9b30cd1..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-        The program ``Transcribe'' is intended for checking the
-pronunciation modeling functions on single files.  To generate the
-phonetic pronunciation networks for a collection of text files, the
-program ``BatchTranscribe'' (Chapter~\ref{ch:BatchTranscribe}) is more
-efficient.
-
-        The program takes two arguments.  The first is the
-user-supplied dictionary file
-(Section~\ref{sc:dictionary}).\footnote{Originally, we tried a
-separate program for compiling the balanced binary tree of
-pronunciation models.  However, even when the tree was written in
-binary form, reading the compiled tree took significantly longer
-(almost four times) than just regenerating the tree directly from the
-user-supplied dictionary file.  This comparison was for a dictionary
-containing about 6200 words.} The second argument is the name of a
-text file (minus the ``\verb~.txt~'' extension, which is assumed).
-The output will be placed in the file with the second argument as its
-root and the extension ``\verb~.ppm~''.
-        \begin{haskell}{Transcribe}
-
-> module Main where
-
-> import BalBinSTrees
-> import Pronunciations
-
-> main = getArgs exit $ \args ->
->       case args of
->       [dic_file, txt_file] -> process_utt dic_file txt_file
->
->       _  -> error usage
-
-> usage = " usage:  Transcribe  <dictionary>  <txt file>"
-
-
-> process_utt dic_file txt_file =
->       readFile dic_file exit  $ \ cs1 ->
->       let
->         dictionary = bbstBuild (readDictionary cs1)
->       in
->         transcribe_file dictionary txt_file done
-
-
-> transcribe_file dictionary fn d =
->       let
->         in_file  = fn ++ ".txt"
->         out_file = fn ++ ".ppm"
->       in
->         readFile in_file exit $ \ cs ->
->         let
->           network = pre_hmm dictionary cs
->         in
->           writeFile out_file (showPrnNetwork network) exit d
-
-\end{haskell}
diff --git a/real/HMMS/Viterbi.lhs b/real/HMMS/Viterbi.lhs
deleted file mode 100644 (file)
index cee74df..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-
-        The {\em Viterbi algorithm\/} is used to align a hidden Markov
-model (HMM) with a sequence of observations.
-Chapter~\ref{ch:HmmDigraphs} described how to take a pronunciation
-network and turn it into a single HMM.
-        \begin{haskell}{Viterbi}
-
-> module Viterbi( module HmmDigraphs, module HmmDensities, align ) where
-
-> import Extrema
-> import Lists
-> import StateT
-
-> import HmmDigraphs
-> import HmmDensities
-> import Data.Array--1.3
-
-\end{haskell}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Mathematical Description}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-        The Viterbi algorithm for estimating the hidden state sequence
-given a sequence of observations using logarithmic arithmetic is
-explained on page 340 of~\cite{RabiJuan93}.  We present a slightly
-modified form here.
-
-
-        The state estimation problem is also sometimes called the {\em
-alignment problem\/} since we are aligning the observation vectors
-with a path through the HMM network.
-
-
-        We begin by defining some notation.  As in \cite{RabiJuan93},
-the placement of a tilde over a symbol reminds us that it is a log
-value.  For the HMM to be aligned,
-        \begin{itemize}
-
-        \item the number of states is denoted by $N$,
-
-        \item the set of starting states is denoted by $\scriptI$,
-
-        \item the log-probability of starting in state $i$
-is denoted by $\tilde{\pi}_i$ for all $i \in \scriptI$,
-
-        \item the set of stopping states is denoted by $\scriptT$,
-
-        \item the set of predecessor states of state $j$ is denoted by
-$\scriptP_j$,
-
-        \item the log-probability of going from
-state $i$ to state $j$ is denoted by $\tilde{a}_{ij}$ for all $i \in
-\scriptP_j$, 
-
-        \item the log-density function associated with state $j$ is
-denoted by $\tilde{g}_j$.
-        \end{itemize}
-        Let the list of observation vectors be $[x_1, x_2, \ldots,
-x_T]$.  Define $\tilde{p}_t[j]$ to be the {\em path score\/} of the
-best path that ends in state $j$ at time $t$, and let $b_t[j]$ be the
-{\em backtrace pointer\/} for state $j$ at time $t$, i.e., the index
-of the state at time $t-1$ on the best path ending in state $j$ at
-time $t$.
-
-
-        The Viterbi algorithm can be defined in four stages:
-initialization, recursion, termination, and backtracking.  The
-equations are listed in Table~\ref{tb:viterbi}.  It is easy to see
-from the table that the implementation of the algorithm is
-straightforward in a conventional imperative language such as C.
-        \begin{table}
-        \caption[]{The Viterbi Algorithm (Log-probability version)}
-        \label{tb:viterbi}
-        \begin{itemize}
-
-        \item Initialization. For $i=1,2,\ldots,N$,
-        \[
-          \tilde{p}_1[i] = \left\{
-                \begin{array}{ll}
-                \tilde{\pi}_i + \tilde{g}_i(x_1) & i \in \scriptI \\
-                -\infty                          & \mbox{otherwise}
-                \end{array}
-                \right.
-        \]
-
-        \item Recursion.  For $t=2,\ldots,T$ and $j=1,2,\ldots,N$,
-        \begin{eqnarray*}
-           \tilde{p}_t[j] & = & \max_{i \in \scriptP_j}
-                                \{ \tilde{p}_{t-1}[i] +
-                                   \tilde{a}_{ij} \} \ \ + \ 
-                                   \tilde{g}_j(x_t) \\
-           b_t[j]         & = & \arg \max_{i \in \scriptP_j}
-                                  \{ \tilde{p}_{t-1}[i] + \tilde{a}_{ij} \}
-        \end{eqnarray*}
-
-        \item Termination:
-        \begin{eqnarray*}
-        P^*     & = & \max_{i \in \scriptT}  \{ \tilde{p}_T[i] \} \\
-        q^*_T   & = & \arg \max_{i \in \scriptT} \{ \tilde{p}_T[i] \}
-        \end{eqnarray*}
-
-        \item Backtrace:
-        \[
-        q^*_{t-1} = b_t[ q^*_t ],\ \ \ \ t = T, T-1, \ldots, 2
-        \]
-
-        \end{itemize}
-        \end{table}
-
-
-        The termination equations could include the exit probabilities
-in the calculation, but since determining when an utterance is
-finished is somewhat arbitrary, we haven't included them here.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section {Haskell Implementation}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-        The HMM states are indexed by integers.  Hence, the bounds for
-an array that has one cell per state has the type \verb~(Int,Int)~.
-        \begin{haskell}{HmmStateBounds}
-
-> type HmmStateBounds  = (Int, Int)
-
-\end{haskell}
-
-
-        Since the HMM states are indexed by integers and the path
-scores are floating point values, the collection of path scores can be
-stored in an array of the following type:
-        \begin{haskell}{PathScores}
-
-> type PathScores = Array Int Float
-
-\end{haskell}
-
-
-        At each time instant we get a list of backtrace pointers, one
-pointer for each HMM state.  The pointer for state $j$ is the integer
-index associated with the preceding state on the best scoring path
-into state $j$.
-        \begin{haskell}{BacktracePtrs}
-
-> type BacktracePtrs = [Int]  -- one element for each HMM state
-
-\end{haskell}
-
-
-        We keep track of the number of frames that are aligned so that
-we can normalize the path score.
-        \begin{haskell}{FrameCount}
-
-> type FrameCount = Int
-
-\end{haskell}
-
-
-        The ``forward'' state in the calculation consists of the array
-of path scores and the frame count.  For each observation, we
-increment the frame count by one and update the path scores using the
-recursion equations of Table~\ref{tb:viterbi} to produce a new value
-of the state.
-        \begin{haskell}{ForwardState}
-
-> type ForwardState = (PathScores, FrameCount)
-
-\end{haskell}
-
-
-        The object produced by the forward pass, a pair comprised of a
-list of backtrace pointer lists and an array of final path scores, is
-called a {\em trellis}.
-        \begin{haskell}{Trellis}
-
-> type Trellis = ([BacktracePtrs], ForwardState)
-
-\end{haskell}
-
-
-        The state scores are initialized to a large negative
-number.\footnote{Since the Haskell Standard Prelude defines
-\verb~minChar~ and \verb~maxChar~, it seems that it should also define
-\verb~minFloat~, \verb~maxFloat~, \verb~minDouble~, \verb~maxDouble~,
-etc., for completeness.}
-        \begin{haskell}{minFloat}
-
-> minFloat = -1.0e+37 :: Float
-
-\end{haskell}
-
-
-        The function \verb~forward~ initializes an array of path
-scores and then performs the forward pass.  The initial frame
-likelihood calculation uses addition because we are using log
-probabilities.
-        \begin{haskell}{forward}
-
-> forward :: HmmTsA HmmData -> [LogDensityTable] -> Trellis
-
-> forward  (HmmTsA is _ pdg)  (lt:rlts) =
->       maplST (extend_paths (elems pdg) bnds) rlts `startingWith` (nu0, 1)
->       where
->       bnds = bounds pdg
->       nu0  = accumArray (flip const) minFloat bnds
->                 [ (i , let (p,s) = fst (pdg!i)
->                        in  a + lt!p!s)         | (i,a) <- is]
-
-\end{haskell}
-
-
-        The function \verb~extend_paths~ takes the HMM digraph, the
-index bounds for the path score array, a log density table, and
-returns a state transformer (Chapter~\ref{ch:StateT}) that maps a
-forward state to a list of backtrace pointers and a new forward state.
-        \begin{haskell}{extend_paths}
-
-> extend_paths :: ProbDigraphL HmmData ->
->                 HmmStateBounds ->
->                 LogDensityTable ->
->                 ST ForwardState BacktracePtrs
-
-> extend_paths pdg bnds lt (nu,fc) = (btps,(new_nu, fc + 1))
->       where
->       (nu', btps) = unzip [ maximumfst [ (nu!j + a, j) | (j,a) <- ps]
->                             | (_, ps) <- pdg ]
->       new_nu = listArray bnds (zipWith (+) nu'
->                                  [ lt!p!j | ((p,j), _) <- pdg] )
-
-\end{haskell}
-
-
-        The point of building the trellis is to estimate the sequence
-of HMM states.  The estimated sequence is computed by the function
-\verb~backtrace~.  The function returns a pair.  The first component
-is the path score normalized by the number of frames that were
-aligned.  The second component is the optimal state path.
-        \begin{haskell}{backtrace}
-
-> backtrace :: HmmTsA HmmData -> Trellis -> (Float, [Int])
-
-> backtrace  (HmmTsA _ ts _)  (bss,(nu,fc))  =  (score',path)
->       where
->       (score, q_star)    = maximumfst [(nu!i, i) | (i,_) <- ts]
->       score'             = score / fromIntegral fc
->       path               = foldr op [q_star] bss
->       psi `op` qs@(q:_)  = (psi!!(q-1)) : qs
-
-\end{haskell}
-
-
-        The function \verb~decode_state_ids~ is used to dump the
-phone-state identities associated with the optimal state path.
-        \begin{haskell}{decode_state_ids}
-
-> decode_state_ids :: HmmTsA HmmData -> [Int] -> [HmmData]
-> decode_state_ids (HmmTsA _ _ pdg) = map (fst . (pdg!))
-
-\end{haskell}
-
-
-        The function \verb~align~ combines the forward pass, the
-backtrace step, and the phone-state decoding.
-        \begin{haskell}{align}
-
-> align :: HmmTsA HmmData -> [LogDensityTable] -> (Float, [HmmData])
-
-> align hmm lts = (score, state_seq)
->       where (score, path) = backtrace hmm (forward hmm lts)
->             state_seq     = decode_state_ids hmm path
-
-\end{haskell}
-
-
-%%%%%%%%%%  End of Viterbi.lhs  %%%%%%%%%%
diff --git a/real/HMMS/app/test/README b/real/HMMS/app/test/README
deleted file mode 100644 (file)
index 37a74e9..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-
-FILE:  $HMMS/app/test/README
-
-       NOTICE: This is copyrighted software.  You should read the
-COPYRIGHT file in the root directory of this distribution for
-conditions of use.
-
-
-        This distribution contains a portion of a software system for
-training phonetic Hidden Markov models using the Segmental K-means
-algorithm.  This distribution only includes that portion of the system
-written in the functional language Haskell.  This file explains many
-of the steps involved in doing an HMM training run.  However, we have
-provided enough test files to test only some of the programs.  If you
-want to test all of the programs, you'll need to get your hands on a
-large speech database.
-
-
-       Throughout these notes, we'll assume that the environmental
-variable HMMS contains the root directory for this distribution.
-
-
-       By the way, all of the commands are listed in a shell script
-called ``demo,'' so you don't have to type the commands in to get
-started.  If you type ``demo'', you should see something like this on
-your screen:
-
-
-        Running ConvertLinearDic
-
-        Output written to dictionary.0.dgs
-
-        Running BatchTranscribe
-
-        data/dmg_01.txt         -> data/dmg_01.ppm
-        data/dmg_02.txt         -> data/dmg_02.ppm
-        data/dmg_03.txt         -> data/dmg_03.ppm
-        data/dmg_04.txt         -> data/dmg_04.ppm
-        data/dmg_05.txt         -> data/dmg_05.ppm
-        data/dmg_06.txt         -> data/dmg_06.ppm
-
-        Running BatchAlign
-
-           1  11.08  11.08  data/dmg_01
-           2  11.68  11.38  data/dmg_02
-           3   9.98  10.92  data/dmg_03
-           4  11.02  10.94  data/dmg_04
-           5   9.86  10.72  data/dmg_05
-           6  10.64  10.71  data/dmg_06
-        70.1u 1.0s 1:15 94% 0+8996k 158+6io 158pf+0w
-
-        Finished running the demo script
-
-
-~~~~~~~~~~~~~~~~~~~~~
-Detailed Instructions
-~~~~~~~~~~~~~~~~~~~~~
-
-~~~~~~~~~~
-        1
-~~~~~~~~~~
-
-        This directory originally contains three files and one
-subdirectory.  The three files are
-
-        sentences               a list of the root names of the
-                                sentence data files, with paths
-                                relative to this directory
-        
-        vocabulary              a list of the words in the sentence
-                                texts
-        
-        dictionary.0            the words plus their linear
-                                pronunciation models
-
-The subdirectory ``data'' originally contains three files for each of
-six test utterances.  A file with no extension is the original sampled
-speech waveform file (16000 samples/sec, 14 bit A/D, stored as short
-ints, i.e., 2 bytes/sample).  A file with the same root name and a
-``.txt'' extension contains the text of what was said; a file with the
-same root name and a ``.fea'' extension contains the feature vectors
-as computed by a signal processing program.  (The feature vectors have
-18 coordinates, and there are 100 of them for each second of
-speech. They were generated using a C program not included in this
-distribution.)
-
-
-~~~~~~~~~~
-        2
-~~~~~~~~~~
-
-        The first step is to convert the linear pronunciation
-dictionary into a dictionary with the entries in a directed-graph
-representation.  This is done using the program ``ConvertLinearDic''.
-
-        % $HMMS/bin/ConvertLinearDic dictionary.0
-
-This creates the file dictionary.0.dgs.  This file could be edited
-further if necessary, e.g., to change linear pronunciation models to
-models with alternate pronunciation paths (which was the motivation
-for using a directed graph representation).
-
-       This step only needs to be repeated if there is a change in
-the linear dictionary.
-
-
-~~~~~~~~~~
-        3
-~~~~~~~~~~
-
-
-       Next we must transcribe each sentence.  The names of each text
-file must be in a master file.  Suppose that this file's name is
-"sentences".  Here is an example of how the first few lines of
-this file might look:
-
-       data/dmg_01
-       data/dmg_02
-       data/dmg_03
-             :
-             :
-
-These identify the .txt files, except for the .txt extension.  It says
-they lie in a subdirectory ``data'' of the current directory.
-
-       The program BatchTranscribe is used to transcribe these files,
-via the command
-
-        % $HMMS/bin/BatchTranscribe dictionary.0.dgs sentences
-
-This program produces a .ppm file for each .txt file listed in the
-training sentences file, in the same directory as the .ppm file.
-
-       This step only needs to be repeated if there is a change in
-the pronunciation-network dictionary.
-
-
-~~~~~~~~~~
-       4
-~~~~~~~~~~
-
-       You're now ready to align each file using the Viterbi
-algorithm using the program ``BatchAlign''. This is the slowest
-program in the suite.
-
-       % $HMMS/bin/BatchAlign $HMMS/hmms/h9 $HMMS/hmms/h9.ties \
-               $HMMS/hmms/h9.dgs sentences
-
-       When I run this program on the example data files, I get the
-following output:
-
-   1  11.08  11.08  data/dmg_01
-   2  11.68  11.38  data/dmg_02
-   3   9.98  10.92  data/dmg_03
-   4  11.02  10.94  data/dmg_04
-   5   9.86  10.72  data/dmg_05
-   6  10.64  10.71  data/dmg_06
-
-        The alignment files produced by the alignment program have the
-extension .algn
-
-       When I run this program on an unloaded SPARC 10, I get
-timing statistics like the following (hbc 0.999.4):
-
-       70.0u 1.2s 1:15 94% 0+9036k 12+21io 120pf+0w
-
-       You can change the timing performance somewhat by changing the
-amount of heap the program has available.
-
-       NOTE: if you use ghc, you need to allocate more heap than the
-default amount; 24M is enough.  Also, you will have to modify the
-makefiles and edit two of the program files in src/haskell; see the
-makefiles in lib/haskell and src/haskell for details.
-
-
-~~~~~~~~~~
-        5
-~~~~~~~~~~
-
-        The other programs won't be useful until you have a large
-speech database.  However, the program BatchAlign is computationally
-the most expensive, so should be the most interesting to Haskell
-compiler developers.
-
-       Of course, you can test the program CountAlignmentDiffs by
-just copying the .algn files into .algn.old files and then running the
-program.
-
-       % $HMMS/bin/CountAlignmentDiffs sentences
-
-       If you keep these old alignment files, you can work on the
-code and periodically make sure that you haven't changed the answers
-produced by the program.
-
diff --git a/real/HMMS/app/test/demo b/real/HMMS/app/test/demo
deleted file mode 100644 (file)
index 13f7db4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/csh -f
-
-echo " "
-echo Running ConvertLinearDic
-echo " "
-$HMMS/bin/ConvertLinearDic dictionary.0
-
-echo " "
-echo Running BatchTranscribe
-echo " "
-$HMMS/bin/BatchTranscribe  dictionary.0.dgs sentences
-
-echo " "
-echo Running BatchAlign
-echo " "
-time $HMMS/bin/BatchAlign $HMMS/hmms/h9 $HMMS/hmms/h9.ties $HMMS/hmms/h9.dgs sentences
-
-echo " "
-echo Finished running the demo script
-echo " "
-
-exit 0
-
diff --git a/real/HMMS/app/test/dictionary.0.dgs b/real/HMMS/app/test/dictionary.0.dgs
deleted file mode 100644 (file)
index e59397f..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-A
-1  [1]  [1]
-1      AX      []
-
-AFTERNOON
-7  [1]  [7]
-1      AE      []
-2      F       [1]
-3      T       [2]
-4      AXR     [3]
-5      N       [4]
-6      UW      [5]
-7      N       [6]
-
-AM
-2  [1]  [2]
-1      AE      []
-2      M       [1]
-
-AN
-2  [1]  [2]
-1      AE      []
-2      N       [1]
-
-DAY
-2  [1]  [2]
-1      D       []
-2      EY      [1]
-
-FIVE
-3  [1]  [3]
-1      F       []
-2      AY      [1]
-3      V       [2]
-
-FOUR
-3  [1]  [3]
-1      F       []
-2      AO      [1]
-3      R       [2]
-
-HAS
-3  [1]  [3]
-1      HH      []
-2      AE      [1]
-3      Z       [2]
-
-I
-1  [1]  [1]
-1      AY      []
-
-IN
-2  [1]  [2]
-1      IH      []
-2      N       [1]
-
-IS
-2  [1]  [2]
-1      IH      []
-2      Z       [1]
-
-IT
-2  [1]  [2]
-1      IH      []
-2      T       [1]
-
-NO
-2  [1]  [2]
-1      N       []
-2      OW      [1]
-
-NOW
-2  [1]  [2]
-1      N       []
-2      AW      [1]
-
-OFFICE
-4  [1]  [4]
-1      AO      []
-2      F       [1]
-3      IX      [2]
-4      S       [3]
-
-ONE
-3  [1]  [3]
-1      W       []
-2      AH      [1]
-3      N       [2]
-
-ONLY
-4  [1]  [4]
-1      OW      []
-2      N       [1]
-3      L       [2]
-4      IY      [3]
-
-SITTING
-5  [1]  [5]
-1      S       []
-2      IH      [1]
-3      DX      [2]
-4      IX      [3]
-5      NG      [4]
-
-SPRING
-5  [1]  [5]
-1      S       []
-2      P       [1]
-3      R       [2]
-4      IH      [3]
-5      NG      [4]
-
-TEST
-4  [1]  [4]
-1      T       []
-2      EH      [1]
-3      S       [2]
-4      T       [3]
-
-THAT
-3  [1]  [3]
-1      DH      []
-2      AE      [1]
-3      T       [2]
-
-THIS
-3  [1]  [3]
-1      DH      []
-2      IH      [1]
-3      S       [2]
-
-THREE
-3  [1]  [3]
-1      TH      []
-2      R       [1]
-3      IY      [2]
-
-TUESDAY
-5  [1]  [5]
-1      T       []
-2      UW      [1]
-3      Z       [2]
-4      D       [3]
-5      EY      [4]
-
-TWO
-2  [1]  [2]
-1      T       []
-2      UW      [1]
-
-WARM
-4  [1]  [4]
-1      W       []
-2      AO      [1]
-3      R       [2]
-4      M       [3]
-
-WINDOWS
-6  [1]  [6]
-1      W       []
-2      IH      [1]
-3      N       [2]
-4      D       [3]
-5      OW      [4]
-6      Z       [5]
-
diff --git a/real/HMMS/data/dmg_01 b/real/HMMS/data/dmg_01
deleted file mode 100644 (file)
index cde6960..0000000
Binary files a/real/HMMS/data/dmg_01 and /dev/null differ
diff --git a/real/HMMS/data/dmg_01.fea b/real/HMMS/data/dmg_01.fea
deleted file mode 100644 (file)
index 4352d08..0000000
Binary files a/real/HMMS/data/dmg_01.fea and /dev/null differ
diff --git a/real/HMMS/data/dmg_01.ppm b/real/HMMS/data/dmg_01.ppm
deleted file mode 100644 (file)
index c500efe..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-15  [1, 2]  [14, 15]
-1      (SIL, 1)        []
-2      (DH, 1)         [1]
-3      (IH, 1)         [2]
-4      (S, 2)          [3]
-5      (SIL, 1)        [4]
-6      (IH, 1)         [4, 5]
-7      (Z, 2)          [6]
-8      (SIL, 1)        [7]
-9      (AX, 2)         [7, 8]
-10     (SIL, 1)        [9]
-11     (T, 1)          [9, 10]
-12     (EH, 1)         [11]
-13     (S, 1)          [12]
-14     (T, 1)          [13]
-15     (SIL, 0)        [14]
diff --git a/real/HMMS/data/dmg_01.txt b/real/HMMS/data/dmg_01.txt
deleted file mode 100644 (file)
index e60b710..0000000
+++ /dev/null
@@ -1 +0,0 @@
-THIS IS A TEST
diff --git a/real/HMMS/data/dmg_02 b/real/HMMS/data/dmg_02
deleted file mode 100644 (file)
index ead6807..0000000
Binary files a/real/HMMS/data/dmg_02 and /dev/null differ
diff --git a/real/HMMS/data/dmg_02.fea b/real/HMMS/data/dmg_02.fea
deleted file mode 100644 (file)
index 10472b8..0000000
Binary files a/real/HMMS/data/dmg_02.fea and /dev/null differ
diff --git a/real/HMMS/data/dmg_02.ppm b/real/HMMS/data/dmg_02.ppm
deleted file mode 100644 (file)
index 0b5de57..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-19  [1, 2]  [18, 19]
-1      (SIL, 1)        []
-2      (IH, 1)         [1]
-3      (T, 2)          [2]
-4      (SIL, 1)        [3]
-5      (IH, 1)         [3, 4]
-6      (Z, 2)          [5]
-7      (SIL, 1)        [6]
-8      (OW, 1)         [6, 7]
-9      (N, 1)          [8]
-10     (L, 1)          [9]
-11     (IY, 2)         [10]
-12     (SIL, 1)        [11]
-13     (AX, 2)         [11, 12]
-14     (SIL, 1)        [13]
-15     (T, 1)          [13, 14]
-16     (EH, 1)         [15]
-17     (S, 1)          [16]
-18     (T, 1)          [17]
-19     (SIL, 0)        [18]
diff --git a/real/HMMS/data/dmg_02.txt b/real/HMMS/data/dmg_02.txt
deleted file mode 100644 (file)
index ebe469d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-IT IS ONLY A TEST
diff --git a/real/HMMS/data/dmg_03 b/real/HMMS/data/dmg_03
deleted file mode 100644 (file)
index 7b0258b..0000000
Binary files a/real/HMMS/data/dmg_03 and /dev/null differ
diff --git a/real/HMMS/data/dmg_03.fea b/real/HMMS/data/dmg_03.fea
deleted file mode 100644 (file)
index e1f83ed..0000000
Binary files a/real/HMMS/data/dmg_03.fea and /dev/null differ
diff --git a/real/HMMS/data/dmg_03.ppm b/real/HMMS/data/dmg_03.ppm
deleted file mode 100644 (file)
index 31c9093..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-24  [1, 2]  [23, 24]
-1      (SIL, 1)        []
-2      (IH, 1)         [1]
-3      (T, 2)          [2]
-4      (SIL, 1)        [3]
-5      (IH, 1)         [3, 4]
-6      (Z, 2)          [5]
-7      (SIL, 1)        [6]
-8      (N, 1)          [6, 7]
-9      (AW, 2)         [8]
-10     (SIL, 1)        [9]
-11     (T, 1)          [9, 10]
-12     (UW, 1)         [11]
-13     (Z, 1)          [12]
-14     (D, 1)          [13]
-15     (EY, 2)         [14]
-16     (SIL, 1)        [15]
-17     (AE, 1)         [15, 16]
-18     (F, 1)          [17]
-19     (T, 1)          [18]
-20     (AXR, 1)        [19]
-21     (N, 1)          [20]
-22     (UW, 1)         [21]
-23     (N, 1)          [22]
-24     (SIL, 0)        [23]
diff --git a/real/HMMS/data/dmg_03.txt b/real/HMMS/data/dmg_03.txt
deleted file mode 100644 (file)
index 2fc90fd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-IT IS NOW TUESDAY AFTERNOON
diff --git a/real/HMMS/data/dmg_04 b/real/HMMS/data/dmg_04
deleted file mode 100644 (file)
index 7e6a976..0000000
Binary files a/real/HMMS/data/dmg_04 and /dev/null differ
diff --git a/real/HMMS/data/dmg_04.fea b/real/HMMS/data/dmg_04.fea
deleted file mode 100644 (file)
index 7e15561..0000000
Binary files a/real/HMMS/data/dmg_04.fea and /dev/null differ
diff --git a/real/HMMS/data/dmg_04.ppm b/real/HMMS/data/dmg_04.ppm
deleted file mode 100644 (file)
index 672049b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-23  [1, 2]  [22, 23]
-1      (SIL, 1)        []
-2      (IH, 1)         [1]
-3      (T, 2)          [2]
-4      (SIL, 1)        [3]
-5      (IH, 1)         [3, 4]
-6      (Z, 2)          [5]
-7      (SIL, 1)        [6]
-8      (AX, 2)         [6, 7]
-9      (SIL, 1)        [8]
-10     (W, 1)          [8, 9]
-11     (AO, 1)         [10]
-12     (R, 1)          [11]
-13     (M, 2)          [12]
-14     (SIL, 1)        [13]
-15     (S, 1)          [13, 14]
-16     (P, 1)          [15]
-17     (R, 1)          [16]
-18     (IH, 1)         [17]
-19     (NG, 2)         [18]
-20     (SIL, 1)        [19]
-21     (D, 1)          [19, 20]
-22     (EY, 1)         [21]
-23     (SIL, 0)        [22]
diff --git a/real/HMMS/data/dmg_04.txt b/real/HMMS/data/dmg_04.txt
deleted file mode 100644 (file)
index ceb4678..0000000
+++ /dev/null
@@ -1 +0,0 @@
-IT IS A WARM SPRING DAY
diff --git a/real/HMMS/data/dmg_05 b/real/HMMS/data/dmg_05
deleted file mode 100644 (file)
index a3b1bdb..0000000
Binary files a/real/HMMS/data/dmg_05 and /dev/null differ
diff --git a/real/HMMS/data/dmg_05.fea b/real/HMMS/data/dmg_05.fea
deleted file mode 100644 (file)
index df5671e..0000000
Binary files a/real/HMMS/data/dmg_05.fea and /dev/null differ
diff --git a/real/HMMS/data/dmg_05.ppm b/real/HMMS/data/dmg_05.ppm
deleted file mode 100644 (file)
index f9149a3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-41  [1, 2]  [40, 41]
-1      (SIL, 1)        []
-2      (AY, 2)         [1]
-3      (SIL, 1)        [2]
-4      (AE, 1)         [2, 3]
-5      (M, 2)          [4]
-6      (SIL, 1)        [5]
-7      (S, 1)          [5, 6]
-8      (IH, 1)         [7]
-9      (DX, 1)         [8]
-10     (IX, 1)         [9]
-11     (NG, 2)         [10]
-12     (SIL, 1)        [11]
-13     (IH, 1)         [11, 12]
-14     (N, 2)          [13]
-15     (SIL, 1)        [14]
-16     (AE, 1)         [14, 15]
-17     (N, 2)          [16]
-18     (SIL, 1)        [17]
-19     (AO, 1)         [17, 18]
-20     (F, 1)          [19]
-21     (IX, 1)         [20]
-22     (S, 2)          [21]
-23     (SIL, 1)        [22]
-24     (DH, 1)         [22, 23]
-25     (AE, 1)         [24]
-26     (T, 2)          [25]
-27     (SIL, 1)        [26]
-28     (HH, 1)         [26, 27]
-29     (AE, 1)         [28]
-30     (Z, 2)          [29]
-31     (SIL, 1)        [30]
-32     (N, 1)          [30, 31]
-33     (OW, 2)         [32]
-34     (SIL, 1)        [33]
-35     (W, 1)          [33, 34]
-36     (IH, 1)         [35]
-37     (N, 1)          [36]
-38     (D, 1)          [37]
-39     (OW, 1)         [38]
-40     (Z, 1)          [39]
-41     (SIL, 0)        [40]
diff --git a/real/HMMS/data/dmg_05.txt b/real/HMMS/data/dmg_05.txt
deleted file mode 100644 (file)
index 8736677..0000000
+++ /dev/null
@@ -1 +0,0 @@
-I AM SITTING IN AN OFFICE THAT HAS NO WINDOWS
diff --git a/real/HMMS/data/dmg_06 b/real/HMMS/data/dmg_06
deleted file mode 100644 (file)
index 4cd9385..0000000
Binary files a/real/HMMS/data/dmg_06 and /dev/null differ
diff --git a/real/HMMS/data/dmg_06.fea b/real/HMMS/data/dmg_06.fea
deleted file mode 100644 (file)
index 80aa79d..0000000
Binary files a/real/HMMS/data/dmg_06.fea and /dev/null differ
diff --git a/real/HMMS/data/dmg_06.ppm b/real/HMMS/data/dmg_06.ppm
deleted file mode 100644 (file)
index abc3087..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-20  [1, 2]  [19, 20]
-1      (SIL, 1)        []
-2      (W, 1)          [1]
-3      (AH, 1)         [2]
-4      (N, 2)          [3]
-5      (SIL, 1)        [4]
-6      (T, 1)          [4, 5]
-7      (UW, 2)         [6]
-8      (SIL, 1)        [7]
-9      (TH, 1)         [7, 8]
-10     (R, 1)          [9]
-11     (IY, 2)         [10]
-12     (SIL, 1)        [11]
-13     (F, 1)          [11, 12]
-14     (AO, 1)         [13]
-15     (R, 2)          [14]
-16     (SIL, 1)        [15]
-17     (F, 1)          [15, 16]
-18     (AY, 1)         [17]
-19     (V, 1)          [18]
-20     (SIL, 0)        [19]
diff --git a/real/HMMS/data/dmg_06.txt b/real/HMMS/data/dmg_06.txt
deleted file mode 100644 (file)
index be029a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ONE TWO THREE FOUR FIVE
diff --git a/real/HMMS/dictionary.0 b/real/HMMS/dictionary.0
deleted file mode 100644 (file)
index 9cf3eb7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-A              AX
-AFTERNOON      AE F T AXR N UW N
-AM             AE M
-AN             AE N
-DAY            D EY
-FIVE           F AY V
-FOUR           F AO R
-HAS            HH AE Z
-I              AY
-IN             IH N
-IS             IH Z
-IT             IH T
-NO             N OW
-NOW            N AW
-OFFICE         AO F IX S
-ONE            W AH N
-ONLY           OW N L IY
-SITTING                S IH DX IX NG
-SPRING         S P R IH NG
-TEST           T EH S T
-THAT           DH AE T
-THIS           DH IH S
-THREE          TH R IY
-TUESDAY                T UW Z D EY
-TWO            T UW
-WARM           W AO R M
-WINDOWS                W IH N D OW Z
diff --git a/real/HMMS/dictionary.0.dgs b/real/HMMS/dictionary.0.dgs
deleted file mode 100644 (file)
index e59397f..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-A
-1  [1]  [1]
-1      AX      []
-
-AFTERNOON
-7  [1]  [7]
-1      AE      []
-2      F       [1]
-3      T       [2]
-4      AXR     [3]
-5      N       [4]
-6      UW      [5]
-7      N       [6]
-
-AM
-2  [1]  [2]
-1      AE      []
-2      M       [1]
-
-AN
-2  [1]  [2]
-1      AE      []
-2      N       [1]
-
-DAY
-2  [1]  [2]
-1      D       []
-2      EY      [1]
-
-FIVE
-3  [1]  [3]
-1      F       []
-2      AY      [1]
-3      V       [2]
-
-FOUR
-3  [1]  [3]
-1      F       []
-2      AO      [1]
-3      R       [2]
-
-HAS
-3  [1]  [3]
-1      HH      []
-2      AE      [1]
-3      Z       [2]
-
-I
-1  [1]  [1]
-1      AY      []
-
-IN
-2  [1]  [2]
-1      IH      []
-2      N       [1]
-
-IS
-2  [1]  [2]
-1      IH      []
-2      Z       [1]
-
-IT
-2  [1]  [2]
-1      IH      []
-2      T       [1]
-
-NO
-2  [1]  [2]
-1      N       []
-2      OW      [1]
-
-NOW
-2  [1]  [2]
-1      N       []
-2      AW      [1]
-
-OFFICE
-4  [1]  [4]
-1      AO      []
-2      F       [1]
-3      IX      [2]
-4      S       [3]
-
-ONE
-3  [1]  [3]
-1      W       []
-2      AH      [1]
-3      N       [2]
-
-ONLY
-4  [1]  [4]
-1      OW      []
-2      N       [1]
-3      L       [2]
-4      IY      [3]
-
-SITTING
-5  [1]  [5]
-1      S       []
-2      IH      [1]
-3      DX      [2]
-4      IX      [3]
-5      NG      [4]
-
-SPRING
-5  [1]  [5]
-1      S       []
-2      P       [1]
-3      R       [2]
-4      IH      [3]
-5      NG      [4]
-
-TEST
-4  [1]  [4]
-1      T       []
-2      EH      [1]
-3      S       [2]
-4      T       [3]
-
-THAT
-3  [1]  [3]
-1      DH      []
-2      AE      [1]
-3      T       [2]
-
-THIS
-3  [1]  [3]
-1      DH      []
-2      IH      [1]
-3      S       [2]
-
-THREE
-3  [1]  [3]
-1      TH      []
-2      R       [1]
-3      IY      [2]
-
-TUESDAY
-5  [1]  [5]
-1      T       []
-2      UW      [1]
-3      Z       [2]
-4      D       [3]
-5      EY      [4]
-
-TWO
-2  [1]  [2]
-1      T       []
-2      UW      [1]
-
-WARM
-4  [1]  [4]
-1      W       []
-2      AO      [1]
-3      R       [2]
-4      M       [3]
-
-WINDOWS
-6  [1]  [6]
-1      W       []
-2      IH      [1]
-3      N       [2]
-4      D       [3]
-5      OW      [4]
-6      Z       [5]
-
diff --git a/real/HMMS/hmms-data/h9.dgs b/real/HMMS/hmms-data/h9.dgs
deleted file mode 100644 (file)
index 4abb20a..0000000
+++ /dev/null
@@ -1,368 +0,0 @@
-(AA ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.99887806e-1)]
-[(1, [(1, 7.41109729e-1)]),
- (2, [(1, 2.58890271e-1), (2, 8.01926732e-1)]),
- (3, [(2, 1.98073253e-1), (3, 7.00112224e-1)]) ])
-
-(AE ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.48817945e-1)]
-[(1, [(1, 7.03107953e-1)]),
- (2, [(1, 2.96892017e-1), (2, 8.02624285e-1)]),
- (3, [(2, 1.97375715e-1), (3, 6.51182055e-1)]) ])
-
-(AH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 6.31287932e-1)]
-[(1, [(1, 5.15669882e-1)]),
- (2, [(1, 4.84330088e-1), (2, 6.07475579e-1)]),
- (3, [(2, 3.92524391e-1), (3, 3.68712097e-1)]) ])
-
-(AO ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.38186792e-1)]
-[(1, [(1, 6.65814877e-1)]),
- (2, [(1, 3.34185123e-1), (2, 8.31773043e-1)]),
- (3, [(2, 1.68226972e-1), (3, 7.61813223e-1)]) ])
-
-(AW ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.19927961e-1)]
-[(1, [(1, 6.98870063e-1)]),
- (2, [(1, 3.01129937e-1), (2, 8.12982440e-1)]),
- (3, [(2, 1.87017545e-1), (3, 6.80072010e-1)]) ])
-
-(AX ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 4.99145299e-1)]
-[(1, [(1, 6.31583691e-1)]),
- (2, [(1, 3.68416309e-1), (2, 2.42923215e-1)]),
- (3, [(2, 7.57076800e-1), (3, 5.00366330e-1)]) ])
-
-(AXR ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.40136161e-1)]
-[(1, [(1, 6.88290834e-1)]),
- (2, [(1, 3.11709166e-1), (2, 7.76078463e-1)]),
- (3, [(2, 2.23921508e-1), (3, 7.59863853e-1)]) ])
-
-(AY ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.43463755e-1)]
-[(1, [(1, 7.52211332e-1)]),
- (2, [(1, 2.47788683e-1), (2, 8.24305177e-1)]),
- (3, [(2, 1.75694838e-1), (3, 7.56417155e-1)]) ])
-
-(EH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 4.13686484e-1)]
-[(1, [(1, 6.03172541e-1)]),
- (2, [(1, 3.96827430e-1), (2, 7.21286237e-1)]),
- (3, [(2, 2.78713763e-1), (3, 5.86313546e-1)]) ])
-
-(ER ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.74469197e-1)]
-[(1, [(1, 7.23454237e-1)]),
- (2, [(1, 2.76545793e-1), (2, 8.46019745e-1)]),
- (3, [(2, 1.53980240e-1), (3, 7.25530803e-1)]) ])
-
-(EY ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.09656090e-1)]
-[(1, [(1, 7.52731204e-1)]),
- (2, [(1, 2.47268811e-1), (2, 8.67834508e-1)]),
- (3, [(2, 1.32165477e-1), (3, 7.87433863e-1)]) ])
-
-(IH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 5.86878896e-1)]
-[(1, [(1, 5.58576703e-1)]),
- (2, [(1, 4.41423297e-1), (2, 6.21510148e-1)]),
- (3, [(2, 3.78489882e-1), (3, 4.13121104e-1)]) ])
-
-(IX ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 7.40824640e-1)]
-[(1, [(1, 3.84798706e-1)]),
- (2, [(1, 6.15201294e-1), (2, 3.77853870e-1)]),
- (3, [(2, 6.22146130e-1), (3, 2.59175360e-1)]) ])
-
-(IY ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.54942775e-1)]
-[(1, [(1, 6.75626218e-1)]),
- (2, [(1, 3.24373811e-1), (2, 8.10182989e-1)]),
- (3, [(2, 1.89816996e-1), (3, 7.43958831e-1)]) ])
-
-(OW ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.02180922e-1)]
-[(1, [(1, 7.41853237e-1)]),
- (2, [(1, 2.58146793e-1), (2, 8.37481022e-1)]),
- (3, [(2, 1.62518948e-1), (3, 7.97262728e-1)]) ])
-
-(OY ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 1.74652234e-1)]
-[(1, [(1, 8.36705208e-1)]),
- (2, [(1, 1.63294792e-1), (2, 8.20919156e-1)]),
- (3, [(2, 1.79080829e-1), (3, 8.25347781e-1)]) ])
-
-(UH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 6.97399557e-1)]
-[(1, [(1, 5.00000000e-1)]),
- (2, [(1, 5.00000000e-1), (2, 5.94780207e-1)]),
- (3, [(2, 4.05219793e-1), (3, 3.02600473e-1)]) ])
-
-(UW ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.82070935e-1)]
-[(1, [(1, 5.80792248e-1)]),
- (2, [(1, 4.19207752e-1), (2, 8.31789613e-1)]),
- (3, [(2, 1.68210402e-1), (3, 7.17929065e-1)]) ])
-
-(L ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 4.02931958e-1)]
-[(1, [(1, 6.21309161e-1)]),
- (2, [(1, 3.78690839e-1), (2, 6.66666687e-1)]),
- (3, [(2, 3.33333343e-1), (3, 5.96887052e-1)]) ])
-
-(EL ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.75817007e-1)]
-[(1, [(1, 6.48918450e-1)]),
- (2, [(1, 3.51081520e-1), (2, 7.86112547e-1)]),
- (3, [(2, 2.13887483e-1), (3, 7.24183023e-1)]) ])
-
-(R ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 4.60704595e-1)]
-[(1, [(1, 6.14077032e-1)]),
- (2, [(1, 3.85922939e-1), (2, 3.92467797e-1)]),
- (3, [(2, 6.07532203e-1), (3, 5.38542628e-1)]) ])
-
-(W ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.81139785e-1)]
-[(1, [(1, 7.53336728e-1)]),
- (2, [(1, 2.46663272e-1), (2, 6.37520611e-1)]),
- (3, [(2, 3.62479419e-1), (3, 6.18860185e-1)]) ])
-
-(Y ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.52788597e-1)]
-[(1, [(1, 7.11864412e-1)]),
- (2, [(1, 2.88135588e-1), (2, 7.51029730e-1)]),
- (3, [(2, 2.48970255e-1), (3, 6.47211432e-1)]) ])
-
-(M ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.56585056e-1)]
-[(1, [(1, 5.55862248e-1)]),
- (2, [(1, 4.44137752e-1), (2, 7.46206999e-1)]),
- (3, [(2, 2.53793001e-1), (3, 6.43414915e-1)]) ])
-
-(N ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 4.29943800e-1)]
-[(1, [(1, 5.70262134e-1)]),
- (2, [(1, 4.29737866e-1), (2, 6.78800881e-1)]),
- (3, [(2, 3.21199149e-1), (3, 5.67702591e-1)]) ])
-
-(EN ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.83458644e-1)]
-[(1, [(1, 6.48275852e-1)]),
- (2, [(1, 3.51724148e-1), (2, 7.37789214e-1)]),
- (3, [(2, 2.62210786e-1), (3, 6.16541326e-1)]) ])
-
-(NG ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.32164764e-1)]
-[(1, [(1, 7.62307942e-1)]),
- (2, [(1, 2.37692073e-1), (2, 7.33848333e-1)]),
- (3, [(2, 2.66151696e-1), (3, 6.67835236e-1)]) ])
-
-(F ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.64103138e-1)]
-[(1, [(1, 6.34928703e-1)]),
- (2, [(1, 3.65071297e-1), (2, 8.28062117e-1)]),
- (3, [(2, 1.71937868e-1), (3, 6.35896862e-1)]) ])
-
-(TH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.84452671e-1)]
-[(1, [(1, 8.20449471e-1)]),
- (2, [(1, 1.79550514e-1), (2, 8.47844303e-1)]),
- (3, [(2, 1.52155712e-1), (3, 6.15547359e-1)]) ])
-
-(S ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.68359542e-1)]
-[(1, [(1, 6.95284903e-1)]),
- (2, [(1, 3.04715097e-1), (2, 8.09278071e-1)]),
- (3, [(2, 1.90721914e-1), (3, 7.29368031e-1)]) ])
-
-(SH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.49395967e-1)]
-[(1, [(1, 7.79857814e-1)]),
- (2, [(1, 2.20142186e-1), (2, 8.04008424e-1)]),
- (3, [(2, 1.95991561e-1), (3, 7.50604033e-1)]) ])
-
-(HH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 1.27583101e-1)]
-[(1, [(1, 6.75428569e-1)]),
- (2, [(1, 3.24571431e-1), (2, 8.70477378e-1)]),
- (3, [(2, 1.29522651e-1), (3, 8.72416914e-1)]) ])
-
-(V ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 5.57103038e-1)]
-[(1, [(1, 6.22444570e-1)]),
- (2, [(1, 3.77555460e-1), (2, 4.86997634e-1)]),
- (3, [(2, 5.13002336e-1), (3, 4.42039847e-1)]) ])
-
-(DH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 7.71571636e-1)]
-[(1, [(1, 6.13202095e-1)]),
- (2, [(1, 3.86797905e-1), (2, 5.45905717e-3)]),
- (3, [(2, 9.94540930e-1), (3, 2.28043139e-1)]) ])
-
-(Z ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.09083819e-1)]
-[(1, [(1, 7.53908277e-1)]),
- (2, [(1, 2.46091723e-1), (2, 7.44298637e-1)]),
- (3, [(2, 2.55701363e-1), (3, 6.90655887e-1)]) ])
-
-(ZH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.98245609e-1)]
-[(1, [(1, 7.50407815e-1)]),
- (2, [(1, 2.49592170e-1), (2, 6.47465467e-1)]),
- (3, [(2, 3.52534562e-1), (3, 7.01754391e-1)]) ])
-
-(CH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.32771084e-1)]
-[(1, [(1, 7.63929605e-1)]),
- (2, [(1, 2.36070380e-1), (2, 8.32987547e-1)]),
- (3, [(2, 1.67012453e-1), (3, 7.67228901e-1)]) ])
-
-(JH ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 2.68488735e-1)]
-[(1, [(1, 6.03325427e-1)]),
- (2, [(1, 3.96674573e-1), (2, 7.06502616e-1)]),
- (3, [(2, 2.93497354e-1), (3, 7.31511235e-1)]) ])
-
-(P ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.65076482e-1)]
-[(1, [(1, 6.51320338e-1)]),
- (2, [(1, 3.48679632e-1), (2, 7.84054220e-1)]),
- (3, [(2, 2.15945765e-1), (3, 6.34559333e-1)]) ])
-
-(T ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 4.38571483e-1)]
-[(1, [(1, 5.30185938e-1)]),
- (2, [(1, 4.69814062e-1), (2, 6.54352248e-1)]),
- (3, [(2, 3.45647722e-1), (3, 5.54093122e-1)]) ])
-
-(K ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.25721025e-1)]
-[(1, [(1, 6.11313879e-1)]),
- (2, [(1, 3.88686121e-1), (2, 7.41553128e-1)]),
- (3, [(2, 2.58446902e-1), (3, 6.74043536e-1)]) ])
-
-(B ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 6.21547878e-1)]
-[(1, [(1, 5.55690944e-1)]),
- (2, [(1, 4.44309056e-1), (2, 6.44985378e-1)]),
- (3, [(2, 3.55014592e-1), (3, 3.78452092e-1)]) ])
-
-(D ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 5.45927227e-1)]
-[(1, [(1, 4.97560322e-1)]),
- (2, [(1, 5.02439678e-1), (2, 4.63757902e-1)]),
- (3, [(2, 5.36242068e-1), (3, 4.49740022e-1)]) ])
-
-(G ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 3.72822315e-1)]
-[(1, [(1, 4.88358200e-1)]),
- (2, [(1, 5.11641800e-1), (2, 6.43362463e-1)]),
- (3, [(2, 3.56637537e-1), (3, 6.26742184e-1)]) ])
-
-(DX ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 5.72006464e-1)]
-[(1, [(1, 3.45975935e-1)]),
- (2, [(1, 6.54024065e-1), (2, 1.63313612e-1)]),
- (3, [(2, 8.36686373e-1), (3, 4.27993536e-1)]) ])
-
-(SIL ,
-HmmTsL 3
-[(1, 1.00000000)]
-[(3, 1.14934266e-1)]
-[(1, [(1, 9.38745558e-1)]),
- (2, [(1, 6.12544343e-2), (2, 9.74563241e-1)]),
- (3, [(2, 2.54367311e-2), (3, 8.85065734e-1)]) ])
-
diff --git a/real/HMMS/hmms-data/h9.ties b/real/HMMS/hmms-data/h9.ties
deleted file mode 100644 (file)
index 11a13c3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-(AA,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(AE,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(AH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(AO,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(AW,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(AX,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(AXR,  [(1 , Mix), (2 , Mix), (3 , Mix)])
-(AY,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(EH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(ER,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(EY,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(IH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(IX,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(IY,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(OW,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(OY,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(UH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(UW,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(L,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(EL,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(R,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(W,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(Y,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(M,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(N,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(EN,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(NG,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(F,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(TH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(S,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(SH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(HH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(V,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(DH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(Z,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(ZH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(CH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(JH,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(P,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(T,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(K,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(B,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(D,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(G,    [(1 , Mix), (2 , Mix), (3 , Mix)])
-(DX,   [(1 , Mix), (2 , Mix), (3 , Mix)])
-(SIL,  [(1 , Mix), (2 , Mix), (3 , Mix)])
diff --git a/real/HMMS/hmms-data/h9/AA.1.gm b/real/HMMS/hmms-data/h9/AA.1.gm
deleted file mode 100644 (file)
index ab8ec37..0000000
Binary files a/real/HMMS/hmms-data/h9/AA.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AA.2.gm b/real/HMMS/hmms-data/h9/AA.2.gm
deleted file mode 100644 (file)
index 5b16850..0000000
Binary files a/real/HMMS/hmms-data/h9/AA.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AA.3.gm b/real/HMMS/hmms-data/h9/AA.3.gm
deleted file mode 100644 (file)
index 38f1d7c..0000000
Binary files a/real/HMMS/hmms-data/h9/AA.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AE.1.gm b/real/HMMS/hmms-data/h9/AE.1.gm
deleted file mode 100644 (file)
index 7279a73..0000000
Binary files a/real/HMMS/hmms-data/h9/AE.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AE.2.gm b/real/HMMS/hmms-data/h9/AE.2.gm
deleted file mode 100644 (file)
index 66382ac..0000000
Binary files a/real/HMMS/hmms-data/h9/AE.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AE.3.gm b/real/HMMS/hmms-data/h9/AE.3.gm
deleted file mode 100644 (file)
index f9cfe88..0000000
Binary files a/real/HMMS/hmms-data/h9/AE.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AH.1.gm b/real/HMMS/hmms-data/h9/AH.1.gm
deleted file mode 100644 (file)
index c8ae375..0000000
Binary files a/real/HMMS/hmms-data/h9/AH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AH.2.gm b/real/HMMS/hmms-data/h9/AH.2.gm
deleted file mode 100644 (file)
index ff15b05..0000000
Binary files a/real/HMMS/hmms-data/h9/AH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AH.3.gm b/real/HMMS/hmms-data/h9/AH.3.gm
deleted file mode 100644 (file)
index 1b239a9..0000000
Binary files a/real/HMMS/hmms-data/h9/AH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AO.1.gm b/real/HMMS/hmms-data/h9/AO.1.gm
deleted file mode 100644 (file)
index a9f96a9..0000000
Binary files a/real/HMMS/hmms-data/h9/AO.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AO.2.gm b/real/HMMS/hmms-data/h9/AO.2.gm
deleted file mode 100644 (file)
index cf44514..0000000
Binary files a/real/HMMS/hmms-data/h9/AO.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AO.3.gm b/real/HMMS/hmms-data/h9/AO.3.gm
deleted file mode 100644 (file)
index af5172b..0000000
Binary files a/real/HMMS/hmms-data/h9/AO.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AW.1.gm b/real/HMMS/hmms-data/h9/AW.1.gm
deleted file mode 100644 (file)
index 67d007d..0000000
Binary files a/real/HMMS/hmms-data/h9/AW.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AW.2.gm b/real/HMMS/hmms-data/h9/AW.2.gm
deleted file mode 100644 (file)
index 1d9ad11..0000000
Binary files a/real/HMMS/hmms-data/h9/AW.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AW.3.gm b/real/HMMS/hmms-data/h9/AW.3.gm
deleted file mode 100644 (file)
index 4907bd7..0000000
Binary files a/real/HMMS/hmms-data/h9/AW.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AX.1.gm b/real/HMMS/hmms-data/h9/AX.1.gm
deleted file mode 100644 (file)
index 800eb87..0000000
Binary files a/real/HMMS/hmms-data/h9/AX.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AX.2.gm b/real/HMMS/hmms-data/h9/AX.2.gm
deleted file mode 100644 (file)
index b76bcab..0000000
Binary files a/real/HMMS/hmms-data/h9/AX.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AX.3.gm b/real/HMMS/hmms-data/h9/AX.3.gm
deleted file mode 100644 (file)
index 79caa11..0000000
Binary files a/real/HMMS/hmms-data/h9/AX.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AXR.1.gm b/real/HMMS/hmms-data/h9/AXR.1.gm
deleted file mode 100644 (file)
index 1b8b45a..0000000
Binary files a/real/HMMS/hmms-data/h9/AXR.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AXR.2.gm b/real/HMMS/hmms-data/h9/AXR.2.gm
deleted file mode 100644 (file)
index 75a3bd1..0000000
Binary files a/real/HMMS/hmms-data/h9/AXR.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AXR.3.gm b/real/HMMS/hmms-data/h9/AXR.3.gm
deleted file mode 100644 (file)
index a400a23..0000000
Binary files a/real/HMMS/hmms-data/h9/AXR.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AY.1.gm b/real/HMMS/hmms-data/h9/AY.1.gm
deleted file mode 100644 (file)
index 331a0ad..0000000
Binary files a/real/HMMS/hmms-data/h9/AY.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AY.2.gm b/real/HMMS/hmms-data/h9/AY.2.gm
deleted file mode 100644 (file)
index bc9c28f..0000000
Binary files a/real/HMMS/hmms-data/h9/AY.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/AY.3.gm b/real/HMMS/hmms-data/h9/AY.3.gm
deleted file mode 100644 (file)
index 73d1699..0000000
Binary files a/real/HMMS/hmms-data/h9/AY.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/B.1.gm b/real/HMMS/hmms-data/h9/B.1.gm
deleted file mode 100644 (file)
index d7aac83..0000000
Binary files a/real/HMMS/hmms-data/h9/B.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/B.2.gm b/real/HMMS/hmms-data/h9/B.2.gm
deleted file mode 100644 (file)
index 3b48d65..0000000
Binary files a/real/HMMS/hmms-data/h9/B.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/B.3.gm b/real/HMMS/hmms-data/h9/B.3.gm
deleted file mode 100644 (file)
index 07b87c9..0000000
Binary files a/real/HMMS/hmms-data/h9/B.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/CH.1.gm b/real/HMMS/hmms-data/h9/CH.1.gm
deleted file mode 100644 (file)
index e9bd140..0000000
Binary files a/real/HMMS/hmms-data/h9/CH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/CH.2.gm b/real/HMMS/hmms-data/h9/CH.2.gm
deleted file mode 100644 (file)
index 77fa7a7..0000000
Binary files a/real/HMMS/hmms-data/h9/CH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/CH.3.gm b/real/HMMS/hmms-data/h9/CH.3.gm
deleted file mode 100644 (file)
index e4b7770..0000000
Binary files a/real/HMMS/hmms-data/h9/CH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/D.1.gm b/real/HMMS/hmms-data/h9/D.1.gm
deleted file mode 100644 (file)
index aa49226..0000000
Binary files a/real/HMMS/hmms-data/h9/D.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/D.2.gm b/real/HMMS/hmms-data/h9/D.2.gm
deleted file mode 100644 (file)
index 07bc722..0000000
Binary files a/real/HMMS/hmms-data/h9/D.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/D.3.gm b/real/HMMS/hmms-data/h9/D.3.gm
deleted file mode 100644 (file)
index 1a2f801..0000000
Binary files a/real/HMMS/hmms-data/h9/D.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/DH.1.gm b/real/HMMS/hmms-data/h9/DH.1.gm
deleted file mode 100644 (file)
index b232257..0000000
Binary files a/real/HMMS/hmms-data/h9/DH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/DH.2.gm b/real/HMMS/hmms-data/h9/DH.2.gm
deleted file mode 100644 (file)
index 184e719..0000000
Binary files a/real/HMMS/hmms-data/h9/DH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/DH.3.gm b/real/HMMS/hmms-data/h9/DH.3.gm
deleted file mode 100644 (file)
index fe6833a..0000000
Binary files a/real/HMMS/hmms-data/h9/DH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/DX.1.gm b/real/HMMS/hmms-data/h9/DX.1.gm
deleted file mode 100644 (file)
index f282a9f..0000000
Binary files a/real/HMMS/hmms-data/h9/DX.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/DX.2.gm b/real/HMMS/hmms-data/h9/DX.2.gm
deleted file mode 100644 (file)
index db5a94f..0000000
Binary files a/real/HMMS/hmms-data/h9/DX.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/DX.3.gm b/real/HMMS/hmms-data/h9/DX.3.gm
deleted file mode 100644 (file)
index 26d4514..0000000
Binary files a/real/HMMS/hmms-data/h9/DX.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EH.1.gm b/real/HMMS/hmms-data/h9/EH.1.gm
deleted file mode 100644 (file)
index fc2ae4f..0000000
Binary files a/real/HMMS/hmms-data/h9/EH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EH.2.gm b/real/HMMS/hmms-data/h9/EH.2.gm
deleted file mode 100644 (file)
index a34084f..0000000
Binary files a/real/HMMS/hmms-data/h9/EH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EH.3.gm b/real/HMMS/hmms-data/h9/EH.3.gm
deleted file mode 100644 (file)
index f10a1be..0000000
Binary files a/real/HMMS/hmms-data/h9/EH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EL.1.gm b/real/HMMS/hmms-data/h9/EL.1.gm
deleted file mode 100644 (file)
index c74955b..0000000
Binary files a/real/HMMS/hmms-data/h9/EL.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EL.2.gm b/real/HMMS/hmms-data/h9/EL.2.gm
deleted file mode 100644 (file)
index 1466e4e..0000000
Binary files a/real/HMMS/hmms-data/h9/EL.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EL.3.gm b/real/HMMS/hmms-data/h9/EL.3.gm
deleted file mode 100644 (file)
index 0841423..0000000
Binary files a/real/HMMS/hmms-data/h9/EL.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EN.1.gm b/real/HMMS/hmms-data/h9/EN.1.gm
deleted file mode 100644 (file)
index a0af686..0000000
Binary files a/real/HMMS/hmms-data/h9/EN.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EN.2.gm b/real/HMMS/hmms-data/h9/EN.2.gm
deleted file mode 100644 (file)
index 3c2484a..0000000
Binary files a/real/HMMS/hmms-data/h9/EN.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EN.3.gm b/real/HMMS/hmms-data/h9/EN.3.gm
deleted file mode 100644 (file)
index d812f7e..0000000
Binary files a/real/HMMS/hmms-data/h9/EN.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/ER.1.gm b/real/HMMS/hmms-data/h9/ER.1.gm
deleted file mode 100644 (file)
index c9743ca..0000000
Binary files a/real/HMMS/hmms-data/h9/ER.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/ER.2.gm b/real/HMMS/hmms-data/h9/ER.2.gm
deleted file mode 100644 (file)
index 966976e..0000000
Binary files a/real/HMMS/hmms-data/h9/ER.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/ER.3.gm b/real/HMMS/hmms-data/h9/ER.3.gm
deleted file mode 100644 (file)
index ad67fb4..0000000
Binary files a/real/HMMS/hmms-data/h9/ER.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EY.1.gm b/real/HMMS/hmms-data/h9/EY.1.gm
deleted file mode 100644 (file)
index 7e52637..0000000
Binary files a/real/HMMS/hmms-data/h9/EY.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EY.2.gm b/real/HMMS/hmms-data/h9/EY.2.gm
deleted file mode 100644 (file)
index 0a4ddfd..0000000
Binary files a/real/HMMS/hmms-data/h9/EY.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/EY.3.gm b/real/HMMS/hmms-data/h9/EY.3.gm
deleted file mode 100644 (file)
index acb4f20..0000000
Binary files a/real/HMMS/hmms-data/h9/EY.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/F.1.gm b/real/HMMS/hmms-data/h9/F.1.gm
deleted file mode 100644 (file)
index aa9a998..0000000
Binary files a/real/HMMS/hmms-data/h9/F.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/F.2.gm b/real/HMMS/hmms-data/h9/F.2.gm
deleted file mode 100644 (file)
index 13f66ec..0000000
Binary files a/real/HMMS/hmms-data/h9/F.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/F.3.gm b/real/HMMS/hmms-data/h9/F.3.gm
deleted file mode 100644 (file)
index 0797f23..0000000
Binary files a/real/HMMS/hmms-data/h9/F.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/G.1.gm b/real/HMMS/hmms-data/h9/G.1.gm
deleted file mode 100644 (file)
index 2d88eba..0000000
Binary files a/real/HMMS/hmms-data/h9/G.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/G.2.gm b/real/HMMS/hmms-data/h9/G.2.gm
deleted file mode 100644 (file)
index b3335e0..0000000
Binary files a/real/HMMS/hmms-data/h9/G.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/G.3.gm b/real/HMMS/hmms-data/h9/G.3.gm
deleted file mode 100644 (file)
index a24f95e..0000000
Binary files a/real/HMMS/hmms-data/h9/G.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/HH.1.gm b/real/HMMS/hmms-data/h9/HH.1.gm
deleted file mode 100644 (file)
index fdc9a1f..0000000
Binary files a/real/HMMS/hmms-data/h9/HH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/HH.2.gm b/real/HMMS/hmms-data/h9/HH.2.gm
deleted file mode 100644 (file)
index 2178c0a..0000000
Binary files a/real/HMMS/hmms-data/h9/HH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/HH.3.gm b/real/HMMS/hmms-data/h9/HH.3.gm
deleted file mode 100644 (file)
index a2f10cf..0000000
Binary files a/real/HMMS/hmms-data/h9/HH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IH.1.gm b/real/HMMS/hmms-data/h9/IH.1.gm
deleted file mode 100644 (file)
index 65df5e6..0000000
Binary files a/real/HMMS/hmms-data/h9/IH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IH.2.gm b/real/HMMS/hmms-data/h9/IH.2.gm
deleted file mode 100644 (file)
index 75b7259..0000000
Binary files a/real/HMMS/hmms-data/h9/IH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IH.3.gm b/real/HMMS/hmms-data/h9/IH.3.gm
deleted file mode 100644 (file)
index 01d1a30..0000000
Binary files a/real/HMMS/hmms-data/h9/IH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IX.1.gm b/real/HMMS/hmms-data/h9/IX.1.gm
deleted file mode 100644 (file)
index a47eacb..0000000
Binary files a/real/HMMS/hmms-data/h9/IX.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IX.2.gm b/real/HMMS/hmms-data/h9/IX.2.gm
deleted file mode 100644 (file)
index caeb72d..0000000
Binary files a/real/HMMS/hmms-data/h9/IX.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IX.3.gm b/real/HMMS/hmms-data/h9/IX.3.gm
deleted file mode 100644 (file)
index 81946d4..0000000
Binary files a/real/HMMS/hmms-data/h9/IX.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IY.1.gm b/real/HMMS/hmms-data/h9/IY.1.gm
deleted file mode 100644 (file)
index aebff7d..0000000
Binary files a/real/HMMS/hmms-data/h9/IY.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IY.2.gm b/real/HMMS/hmms-data/h9/IY.2.gm
deleted file mode 100644 (file)
index 0e4afde..0000000
Binary files a/real/HMMS/hmms-data/h9/IY.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/IY.3.gm b/real/HMMS/hmms-data/h9/IY.3.gm
deleted file mode 100644 (file)
index ae13c7d..0000000
Binary files a/real/HMMS/hmms-data/h9/IY.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/JH.1.gm b/real/HMMS/hmms-data/h9/JH.1.gm
deleted file mode 100644 (file)
index 2715f08..0000000
Binary files a/real/HMMS/hmms-data/h9/JH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/JH.2.gm b/real/HMMS/hmms-data/h9/JH.2.gm
deleted file mode 100644 (file)
index b6d3f5f..0000000
Binary files a/real/HMMS/hmms-data/h9/JH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/JH.3.gm b/real/HMMS/hmms-data/h9/JH.3.gm
deleted file mode 100644 (file)
index ab8bec0..0000000
Binary files a/real/HMMS/hmms-data/h9/JH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/K.1.gm b/real/HMMS/hmms-data/h9/K.1.gm
deleted file mode 100644 (file)
index 4d26829..0000000
Binary files a/real/HMMS/hmms-data/h9/K.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/K.2.gm b/real/HMMS/hmms-data/h9/K.2.gm
deleted file mode 100644 (file)
index 926d406..0000000
Binary files a/real/HMMS/hmms-data/h9/K.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/K.3.gm b/real/HMMS/hmms-data/h9/K.3.gm
deleted file mode 100644 (file)
index afae4a8..0000000
Binary files a/real/HMMS/hmms-data/h9/K.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/L.1.gm b/real/HMMS/hmms-data/h9/L.1.gm
deleted file mode 100644 (file)
index 7138aa0..0000000
Binary files a/real/HMMS/hmms-data/h9/L.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/L.2.gm b/real/HMMS/hmms-data/h9/L.2.gm
deleted file mode 100644 (file)
index 5cc3afc..0000000
Binary files a/real/HMMS/hmms-data/h9/L.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/L.3.gm b/real/HMMS/hmms-data/h9/L.3.gm
deleted file mode 100644 (file)
index f9a4f18..0000000
Binary files a/real/HMMS/hmms-data/h9/L.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/M.1.gm b/real/HMMS/hmms-data/h9/M.1.gm
deleted file mode 100644 (file)
index 116a01d..0000000
Binary files a/real/HMMS/hmms-data/h9/M.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/M.2.gm b/real/HMMS/hmms-data/h9/M.2.gm
deleted file mode 100644 (file)
index 292e9db..0000000
Binary files a/real/HMMS/hmms-data/h9/M.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/M.3.gm b/real/HMMS/hmms-data/h9/M.3.gm
deleted file mode 100644 (file)
index 659039d..0000000
Binary files a/real/HMMS/hmms-data/h9/M.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/N.1.gm b/real/HMMS/hmms-data/h9/N.1.gm
deleted file mode 100644 (file)
index b2cf498..0000000
Binary files a/real/HMMS/hmms-data/h9/N.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/N.2.gm b/real/HMMS/hmms-data/h9/N.2.gm
deleted file mode 100644 (file)
index 1300749..0000000
Binary files a/real/HMMS/hmms-data/h9/N.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/N.3.gm b/real/HMMS/hmms-data/h9/N.3.gm
deleted file mode 100644 (file)
index e37e3ad..0000000
Binary files a/real/HMMS/hmms-data/h9/N.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/NG.1.gm b/real/HMMS/hmms-data/h9/NG.1.gm
deleted file mode 100644 (file)
index a18d810..0000000
Binary files a/real/HMMS/hmms-data/h9/NG.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/NG.2.gm b/real/HMMS/hmms-data/h9/NG.2.gm
deleted file mode 100644 (file)
index 56bfb8c..0000000
Binary files a/real/HMMS/hmms-data/h9/NG.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/NG.3.gm b/real/HMMS/hmms-data/h9/NG.3.gm
deleted file mode 100644 (file)
index 0e54821..0000000
Binary files a/real/HMMS/hmms-data/h9/NG.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/OW.1.gm b/real/HMMS/hmms-data/h9/OW.1.gm
deleted file mode 100644 (file)
index f33a8be..0000000
Binary files a/real/HMMS/hmms-data/h9/OW.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/OW.2.gm b/real/HMMS/hmms-data/h9/OW.2.gm
deleted file mode 100644 (file)
index e5e70b1..0000000
Binary files a/real/HMMS/hmms-data/h9/OW.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/OW.3.gm b/real/HMMS/hmms-data/h9/OW.3.gm
deleted file mode 100644 (file)
index 5cccd88..0000000
Binary files a/real/HMMS/hmms-data/h9/OW.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/OY.1.gm b/real/HMMS/hmms-data/h9/OY.1.gm
deleted file mode 100644 (file)
index b174c84..0000000
Binary files a/real/HMMS/hmms-data/h9/OY.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/OY.2.gm b/real/HMMS/hmms-data/h9/OY.2.gm
deleted file mode 100644 (file)
index 0b59d44..0000000
Binary files a/real/HMMS/hmms-data/h9/OY.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/OY.3.gm b/real/HMMS/hmms-data/h9/OY.3.gm
deleted file mode 100644 (file)
index c33d478..0000000
Binary files a/real/HMMS/hmms-data/h9/OY.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/P.1.gm b/real/HMMS/hmms-data/h9/P.1.gm
deleted file mode 100644 (file)
index 99462d1..0000000
Binary files a/real/HMMS/hmms-data/h9/P.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/P.2.gm b/real/HMMS/hmms-data/h9/P.2.gm
deleted file mode 100644 (file)
index b8f1c11..0000000
Binary files a/real/HMMS/hmms-data/h9/P.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/P.3.gm b/real/HMMS/hmms-data/h9/P.3.gm
deleted file mode 100644 (file)
index e8a4332..0000000
Binary files a/real/HMMS/hmms-data/h9/P.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/R.1.gm b/real/HMMS/hmms-data/h9/R.1.gm
deleted file mode 100644 (file)
index cee2ec8..0000000
Binary files a/real/HMMS/hmms-data/h9/R.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/R.2.gm b/real/HMMS/hmms-data/h9/R.2.gm
deleted file mode 100644 (file)
index d392030..0000000
Binary files a/real/HMMS/hmms-data/h9/R.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/R.3.gm b/real/HMMS/hmms-data/h9/R.3.gm
deleted file mode 100644 (file)
index 1b30bae..0000000
Binary files a/real/HMMS/hmms-data/h9/R.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/S.1.gm b/real/HMMS/hmms-data/h9/S.1.gm
deleted file mode 100644 (file)
index a24f2fc..0000000
Binary files a/real/HMMS/hmms-data/h9/S.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/S.2.gm b/real/HMMS/hmms-data/h9/S.2.gm
deleted file mode 100644 (file)
index e5f70d8..0000000
Binary files a/real/HMMS/hmms-data/h9/S.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/S.3.gm b/real/HMMS/hmms-data/h9/S.3.gm
deleted file mode 100644 (file)
index fda109d..0000000
Binary files a/real/HMMS/hmms-data/h9/S.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/SH.1.gm b/real/HMMS/hmms-data/h9/SH.1.gm
deleted file mode 100644 (file)
index 9f8de4e..0000000
Binary files a/real/HMMS/hmms-data/h9/SH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/SH.2.gm b/real/HMMS/hmms-data/h9/SH.2.gm
deleted file mode 100644 (file)
index fa467c8..0000000
Binary files a/real/HMMS/hmms-data/h9/SH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/SH.3.gm b/real/HMMS/hmms-data/h9/SH.3.gm
deleted file mode 100644 (file)
index ae473b2..0000000
Binary files a/real/HMMS/hmms-data/h9/SH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/SIL.1.gm b/real/HMMS/hmms-data/h9/SIL.1.gm
deleted file mode 100644 (file)
index fe3f5f3..0000000
Binary files a/real/HMMS/hmms-data/h9/SIL.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/SIL.2.gm b/real/HMMS/hmms-data/h9/SIL.2.gm
deleted file mode 100644 (file)
index 3ce93b1..0000000
Binary files a/real/HMMS/hmms-data/h9/SIL.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/SIL.3.gm b/real/HMMS/hmms-data/h9/SIL.3.gm
deleted file mode 100644 (file)
index 1344901..0000000
Binary files a/real/HMMS/hmms-data/h9/SIL.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/T.1.gm b/real/HMMS/hmms-data/h9/T.1.gm
deleted file mode 100644 (file)
index 7313a4d..0000000
Binary files a/real/HMMS/hmms-data/h9/T.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/T.2.gm b/real/HMMS/hmms-data/h9/T.2.gm
deleted file mode 100644 (file)
index 800a38b..0000000
Binary files a/real/HMMS/hmms-data/h9/T.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/T.3.gm b/real/HMMS/hmms-data/h9/T.3.gm
deleted file mode 100644 (file)
index 562fe6b..0000000
Binary files a/real/HMMS/hmms-data/h9/T.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/TH.1.gm b/real/HMMS/hmms-data/h9/TH.1.gm
deleted file mode 100644 (file)
index 70a2a0e..0000000
Binary files a/real/HMMS/hmms-data/h9/TH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/TH.2.gm b/real/HMMS/hmms-data/h9/TH.2.gm
deleted file mode 100644 (file)
index c4acf88..0000000
Binary files a/real/HMMS/hmms-data/h9/TH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/TH.3.gm b/real/HMMS/hmms-data/h9/TH.3.gm
deleted file mode 100644 (file)
index 4135128..0000000
Binary files a/real/HMMS/hmms-data/h9/TH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/UH.1.gm b/real/HMMS/hmms-data/h9/UH.1.gm
deleted file mode 100644 (file)
index f6f79a7..0000000
Binary files a/real/HMMS/hmms-data/h9/UH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/UH.2.gm b/real/HMMS/hmms-data/h9/UH.2.gm
deleted file mode 100644 (file)
index 4c11d62..0000000
Binary files a/real/HMMS/hmms-data/h9/UH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/UH.3.gm b/real/HMMS/hmms-data/h9/UH.3.gm
deleted file mode 100644 (file)
index 2f4c7f3..0000000
Binary files a/real/HMMS/hmms-data/h9/UH.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/UW.1.gm b/real/HMMS/hmms-data/h9/UW.1.gm
deleted file mode 100644 (file)
index 99e0efc..0000000
Binary files a/real/HMMS/hmms-data/h9/UW.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/UW.2.gm b/real/HMMS/hmms-data/h9/UW.2.gm
deleted file mode 100644 (file)
index 0af5fe6..0000000
Binary files a/real/HMMS/hmms-data/h9/UW.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/UW.3.gm b/real/HMMS/hmms-data/h9/UW.3.gm
deleted file mode 100644 (file)
index a42a005..0000000
Binary files a/real/HMMS/hmms-data/h9/UW.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/V.1.gm b/real/HMMS/hmms-data/h9/V.1.gm
deleted file mode 100644 (file)
index b1420c1..0000000
Binary files a/real/HMMS/hmms-data/h9/V.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/V.2.gm b/real/HMMS/hmms-data/h9/V.2.gm
deleted file mode 100644 (file)
index 0986766..0000000
Binary files a/real/HMMS/hmms-data/h9/V.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/V.3.gm b/real/HMMS/hmms-data/h9/V.3.gm
deleted file mode 100644 (file)
index 7a2a28e..0000000
Binary files a/real/HMMS/hmms-data/h9/V.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/W.1.gm b/real/HMMS/hmms-data/h9/W.1.gm
deleted file mode 100644 (file)
index 358f918..0000000
Binary files a/real/HMMS/hmms-data/h9/W.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/W.2.gm b/real/HMMS/hmms-data/h9/W.2.gm
deleted file mode 100644 (file)
index 15b6021..0000000
Binary files a/real/HMMS/hmms-data/h9/W.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/W.3.gm b/real/HMMS/hmms-data/h9/W.3.gm
deleted file mode 100644 (file)
index 01b4bb3..0000000
Binary files a/real/HMMS/hmms-data/h9/W.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/Y.1.gm b/real/HMMS/hmms-data/h9/Y.1.gm
deleted file mode 100644 (file)
index 106a7c0..0000000
Binary files a/real/HMMS/hmms-data/h9/Y.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/Y.2.gm b/real/HMMS/hmms-data/h9/Y.2.gm
deleted file mode 100644 (file)
index 1c5a790..0000000
Binary files a/real/HMMS/hmms-data/h9/Y.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/Y.3.gm b/real/HMMS/hmms-data/h9/Y.3.gm
deleted file mode 100644 (file)
index 8884d47..0000000
Binary files a/real/HMMS/hmms-data/h9/Y.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/Z.1.gm b/real/HMMS/hmms-data/h9/Z.1.gm
deleted file mode 100644 (file)
index e0219ef..0000000
Binary files a/real/HMMS/hmms-data/h9/Z.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/Z.2.gm b/real/HMMS/hmms-data/h9/Z.2.gm
deleted file mode 100644 (file)
index 9a7852b..0000000
Binary files a/real/HMMS/hmms-data/h9/Z.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/Z.3.gm b/real/HMMS/hmms-data/h9/Z.3.gm
deleted file mode 100644 (file)
index 065bcbe..0000000
Binary files a/real/HMMS/hmms-data/h9/Z.3.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/ZH.1.gm b/real/HMMS/hmms-data/h9/ZH.1.gm
deleted file mode 100644 (file)
index a45de57..0000000
Binary files a/real/HMMS/hmms-data/h9/ZH.1.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/ZH.2.gm b/real/HMMS/hmms-data/h9/ZH.2.gm
deleted file mode 100644 (file)
index e160009..0000000
Binary files a/real/HMMS/hmms-data/h9/ZH.2.gm and /dev/null differ
diff --git a/real/HMMS/hmms-data/h9/ZH.3.gm b/real/HMMS/hmms-data/h9/ZH.3.gm
deleted file mode 100644 (file)
index 9e0dceb..0000000
Binary files a/real/HMMS/hmms-data/h9/ZH.3.gm and /dev/null differ
diff --git a/real/HMMS/lib/haskell/GhcPrintf.hs b/real/HMMS/lib/haskell/GhcPrintf.hs
deleted file mode 100644 (file)
index 84812fb..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
---
--- A C printf like formatter.
--- Conversion specs:
---     -       left adjust
---     num     field width
---      *       as num, but taken from argument list
---     .       separates width from precision
--- Formatting characters:
---     c       Char, Int, Integer
---     d       Char, Int, Integer
---     o       Char, Int, Integer
---     x       Char, Int, Integer
---     u       Char, Int, Integer
---     f       Float, Double
---     g       Float, Double
---     e       Float, Double
---     s       String
---
-module GhcPrintf(UPrintf(..), printf) where
-
---partain: import LMLfmtf
-
--- partain: for GHC:
-import PreludeGlaIO
-import PackedString
-import Builtin         ( unpackLitString# )
-
-data UPrintf = UChar Char | UString String | UInt Int | UInteger Integer | UFloat Float | UDouble Double
-
-printf :: String -> [UPrintf] -> String
-printf ""       []       = ""
-printf ""       (_:_)    = fmterr
-printf ('%':'%':cs) us   = '%':printf cs us
-printf ('%':_)  []       = argerr
-printf ('%':cs) us@(_:_) = fmt cs us
-printf (c:cs)   us       = c:printf cs us
-
-fmt :: String -> [UPrintf] -> String
-fmt cs us =
-       let (width, prec, ladj, zero, cs', us') = getSpecs False False cs us
-           adjust (pre, str) = 
-               let lstr = length str
-                   lpre = length pre
-                   fill = if lstr+lpre < width then take (width-(lstr+lpre)) (repeat (if zero then '0' else ' ')) else ""
-               in  if ladj then pre ++ str ++ fill else if zero then pre ++ fill ++ str else fill ++ pre ++ str
-        in
-       case cs' of
-       []     -> fmterr
-       c:cs'' ->
-           case us' of
-           []     -> argerr
-           u:us'' ->
-               (case c of
-               'c' -> adjust ("", [toEnum (toint u)])
-               'd' -> adjust (fmti u)
-               'x' -> adjust ("", fmtu 16 u)
-               'o' -> adjust ("", fmtu 8  u)
-               'u' -> adjust ("", fmtu 10 u)
-               'e' -> adjust (dfmt c prec (todbl u))
-               'f' -> adjust (dfmt c prec (todbl u))
-               'g' -> adjust (dfmt c prec (todbl u))
-               's' -> adjust ("", tostr u)
-               c   -> perror ("bad formatting char " ++ [c])
-               ) ++ printf cs'' us''
-
-fmti (UInt i)     = if i < 0 then
-                       if i == -i then fmti (UInteger (toInteger i)) else ("-", itos (-i))
-                   else
-                       ("", itos i)
-fmti (UInteger i) = if i < 0 then ("-", itos (-i)) else ("", itos i)
-fmti (UChar c)    = fmti (UInt (fromEnum c))
-fmti u           = baderr
-
-fmtu b (UInt i)     = if i < 0 then
-                         if i == -i then itosb b (maxi - toInteger (i+1) - 1) else itosb b (maxi - toInteger (-i))
-                     else
-                         itosb b (toInteger i)
-fmtu b (UInteger i) = itosb b i
-fmtu b (UChar c)    = itosb b (toInteger (fromEnum c))
-fmtu b u            = baderr
-
-maxi :: Integer
-maxi = (toInteger maxInt + 1) * 2
-
-toint (UInt i)     = i
-toint (UInteger i) = toInt i
-toint (UChar c)    = fromEnum c
-toint u                   = baderr
-
-tostr (UString s) = s
-tostr u                  = baderr
-
-todbl (UDouble d) = d
-todbl (UFloat f)  = fromRational (toRational f)
-todbl u           = baderr
-
-itos n = 
-       if n < 10 then 
-           [toEnum (fromEnum '0' + toInt n)]
-       else
-           let (q, r) = quotRem n 10 in
-           itos q ++ [toEnum (fromEnum '0' + toInt r)]
-
-chars = array (0,15) (zipWith (:=) [0..] "0123456789abcdef")
-itosb :: Integer -> Integer -> String
-itosb b n = 
-       if n < b then 
-           [chars!n]
-       else
-           let (q, r) = quotRem n b in
-           itosb b q ++ [chars!r]
-
-stoi :: Int -> String -> (Int, String)
-stoi a (c:cs) | isDigit c = stoi (a*10 + fromEnum c - fromEnum '0') cs
-stoi a cs                 = (a, cs)
-
-getSpecs :: Bool -> Bool -> String -> [UPrintf] -> (Int, Int, Bool, Bool, String, [UPrintf])
-getSpecs l z ('-':cs) us = getSpecs True z cs us
-getSpecs l z ('0':cs) us = getSpecs l True cs us
-getSpecs l z ('*':cs) us = 
-        case us of
-        [] -> argerr
-        nu : us' ->
-           let n = toint nu
-               (p, cs'', us'') =
-                   case cs of
-                    '.':'*':r -> case us' of { [] -> argerr; pu:us'' -> (toint pu, r, us'') }
-                   '.':r     -> let (n, cs') = stoi 0 r in (n, cs', us')
-                   _         -> (-1, cs, us')
-           in  (n, p, l, z, cs'', us'')
-getSpecs l z cs@(c:_) us | isDigit c =
-       let (n, cs') = stoi 0 cs
-           (p, cs'') = case cs' of
-                       '.':r -> stoi 0 r
-                       _     -> (-1, cs')
-       in  (n, p, l, z, cs'', us)
-getSpecs l z cs       us = (0, -1, l, z, cs, us)
-
-dfmt c{-e,f, or g-} prec (D# d)
-  = unsafePerformIO (
-    let
-       sprintf_here = toCString (packString (take 512 (repeat '0'))) -- pathetic malloc
-       sprintf_fmt  = toCString (packString ("%1" ++ (if prec < 0 then "" else '.':itos prec) ++ [c]))
-    in
-    ccall sprintf sprintf_here sprintf_fmt d `thenIO_Int#` \ a_litstring# ->
-    returnIO (
-    case (unpackLitString# (int2LitString# a_litstring#)) of
-      '-':cs -> ("-", cs)
-      cs     -> ("" , cs)
-    ))
-
-
-{- HBC:
-dfmt c p d = 
-       case fmtf ("1" ++ (if p < 0 then "" else '.':itos p) ++ [c]) d of
-       '-':cs -> ("-", cs)
-       cs     -> ("" , cs)
--}
-
-perror s = error ("Printf.printf: "++s)
-fmterr = perror "formatting string ended prematurely"
-argerr = perror "argument list ended prematurely"
-baderr = perror "bad argument"
diff --git a/real/HMMS/lib/haskell/SignalIO.lhs b/real/HMMS/lib/haskell/SignalIO.lhs
deleted file mode 100644 (file)
index 8ac9d25..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-        WARNING: Those functions that read native-mode binary files
-use the module \verb~Native~ that is provided by the Chalmers Haskell
-compiler, ``hbc.''  As of now, standard Haskell does not provide a
-capability for reading native-mode binary files.
-        \begin{haskell}{SignalIO}
-
-> module SignalIO(
->       ) where
-
-> import Native
-
-\end{haskell}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section*{readVectors}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
diff --git a/real/HMMS/sentences b/real/HMMS/sentences
deleted file mode 100644 (file)
index bf9d3d6..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-data/dmg_01
-data/dmg_02
-data/dmg_03
-data/dmg_04
-data/dmg_05
-data/dmg_06
diff --git a/real/HMMS/vocabulary b/real/HMMS/vocabulary
deleted file mode 100644 (file)
index d992e0f..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-A
-AFTERNOON
-AM
-AN
-DAY
-FIVE
-FOUR
-HAS
-I
-IN
-IS
-IT
-NO
-NOW
-OFFICE
-ONE
-ONLY
-SITTING
-SPRING
-TEST
-THAT
-THIS
-THREE
-TUESDAY
-TWO
-WARM
-WINDOWS
index b109b91..dfc9b4f 100644 (file)
@@ -5,9 +5,7 @@ SUBDIRS = anna bspt cacheprof compress compress2 fem fluid fulsom gamteb gg \
           grep hidden hpg infer lift maillist mkhprog parser pic prolog \
           reptile rsa scs symalg veritas
 
-# Omitted: 
-#      HMMS    binary file endian-ness problems
-OTHER_SUBDIRS = HMMS PolyGP linear rx
+OTHER_SUBDIRS = PolyGP ebnf2ps linear rx
 
 include $(TOP)/mk/target.mk