naoa
null+****@clear*****
Thu Aug 14 21:13:16 JST 2014
naoa 2014-08-14 21:13:16 +0900 (Thu, 14 Aug 2014) New Revision: cfa36720a227b5799adef0f3921926d7f98e7d30 https://github.com/groonga/groonga/commit/cfa36720a227b5799adef0f3921926d7f98e7d30 Merged 9f7412e: Merge pull request #192 from naoa/doc-tokenize-mode Message: doc: add mode option to tokenize commmand Added files: doc/source/example/reference/commands/tokenize/add_mode.log doc/source/example/reference/commands/tokenize/get_mode.log Modified files: doc/locale/en/LC_MESSAGES/reference.po doc/locale/ja/LC_MESSAGES/reference.po doc/source/reference/commands/tokenize.rst Modified: doc/locale/en/LC_MESSAGES/reference.po (+23 -0) =================================================================== --- doc/locale/en/LC_MESSAGES/reference.po 2014-08-14 20:28:13 +0900 (fc1e807) +++ doc/locale/en/LC_MESSAGES/reference.po 2014-08-14 21:13:16 +0900 (842e895) @@ -7367,6 +7367,29 @@ msgstr "" "tokenizes by tokenized delimiter." msgid "" +"It specifies a tokenize mode. If the mode is specified ``ADD``, the text " +"is tokenized by the rule that adding a document. If the mode is specified " +"``GET``, the text is tokenized by the rule that searching a document. If " +"the mode is omitted, the text is tokenized by the ``ADD`` mode." +msgstr "" +"It specifies a tokenize mode. If the mode is specified ``ADD``, the text " +"is tokenized by the rule that adding a document. If the mode is specified " +"``GET``, the text is tokenized by the rule that searching a document. If " +"the mode is omitted, the text is tokenized by the ``ADD`` mode." + +msgid "Here is an example to the ``ADD`` mode." +msgstr "Here is an example to the ``ADD`` mode." + +msgid "The last alphabet is tokenized by one character." +msgstr "The last alphabet is tokenized by one character." + +msgid "Here is an example to the ``GET`` mode." +msgstr "Here is an example to the ``GET`` mode." + +msgid "The last alphabet is tokenized by two characters." +msgstr "The last alphabet is tokenized by two characters." + +msgid "" "``tokenize`` command returns tokenized tokens. Each token has some " "attributes except token itself. The attributes will be increased in the " "feature::" Modified: doc/locale/ja/LC_MESSAGES/reference.po (+23 -0) =================================================================== --- doc/locale/ja/LC_MESSAGES/reference.po 2014-08-14 20:28:13 +0900 (5d5d0e0) +++ doc/locale/ja/LC_MESSAGES/reference.po 2014-08-14 21:13:16 +0900 (0913bb0) @@ -6801,6 +6801,29 @@ msgstr "" "切ってトークナイズします。" msgid "" +"It specifies a tokenize mode. If the mode is specified ``ADD``, the text " +"is tokenized by the rule that adding a document. If the mode is specified " +"``GET``, the text is tokenized by the rule that searching a document. If " +"the mode is omitted, the text is tokenized by the ``ADD`` mode." +msgstr "" +"トークナイズモードを指定します。 ``ADD`` を指定すると、ドキュメント追加時" +"と同じルールでトークナイズされます。" +" ``GET`` を指定すると、ドキュメント検索時と同じルールでトークナイズされます。" +"省略された場合、 ``ADD`` モードでトークナイズされます。" + +msgid "Here is an example to the ``ADD`` mode." +msgstr "以下は ``ADD`` モードの例です。" + +msgid "The last alphabet is tokenized by one character." +msgstr "最後のアルファベットは1文字でトークナイズされています。" + +msgid "Here is an example to the ``GET`` mode." +msgstr "以下は ``GET`` モードの例です。" + +msgid "The last alphabet is tokenized by two characters." +msgstr "最後のアルファベットは2文字でトークナイズされています。" + +msgid "" "``tokenize`` command returns tokenized tokens. Each token has some " "attributes except token itself. The attributes will be increased in the " "feature::" Added: doc/source/example/reference/commands/tokenize/add_mode.log (+72 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/tokenize/add_mode.log 2014-08-14 21:13:16 +0900 (b6498d8) @@ -0,0 +1,72 @@ +Execution example:: + + tokenize TokenBigram "Fulltext Search" --mode ADD + # [ + # [ + # 0, + # 1408017697.66886, + # 0.00126171112060547 + # ], + # [ + # { + # "value": "Fu", + # "position": 0 + # }, + # { + # "value": "ul", + # "position": 1 + # }, + # { + # "value": "ll", + # "position": 2 + # }, + # { + # "value": "lt", + # "position": 3 + # }, + # { + # "value": "te", + # "position": 4 + # }, + # { + # "value": "ex", + # "position": 5 + # }, + # { + # "value": "xt", + # "position": 6 + # }, + # { + # "value": "t ", + # "position": 7 + # }, + # { + # "value": " S", + # "position": 8 + # }, + # { + # "value": "Se", + # "position": 9 + # }, + # { + # "value": "ea", + # "position": 10 + # }, + # { + # "value": "ar", + # "position": 11 + # }, + # { + # "value": "rc", + # "position": 12 + # }, + # { + # "value": "ch", + # "position": 13 + # }, + # { + # "value": "h", + # "position": 14 + # } + # ] + # ] Added: doc/source/example/reference/commands/tokenize/get_mode.log (+68 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/tokenize/get_mode.log 2014-08-14 21:13:16 +0900 (a67c562) @@ -0,0 +1,68 @@ +Execution example:: + + tokenize TokenBigram "Fulltext Search" --mode GET + # [ + # [ + # 0, + # 1408017732.62883, + # 0.000665903091430664 + # ], + # [ + # { + # "value": "Fu", + # "position": 0 + # }, + # { + # "value": "ul", + # "position": 1 + # }, + # { + # "value": "ll", + # "position": 2 + # }, + # { + # "value": "lt", + # "position": 3 + # }, + # { + # "value": "te", + # "position": 4 + # }, + # { + # "value": "ex", + # "position": 5 + # }, + # { + # "value": "xt", + # "position": 6 + # }, + # { + # "value": "t ", + # "position": 7 + # }, + # { + # "value": " S", + # "position": 8 + # }, + # { + # "value": "Se", + # "position": 9 + # }, + # { + # "value": "ea", + # "position": 10 + # }, + # { + # "value": "ar", + # "position": 11 + # }, + # { + # "value": "rc", + # "position": 12 + # }, + # { + # "value": "ch", + # "position": 13 + # } + # ] + # ] Modified: doc/source/reference/commands/tokenize.rst (+25 -0) =================================================================== --- doc/source/reference/commands/tokenize.rst 2014-08-14 20:28:13 +0900 (904aeda) +++ doc/source/reference/commands/tokenize.rst 2014-08-14 21:13:16 +0900 (d569b1a) @@ -25,6 +25,7 @@ optional:: string [normalizer=null] [flags=NONE] + [mode=null] Usage ----- @@ -163,6 +164,30 @@ string. So the character is good character for this puropose. If treated as already tokenized string. Tokenizer just tokenizes by tokenized delimiter. +``mode`` +"""""""" + +It specifies a tokenize mode. If the mode is specified ``ADD``, the text +is tokenized by the rule that adding a document. If the mode is specified +``GET``, the text is tokenized by the rule that searching a document. If +the mode is omitted, the text is tokenized by the ``ADD`` mode. + +Here is an example to the ``ADD`` mode. + +.. groonga-command +.. include:: ../../example/reference/commands/tokenize/add_mode.log +.. tokenize TokenBigram "Fulltext Search" --mode ADD + +The last alphabet is tokenized by one character. + +Here is an example to the ``GET`` mode. + +.. groonga-command +.. include:: ../../example/reference/commands/tokenize/get_mode.log +.. tokenize TokenBigram "Fulltext Search" --mode GET + +The last alphabet is tokenized by two characters. + Return value ------------ -------------- next part -------------- HTML����������������������������...Download