OSDN Git Service

Bumped version 2.4.4.
[chasen-legacy/chasen.git] / lib / tokenizer.h
1 /*
2  * $Id: tokenizer.h,v 1.1.1.1 2007/03/13 07:40:10 masayu-a Exp $
3  */
4
5 #ifndef __TOKENIZER_H__
6 #define __TOKENIZER_H__
7
8 #include "chalib.h"
9
10 /* for language */
11 enum cha_lang {
12     CHASEN_LANG_JA,
13     CHASEN_LANG_EN
14 };
15
16 typedef struct _chasen_tok_t chasen_tok_t;
17 struct _chasen_tok_t {
18     enum cha_lang lang;
19     enum cha_encode encode;
20     anno_info *anno;
21     int (*mblen)(unsigned char*, int);
22     int (*get_char_type)(chasen_tok_t*,unsigned char*, int);
23     int (*char_type_parse)(chasen_tok_t*,int,int*,int);
24 };
25
26 extern enum cha_lang Cha_lang;
27 extern chasen_tok_t *Cha_tokenizer;
28
29 chasen_tok_t *cha_tok_new(int, int);
30 void cha_tok_delete(chasen_tok_t*);
31 int cha_tok_parse(chasen_tok_t*, unsigned char*, char*, int, int*);
32 int cha_tok_mblen(chasen_tok_t*,unsigned char*,int);
33 void cha_tok_set_annotation(chasen_tok_t*, anno_info*);
34 int cha_tok_is_jisx0208_latin(chasen_tok_t*, int, int);
35
36 #endif /*__TOKENIZER_H__ */