[Groonga-commit] groonga/groonga [master] Add tests for TokenMecab

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Nov 9 18:34:27 JST 2012


Kouhei Sutou	2012-11-09 18:34:27 +0900 (Fri, 09 Nov 2012)

  New Revision: de4138d5e6e655d98e47e873724bb5bd1d6512d0
  https://github.com/groonga/groonga/commit/de4138d5e6e655d98e47e873724bb5bd1d6512d0

  Log:
    Add tests for TokenMecab

  Added files:
    test/command/suite/table_create/default_tokenizer/mecab/default.expected
    test/command/suite/table_create/default_tokenizer/mecab/default.test
    test/command/suite/table_create/default_tokenizer/mecab/normalize.expected
    test/command/suite/table_create/default_tokenizer/mecab/normalize.test

  Added: test/command/suite/table_create/default_tokenizer/mecab/default.expected (+68 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/table_create/default_tokenizer/mecab/default.expected    2012-11-09 18:34:27 +0900 (6bd5a3c)
@@ -0,0 +1,68 @@
+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": "This is a pen."},
+{"content": "これはペンです。"}
+]
+[[0,0.0,0.0],2]
+select Terms --output_columns _key --limit -1
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        11
+      ],
+      [
+        [
+          "_key",
+          "ShortText"
+        ]
+      ],
+      [
+        "."
+      ],
+      [
+        "This"
+      ],
+      [
+        "a"
+      ],
+      [
+        "i"
+      ],
+      [
+        "pen"
+      ],
+      [
+        "s"
+      ],
+      [
+        "。"
+      ],
+      [
+        "これ"
+      ],
+      [
+        "です"
+      ],
+      [
+        "は"
+      ],
+      [
+        "ペン"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/table_create/default_tokenizer/mecab/default.test (+14 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/table_create/default_tokenizer/mecab/default.test    2012-11-09 18:34:27 +0900 (317b7bd)
@@ -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": "This is a pen."},
+{"content": "これはペンです。"}
+]
+
+select Terms --output_columns _key --limit -1

  Added: test/command/suite/table_create/default_tokenizer/mecab/normalize.expected (+68 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/table_create/default_tokenizer/mecab/normalize.expected    2012-11-09 18:34:27 +0900 (8051903)
@@ -0,0 +1,68 @@
+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": "This is a pen."},
+{"content": "これはペンです。"}
+]
+[[0,0.0,0.0],2]
+select Terms --output_columns _key --limit -1
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        11
+      ],
+      [
+        [
+          "_key",
+          "ShortText"
+        ]
+      ],
+      [
+        "."
+      ],
+      [
+        "a"
+      ],
+      [
+        "i"
+      ],
+      [
+        "pen"
+      ],
+      [
+        "s"
+      ],
+      [
+        "this"
+      ],
+      [
+        "。"
+      ],
+      [
+        "これ"
+      ],
+      [
+        "です"
+      ],
+      [
+        "は"
+      ],
+      [
+        "ペン"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/table_create/default_tokenizer/mecab/normalize.test (+14 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/table_create/default_tokenizer/mecab/normalize.test    2012-11-09 18:34:27 +0900 (24e4763)
@@ -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": "This is a pen."},
+{"content": "これはペンです。"}
+]
+
+select Terms --output_columns _key --limit -1
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index