| 29 | // cabocha_tree_t |
| 30 | cabocha_tree_t* unwrap_cabocha_tree_t(ScmObj obj) |
| 31 | { |
| 32 | return SCM_CABOCHA_TREE(obj)->ctree; |
| 33 | } |
| 34 | ScmObj wrap_cabocha_tree_t(cabocha_tree_t *ctree) |
| 35 | { |
| 36 | ScmCaboChaTree *obj = SCM_NEW(ScmCaboChaTree); |
| 37 | SCM_SET_CLASS(obj, SCM_CLASS_CABOCHA_TREE); |
| 38 | obj->ctree = ctree; |
| 39 | return SCM_OBJ(obj); |
| 40 | } |
| 41 | |
| 42 | // cabocha_chunk_t |
| 43 | cabocha_chunk_t* unwrap_cabocha_chunk_t(ScmObj obj) |
| 44 | { |
| 45 | return SCM_CABOCHA_CHUNK(obj)->cchunk; |
| 46 | } |
| 47 | ScmObj wrap_cabocha_chunk_t(cabocha_chunk_t *cchunk) |
| 48 | { |
| 49 | ScmCaboChaChunk *obj = SCM_NEW(ScmCaboChaChunk); |
| 50 | SCM_SET_CLASS(obj, SCM_CLASS_CABOCHA_CHUNK); |
| 51 | obj->cchunk = cchunk; |
| 52 | return SCM_OBJ(obj); |
| 53 | } |
| 54 | |
| 55 | // cabocha_token_t |
| 56 | cabocha_token_t* unwrap_cabocha_token_t(ScmObj obj) |
| 57 | { |
| 58 | return SCM_CABOCHA_TOKEN(obj)->ctok; |
| 59 | } |
| 60 | ScmObj wrap_cabocha_token_t(cabocha_token_t *ctok) |
| 61 | { |
| 62 | ScmCaboChaToken *obj = SCM_NEW(ScmCaboChaToken); |
| 63 | SCM_SET_CLASS(obj, SCM_CLASS_CABOCHA_TOKEN); |
| 64 | obj->ctok = ctok; |
| 65 | return SCM_OBJ(obj); |
| 66 | } |
| 67 | |
| 68 | /* mecab_node_t */ |
| 69 | const mecab_node_t* unwrap_mecab_node_t(ScmObj obj) |
| 70 | { |
| 71 | return SCM_MECAB_NODE(obj)->mn; |
| 72 | } |
| 73 | ScmObj wrap_mecab_node_t(const mecab_node_t *mn) |
| 74 | { |
| 75 | ScmMeCabNode *obj = SCM_NEW(ScmMeCabNode); |
| 76 | SCM_SET_CLASS(obj, SCM_CLASS_MECAB_NODE); |
| 77 | obj->mn = mn; |
| 78 | return SCM_OBJ(obj); |
| 79 | } |