1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
|
* Anthy饤֥λˡ *
饤֥Υץ -lanthy -lanthydic
(⤷pkg-configanthyꤹ)
롼ɥե anthy/anthy.h
+anthy_ ǻϤޤؿ̾ϥ饤֥λѤΤͽƤ
* ǡ *
anthy_conv_stat ߤѴξ֤뤿Ѥ
ʸĤʸʬ䤵줿뤳ȤǤ
anthy_segment_stat ʸξ֤뤿Ѥ
ʸĤѴäƤ뤫뤳ȤǤ
ʸĹ뤳ȤǤ(ƥ)
anthy_prediction_stat ͽ¬ο뤳ȤǤ
anthy_context_t ѴΥƥȤ̤뤿Ѥ
ݥǤ
char * ǥեȤǤϥɤˤEUC-JPѤ롣
* ؿγ *
ؿ
anthy_init Anthyν
anthy_conf_override ι
anthy_set_personality ѡʥƥ
anthy_quit Anthyνλ
ƥȤδ
anthy_create_context ѴƥȤκ
anthy_reset_context ѴƥȤΥꥻå
anthy_release_context ѴƥȲ
ƥȤФ
anthy_set_string Ѵʸ
anthy_resize_segment ʸο
Ѵ̤μ
anthy_get_stat Ѵ̤ʸμ
anthy_get_segment_stat ʸФμ
anthy_get_segment μ
̤Υߥå
anthy_commit_segment Ѵ̤Υߥå
ͽ¬
anthy_set_prediction_string ͽ¬Ϥʸ
anthy_get_prediction_stat ͽ¬Ϥξ֤μ
anthy_get_prediction ͽ¬ʸμ
anthy_commit_prediction ͽ¬ʸγ
Ѵ
anthy_set_reconversion_mode Ѵ⡼ɤ
ǥ
anthy_context_set_encoding ǥ
¾
anthy_print_context ѴƥȤƤɽ
anthy_get_version_string AnthyΥС
anthy_set_logger ѤδؿåȤ
* ƴؿ *
int anthy_init(void)
: ̵
֤: 0 ʤ -1ʤ鼺
anthyΤνԤanthy_conf_override()ʳδؿ
ƤƤФʤȤʤ
void anthy_conf_override(char *var, char *val);
: var ѿ̾
val
֤: ̵
*ѿˤĤƤϽҤ٤ʤ
*anthy_init˸Ƥ֤ȤˤäơưѤ뤳ȤǤ롣
int anthy_set_personality(char *id);
: var ѿ̾
֤: ˤ0Իˤ-1
*personalityѹ롣ǽcontextޤǤ
٤Ǥ롣
*ѤǤʸϥե̾˻ȤʸƱ
void anthy_quit(void);
: ̵
֤: ̵
*Anthy librarydzݤʤɤΥ
*ǤϼƤʤ
*ץꥱλ˸ƽФɬפ̵
anthy_context_t anthy_create_context(void);
: ̵
֤: ƥ Ԥʤ0
*ѴƥȤ롣
void anthy_reset_context(anthy_context_t ac);
: ac ƥ
֤: ̵
*ѴƥȤꥻåȤ롣
void anthy_release_context(anthy_context_t ac);
: ac ƥ
֤: ̵
*ѴƥȤ롣
*ΥƥȤϤʹȤʤ
int anthy_set_string(anthy_context_t ac, char *str);
: ac ƥ
str Ѵоݤʸ
֤: ˤ0Իˤ-1
*ѴƥȤʸꤹ롣
*ΥƥȤ˴Ϣ뤽ޤǤξ˴롣
*strEUC-JPͿ롣
*ʺʸϤ硢ƴöҤ餬ʤѴ
ѴԤ
void anthy_resize_segment(anthy_context_t ac, int nth, int resize);
: ac ƥ
nth ʸΥǥå 0Ϥޤ
resize ʸʸФ
֤: ̵
*ʸ̤롣
*resizeοͿ뤳Ȥˤäʸ̤뤳ȤǤ롣
*̵ξ̵뤵롣
int anthy_get_stat(anthy_context_t ac, struct anthy_conv_stat *cs);
: ac ƥ
cs anthy_conv_stat
֤: ξ0
*ߤΥƥȤξ֤롣
*ƥȤꤷʸĤʸʬ䤵줿Τ뤳ȤǤ롣
int anthy_get_segment_stat(anthy_context_t ac, int n, struct anthy_segment_stat *ss);
: ac ƥ
n ʸֹ 0Ϥޤ
ss anthy_segment_stat
֤: ξ0
*ߤΥƥȤnܤʸξ֤롣
*ʸˤĤθ䤬뤫Τ뤳ȤǤ롣
int anthy_get_segment(anthy_context_t ac, int s, int n, char *buf, int len);
: ac ƥ
s ʸֹ 0Ϥޤ
n ֹ 0Ϥޤ
buf ʸХåե
len ХåեĹ
nNTH_UNCONVERTED_CANDIDATEꤹ
ѴΤҤ餬ʸ뤳ȤǤ(Ѵ
(anthy_set_string)Ԥʤä硢٤Ҥ餬ʤ
Ѵ줿ʸоݤȤʤ)
¾ˤ⼡θֹ椬Ǥ
NTH_KATAKANA_CANDIDATE ʤθ
NTH_HIRAGANA_CANDIDATE ʿ̾θ
NTH_HALFKANA_CANDIDATE Ⱦѥʤθ
NTH_HALFKANA_CANDIDATE˸¤ꤷƤؽϹԤʤ
֤: Ԥξ -1ξʸ(nullϴޤޤʤ)֤
*sܤʸnܤθ뤳ȤǤ롣
*̤buf˺Ǹnull terminateޤǴޤlenХȤޤdzݤ롣
*⤷buf nullǤз̤ΥԡϹԤʤ
(ѤƳݤ٤ХåեΥɤ)
int anthy_commit_segment(anthy_context_t ac, int s, int n);
: ac ƥ
s ʸֹ
n ֹ
*ƥsܤʸnܤθdzꤹ롣
*٤ƤʸꤷȤ˳ؽʤɤʤ롣
int anthy_set_prediction_string(anthy_context_t ac, const char *str);
int anthy_get_prediction_stat(anthy_context_tm struct anthy_prediction_stat *aps);
int anthy_get_prediction(anthy_context_t ac, int nth, char *buf, int buf_len);
int anthy_commit_prediction(anthy_context_t ac, int nth);
int anthy_set_reconversion_mode(anthy_context_t ac, int mode);
: ac ƥ
mode ѴΥ⡼
modeˤϼǤ롣
ANTHY_RECONVERT_AUTO äƤ˵ѴԤʤ
ANTHY_RECONVERT_DISABLE ˽ѴԤʤ
ANTHY_RECONVERT_ALWAYS ˵ѴԤʤ
ǥեȤǤANTHY_RECONVERT_AUTOꤷ֤ư
֤: ꤵ줿⡼
*ꤷƥȤεѴˡꤹ롣
int anthy_context_set_encoding(anthy_context_t ac, int encoding);
: ac ƥ
encoding ǥ
encodingˤϼΤ줫ꤹ롣
ANTHY_COMPILED_ENCODING (Ǥư)
ANTHY_EUC_JP_ENCODING EUC-JPѤޤ
ANTHY_UTF8_ENCODING UTF8Ѥޤ
֤: ꤵ줿ǥ
*ѴƥȤAPIƤӽФ˻ѤʸΥǥ
ꤹ롣
*ǥեȤǤANTHY_EUC_JP_ENCODINGꤵ줿֤ư
int anthy_print_context(anthy_context_t ac);
: ac ƥ
ѴƥȤƤɸϤ˽Ф
ϼ¸
char *anthy_get_version_string (void);
֤: AnthyΥСɽʸ
AnthyΥС
void anthy_set_logger(anthy_logger logger, int level);
|