#include <julius/julius.h>
マクロ定義 | |
| #define | PREFER_GRAPH_CM |
| Use graph-based CM for confusion network generation. | |
| #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_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 (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_CLUSTER * | confnet_create (WordGraph *root, RecogProcess *r) |
| Create a confusion network from word graph. | |
認識の結果得られた単語グラフから,confusion network を生成する.
confnet.c で定義されています。
| #define PREFER_GRAPH_CM |
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.
参照元 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 |
| 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 |
| 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. |
| void cn_free_all | ( | CN_CLUSTER ** | croot | ) |
Free all cluster holders.
| croot | [out] pointer to root pointer of cluster holder list. |
参照元 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_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_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_create().
| static void cn_build_wordlist | ( | CN_CLUSTER * | c, | |
| WORD_INFO * | winfo | |||
| ) | [static] |
| static int compare_cluster | ( | CN_CLUSTER ** | x, | |
| CN_CLUSTER ** | y, | |||
| RecogProcess * | r | |||
| ) | [static] |
Compute intra-word similarity of two graph words for confusion network generation.
| w1 | [in] graph word 1 | |
| w2 | [in] graph word 2 |
| 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 |
参照元 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 |
参照元 edit_distance().
| static PROB get_cluster_interword_similarity | ( | RecogProcess * | r, | |
| CN_CLUSTER * | c1, | |||
| CN_CLUSTER * | c2, | |||
| WORD_INFO * | winfo, | |||
| char * | buf1, | |||
| char * | buf2 | |||
| ) | [static] |
| CN_CLUSTER* confnet_create | ( | WordGraph * | root, | |
| RecogProcess * | r | |||
| ) |
1.5.1