From a7a06a7ccfe0af1e134357678b8fa6cf87dff3b0 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sat, 7 Feb 2009 16:32:56 +0000 Subject: anthy-9100h --- anthy/corpus.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 anthy/corpus.h (limited to 'anthy/corpus.h') diff --git a/anthy/corpus.h b/anthy/corpus.h new file mode 100644 index 0000000..45c8391 --- /dev/null +++ b/anthy/corpus.h @@ -0,0 +1,25 @@ +/* コーパスの構築及びアクセスを行う */ +#ifndef _corpus_h_included_ +#define _corpus_h_included_ + +#include + +struct corpus; + +#define ELM_NONE 0 +#define ELM_BOS 0x10000000 +#define ELM_WORD_BORDER 0x20000000 +#define ELM_INVALID 0x40000000 + +/* hash値の下位28bitを使う */ +#define CORPUS_KEY_MASK 0x0fffffff + +/* コーパス構築用の関数 */ +struct corpus *corpus_new(void); +void corpus_push_back(struct corpus *c, int *val, int nr, int flags); +void corpus_build(struct corpus *c); +void corpus_dump(struct corpus *c); +void corpus_write_bucket(FILE *fp, struct corpus *c); +void corpus_write_array(FILE *fp, struct corpus *c); + +#endif -- cgit v1.2.1