"ClusterEventMapGetMapping" clusters the leaves of the EventMap, with "thresh" a delta-likelihood threshold to control how many leaves we combine (might be the same as the delta-like threshold used in splitting. More...

"ClusterEventMapGetMapping" clusters the leaves of the EventMap, with "thresh" a delta-likelihood threshold to control how many leaves we combine (might be the same as the delta-like threshold used in splitting.

might correspond to central phone (key = P-1), or HMM-state position (key == kPdfClass == -1). Stats used to work out possible values of the event. "num_leaves" is used to allocate new leaves. All stats must have this key defined, or this function will crash.

DoTableSplitMultiple does a complete split on all the keys, in order from keys[0], keys[1] and so on.

The stats are used to work out possible values corresponding to the key. "num_leaves" is used to allocate new leaves. All stats must have the keys defined, or this function will crash. Returns a newly allocated event map.

Given stats and a vector "assignments" of the same size (that maps to cluster indices), sums the stats up into "clusters." It will add to any stats already present in "clusters" (although typically "clusters" will be empty when called), and it will extend with NULL pointers for any unseen indices.

GetStubMap is used in tree-building functions to get the initial to-states map, before the decision-tree-building process.

It creates a simple map that splits on groups of phones. For the set of phones in phone_sets[i] it creates either: if share_roots[i] == true, a single leaf node, or if share_roots[i] == false, separate root nodes for each HMM-position (it goes up to the highest position for any phone in the set, although it will warn if you share roots between phones with different numbers of states, which is a weird thing to do but should still work. If any phone is present in "phone_sets" but "phone2num_pdf_classes" does not map it to a length, it is an error. Note that the behaviour of the resulting map is undefined for phones not present in "phone_sets". At entry, this function should be called with (*num_leaves == 0). It will number the leaves starting from (*num_leaves).

ShareEventMapLeaves performs a quite specific function that allows us to generate trees where, for a certain list of phones, and for all states in the phone, all the pdf's are shared.

Each element of "values" contains a list of phones (may be just one phone), all states of which we want shared together). Typically at input, "key" will equal P, the central-phone position, and "values" will contain just one list containing the silence phone. This function renumbers the event map leaves after doing the sharing, to make the event-map leaves contiguous.