Julius 4.2
マクロ定義 | 関数
libjulius/src/confnet.c

Confusion network の生成 [詳細]

#include <julius/julius.h>

ソースコードを見る。

マクロ定義

#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) * r->order_matrix_count + (A)
 Macro to access the order matrix.

関数

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 (RecogProcess *r, int i, int j)
 Judge order between two words by their word graph ID.
static void graph_update_order (RecogProcess *r)
 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 (RecogProcess *r)
 Free the order relation data.
static CN_CLUSTERcn_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 (RecogProcess *r, 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, RecogProcess *r)
 qsort_reentrant 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, char *b1, char *b2)
 Calculate Levenstein distance (edit distance) of two words.
static PROB get_cluster_interword_similarity (RecogProcess *r, CN_CLUSTER *c1, CN_CLUSTER *c2, WORD_INFO *winfo, char *buf1, char *buf2)
 Compute inter-word similarity of two clusters.
CN_CLUSTERconfnet_create (WordGraph *root, RecogProcess *r)
 Create a confusion network from word graph.

説明

Confusion network の生成

認識の結果得られた単語グラフから,confusion network を生成する.

作者:
Akinobu Lee
日付:
Thu Aug 16 00:15:51 2007
Revision:
1.5

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.

confnet.c52 行で定義されています。

#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.

confnet.c61 行で定義されています。

参照元 is_same_word().


関数

static boolean is_same_word ( WORD_ID  w1,
WORD_ID  w2,
WORD_INFO winfo 
) [static]

Determine whether the two words are idential in confusion network generation.

引数:
w1[in] first word
w2[in] second word
winfo[in] word dictionary
戻り値:
TRUE if they are idential, FALSE if not.

confnet.c75 行で定義されています。

参照元 cn_build_wordlist(), confnet_create(), get_cluster_interword_similarity(), と get_cluster_intraword_similarity().

static boolean graph_ordered ( RecogProcess r,
int  i,
int  j 
) [static]

Judge order between two words by their word graph ID.

引数:
i[in] id of left graph word
j[in] id of right graph word
戻り値:
TRUE if they are ordered, or FALSE if not.

confnet.c102 行で定義されています。

参照元 get_cluster_interword_similarity().

void graph_make_order ( WordGraph root,
RecogProcess r 
)

Extract order relationship between any two words in the word graph for confusion network generation.

引数:
root[in] root pointer to the word graph
r[in] recognition process instance

confnet.c154 行で定義されています。

参照元 wchmm_fbs().

関数の呼び出しグラフ:

呼出しグラフ:

static CN_CLUSTER* cn_new ( ) [static]

Create a new cluster holder.

戻り値:
the newly allocated cluster holder.

confnet.c220 行で定義されています。

参照元 confnet_create().

static void cn_free ( CN_CLUSTER c) [static]

Free a cluster holder.

引数:
c[out] a cluster holder to be released.

confnet.c240 行で定義されています。

参照元 cn_destroy(), と cn_free_all().

void cn_free_all ( CN_CLUSTER **  croot)

Free all cluster holders.

引数:
croot[out] pointer to root pointer of cluster holder list.

confnet.c258 行で定義されています。

参照元 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

confnet.c277 行で定義されています。

参照元 cn_merge(), と confnet_create().

static void cn_merge ( RecogProcess r,
CN_CLUSTER dst,
CN_CLUSTER src 
) [static]

Merge a cluster holder into another.

引数:
dst[i/o] target cluster holder
src[in] source cluster holder.

confnet.c294 行で定義されています。

参照元 confnet_create().

static void cn_destroy ( CN_CLUSTER target,
CN_CLUSTER **  root 
) [static]

Erase a cluster holder and remove it from the list.

引数:
target[i/o] a cluster holder to be erased
root[i/o] pointer to root pointer of cluster holder list

confnet.c325 行で定義されています。

参照元 confnet_create().

static void cn_build_wordlist ( CN_CLUSTER c,
WORD_INFO winfo 
) [static]

Build / update word list from graph words for a cluster holder.

引数:
c[i/o] cluster holder to process
winfo[in] word dictionary

confnet.c351 行で定義されています。

参照元 confnet_create().

static int compare_cluster ( CN_CLUSTER **  x,
CN_CLUSTER **  y,
RecogProcess r 
) [static]

qsort_reentrant callback to sort clusters by their time order.

引数:
x[in] element 1
y[in] element 2
r[in] recognition process instance
戻り値:
order value

confnet.c381 行で定義されています。

参照元 confnet_create().

static PROB get_intraword_similarity ( WordGraph w1,
WordGraph w2 
) [static]

Compute intra-word similarity of two graph words for confusion network generation.

引数:
w1[in] graph word 1
w2[in] graph word 2
戻り値:
the similarity value.

confnet.c421 行で定義されています。

参照元 get_cluster_intraword_similarity().

static PROB get_cluster_intraword_similarity ( CN_CLUSTER c1,
CN_CLUSTER c2,
WORD_INFO winfo 
) [static]

Compute intra-word similarity of two clusters.

引数:
c1[in] cluster 1
c2[in] cluster 2
winfo[in] word dictionary
戻り値:
the maximum similarity.

confnet.c482 行で定義されています。

参照元 confnet_create().

static int minimum ( int  a,
int  b,
int  c 
) [static]

Return minimum value of the three arguments.

引数:
a[in] value 1
b[in] value 2
c[in] value 3
戻り値:
the minumum value.

confnet.c530 行で定義されています。

参照元 edit_distance().

static int edit_distance ( WORD_ID  w1,
WORD_ID  w2,
WORD_INFO winfo,
char *  b1,
char *  b2 
) [static]

Calculate Levenstein distance (edit distance) of two words.

引数:
w1[in] word ID 1
w2[in] word ID 2
winfo[in] word dictionary
戻り値:
the distance.

confnet.c552 行で定義されています。

参照元 get_cluster_interword_similarity().

static PROB get_cluster_interword_similarity ( RecogProcess r,
CN_CLUSTER c1,
CN_CLUSTER c2,
WORD_INFO winfo,
char *  buf1,
char *  buf2 
) [static]

Compute inter-word similarity of two clusters.

引数:
c1[in] cluster 1
c2[in] cluster 2
winfo[in] word dictionary
戻り値:
the average similarity.

confnet.c596 行で定義されています。

参照元 confnet_create().

CN_CLUSTER* confnet_create ( WordGraph root,
RecogProcess r 
)

Create a confusion network from word graph.

引数:
root[in] root pointer of word graph
r[in] recognition process instance
戻り値:
root pointer to the cluster list.

confnet.c697 行で定義されています。

参照元 wchmm_fbs().

関数の呼び出しグラフ:

呼出しグラフ: