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) * 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 (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_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 (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_CLUSTERconfnet_create (WordGraph *root, RecogProcess *r)
 Create a confusion network from word graph.

変数

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.


説明

Confusion network の生成

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

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

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(), と get_cluster_intraword_similarity().

static boolean graph_ordered ( 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.c114 行で定義されています。

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.c166 行で定義されています。

static CN_CLUSTER* cn_new (  )  [static]

Create a new cluster holder.

戻り値:
the newly allocated cluster holder.

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

static void cn_free ( CN_CLUSTER c  )  [static]

Free a cluster holder

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

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

参照元 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.c267 行で定義されています。

参照元 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.c286 行で定義されています。

参照元 cn_merge().

static void cn_merge ( 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.c303 行で定義されています。

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.c334 行で定義されています。

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.c360 行で定義されています。

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

qsort callback to sort clusters by their time order.

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

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

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.c428 行で定義されています。

参照元 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.c488 行で定義されています。

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.c535 行で定義されています。

static int edit_distance ( WORD_ID  w1,
WORD_ID  w2,
WORD_INFO winfo 
) [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.c557 行で定義されています。

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

Compute inter-word similarity of two clusters.

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

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

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.c702 行で定義されています。


Juliusに対してTue Dec 18 16:04:49 2007に生成されました。  doxygen 1.5.4