#include <julius/julius.h>
Go to the source code of this file.
Defines | |
#define | PREFER_GRAPH_CM |
Define to enable debug output. | |
#define | BUNDLE_WORD_WITH_SAME_OUTPUT |
Julius identify the words by their dictionary IDs, so words with different entries are treated as a different word. | |
#define | m2i(A, B) (B) * order_matrix_count + (A) |
Macro to access the order matrix. | |
Functions | |
static boolean | is_same_word (WORD_ID w1, WORD_ID w2, WORD_INFO *winfo) |
Determine whether the two words are idential in confusion network generation. | |
static boolean | graph_ordered (int i, int j) |
Judge order between two words by their word graph ID. | |
static void | graph_update_order () |
Scan the order matrix to update it at initial step and after word (set) marging. | |
void | graph_make_order (WordGraph *root, RecogProcess *r) |
Extract order relationship between any two words in the word graph for confusion network generation. | |
void | graph_free_order () |
Free the order relation data. | |
static CN_CLUSTER * | cn_new () |
Create a new cluster holder. | |
static void | cn_free (CN_CLUSTER *c) |
Free a cluster holder. | |
void | cn_free_all (CN_CLUSTER **croot) |
Free all cluster holders. | |
static void | cn_add_wg (CN_CLUSTER *c, WordGraph *wg) |
Add a graph word to a cluster holder. | |
static void | cn_merge (CN_CLUSTER *dst, CN_CLUSTER *src) |
Merge a cluster holder into another. | |
static void | cn_destroy (CN_CLUSTER *target, CN_CLUSTER **root) |
Erase a cluster holder and remove it from the list. | |
static void | cn_build_wordlist (CN_CLUSTER *c, WORD_INFO *winfo) |
Build / update word list from graph words for a cluster holder. | |
static int | compare_cluster (CN_CLUSTER **x, CN_CLUSTER **y) |
qsort callback to sort clusters by their time order. | |
static PROB | get_intraword_similarity (WordGraph *w1, WordGraph *w2) |
Compute intra-word similarity of two graph words for confusion network generation. | |
static PROB | get_cluster_intraword_similarity (CN_CLUSTER *c1, CN_CLUSTER *c2, WORD_INFO *winfo) |
Compute intra-word similarity of two clusters. | |
static int | minimum (int a, int b, int c) |
Return minimum value of the three arguments. | |
static int | edit_distance (WORD_ID w1, WORD_ID w2, WORD_INFO *winfo) |
Calculate Levenstein distance (edit distance) of two words. | |
static PROB | get_cluster_interword_similarity (CN_CLUSTER *c1, CN_CLUSTER *c2, WORD_INFO *winfo) |
Compute inter-word similarity of two clusters. | |
CN_CLUSTER * | confnet_create (WordGraph *root, RecogProcess *r) |
Create a confusion network from word graph. | |
Variables | |
static char * | order_matrix = NULL |
Temporal matrix work area to hold the order relations between words. | |
static int | order_matrix_count |
Number of words to be expressed in the order matrix. |
Generate confusion network from the obtained word lattice.
Definition in file confnet.c.
#define PREFER_GRAPH_CM |
Define to enable debug output.
Define to enable further debug output. Use graph-based CM for confusion network generation. If not defined search-based CM (default of old julius) will be used. However, the clustering process does not work properly with this definition, since sum of the search- based CM for a word set on the same position is not always 1.0. Thus you'd better always define this.
#define BUNDLE_WORD_WITH_SAME_OUTPUT |
Julius identify the words by their dictionary IDs, so words with different entries are treated as a different word.
If this is defined, Julius treat words with the same output string as same words and bundle them in confusion network generation.
Definition at line 61 of file confnet.c.
Referenced by is_same_word().
Determine whether the two words are idential in confusion network generation.
w1 | [in] first word | |
w2 | [in] second word | |
winfo | [in] word dictionary |
Definition at line 75 of file confnet.c.
Referenced by cn_build_wordlist(), and get_cluster_intraword_similarity().
static boolean graph_ordered | ( | int | i, | |
int | j | |||
) | [static] |
void graph_make_order | ( | WordGraph * | root, | |
RecogProcess * | r | |||
) |
static CN_CLUSTER* cn_new | ( | ) | [static] |
static void cn_free | ( | CN_CLUSTER * | c | ) | [static] |
Free a cluster holder.
c | [out] a cluster holder to be released. |
Definition at line 249 of file confnet.c.
Referenced by cn_destroy(), and cn_free_all().
void cn_free_all | ( | CN_CLUSTER ** | croot | ) |
Free all cluster holders.
croot | [out] pointer to root pointer of cluster holder list. |
Definition at line 267 of file confnet.c.
Referenced by clear_result().
static void cn_add_wg | ( | CN_CLUSTER * | c, | |
WordGraph * | wg | |||
) | [static] |
Add a graph word to a cluster holder.
c | [out] cluster holder | |
wg | [in] graph word to be added |
Definition at line 286 of file confnet.c.
Referenced by cn_merge().
static void cn_merge | ( | CN_CLUSTER * | dst, | |
CN_CLUSTER * | src | |||
) | [static] |
static void cn_destroy | ( | CN_CLUSTER * | target, | |
CN_CLUSTER ** | root | |||
) | [static] |
static void cn_build_wordlist | ( | CN_CLUSTER * | c, | |
WORD_INFO * | winfo | |||
) | [static] |
static int compare_cluster | ( | CN_CLUSTER ** | x, | |
CN_CLUSTER ** | y | |||
) | [static] |
Compute intra-word similarity of two graph words for confusion network generation.
w1 | [in] graph word 1 | |
w2 | [in] graph word 2 |
Definition at line 428 of file confnet.c.
Referenced by get_cluster_intraword_similarity().
static PROB get_cluster_intraword_similarity | ( | CN_CLUSTER * | c1, | |
CN_CLUSTER * | c2, | |||
WORD_INFO * | winfo | |||
) | [static] |
static int minimum | ( | int | a, | |
int | b, | |||
int | c | |||
) | [static] |
static PROB get_cluster_interword_similarity | ( | CN_CLUSTER * | c1, | |
CN_CLUSTER * | c2, | |||
WORD_INFO * | winfo | |||
) | [static] |
CN_CLUSTER* confnet_create | ( | WordGraph * | root, | |
RecogProcess * | r | |||
) |