Kouhei Sutou
null+****@clear*****
Fri Nov 9 19:09:33 JST 2012
Kouhei Sutou 2012-11-09 19:09:33 +0900 (Fri, 09 Nov 2012) New Revision: 679a9cd4438f1beb381d9fed0fec65a6cc938a84 https://github.com/groonga/groonga/commit/679a9cd4438f1beb381d9fed0fec65a6cc938a84 Log: Add tests for TokenMecab with tokenized delimiter Added files: test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/default.expected test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/default.test test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/normalize.expected test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/normalize.test Added: test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/default.expected (+53 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/default.expected 2012-11-09 19:09:33 +0900 (40dbcac) @@ -0,0 +1,53 @@ +table_create Memos TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Memos content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenMecab +[[0,0.0,0.0],true] +column_create Terms memos_content COLUMN_INDEX Memos content +[[0,0.0,0.0],true] +load --table Memos +[ +{"content": "Th\uFFFEis is a p\uFFFEen."}, +{"content": "これは\uFFFEペン\uFFFEです。"} +] +[[0,0.0,0.0],2] +select Terms --output_columns _key --limit -1 +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 6 + ], + [ + [ + "_key", + "ShortText" + ] + ], + [ + "Th" + ], + [ + "en." + ], + [ + "is is a p" + ], + [ + "これは" + ], + [ + "です。" + ], + [ + "ペン" + ] + ] + ] +] Added: test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/default.test (+14 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/default.test 2012-11-09 19:09:33 +0900 (156b383) @@ -0,0 +1,14 @@ +table_create Memos TABLE_NO_KEY +column_create Memos content COLUMN_SCALAR Text + +table_create Terms TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenMecab +column_create Terms memos_content COLUMN_INDEX Memos content + +load --table Memos +[ +{"content": "Th\uFFFEis is a p\uFFFEen."}, +{"content": "これは\uFFFEペン\uFFFEです。"} +] + +select Terms --output_columns _key --limit -1 Added: test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/normalize.expected (+53 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/normalize.expected 2012-11-09 19:09:33 +0900 (66c5204) @@ -0,0 +1,53 @@ +table_create Memos TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Memos content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +table_create Terms TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenMecab +[[0,0.0,0.0],true] +column_create Terms memos_content COLUMN_INDEX Memos content +[[0,0.0,0.0],true] +load --table Memos +[ +{"content": "Th\uFFFEis is a p\uFFFEen."}, +{"content": "これは\uFFFEペン\uFFFEです。"} +] +[[0,0.0,0.0],2] +select Terms --output_columns _key --limit -1 +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 6 + ], + [ + [ + "_key", + "ShortText" + ] + ], + [ + "en." + ], + [ + "is is a p" + ], + [ + "th" + ], + [ + "これは" + ], + [ + "です。" + ], + [ + "ペン" + ] + ] + ] +] Added: test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/normalize.test (+14 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_create/default_tokenizer/mecab/tokenized_delimiter/normalize.test 2012-11-09 19:09:33 +0900 (ec0d2db) @@ -0,0 +1,14 @@ +table_create Memos TABLE_NO_KEY +column_create Memos content COLUMN_SCALAR Text + +table_create Terms TABLE_PAT_KEY|KEY_NORMALIZE ShortText \ + --default_tokenizer TokenMecab +column_create Terms memos_content COLUMN_INDEX Memos content + +load --table Memos +[ +{"content": "Th\uFFFEis is a p\uFFFEen."}, +{"content": "これは\uFFFEペン\uFFFEです。"} +] + +select Terms --output_columns _key --limit -1 -------------- next part -------------- HTML����������������������������... 다운로드