Navigation Menu

Skip to content

Commit

Permalink
Translate pgroonga.snippet_html
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 24, 2015
1 parent 0bfa495 commit 97c88f0
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 1 deletion.
93 changes: 93 additions & 0 deletions _po/ja/reference/functions/pgroonga-snippet-html.po
@@ -0,0 +1,93 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-10-24 16:48+0900\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"

msgid ""
"---\n"
"title: pgroonga.snippet function\n"
"layout: en\n"
"---"
msgstr ""
"---\n"
"title: pgroonga.snippet関数\n"
"layout: ja\n"
"---"

msgid "# `pgroonga.snippet` function"
msgstr "# `pgroonga.snippet`関数"

msgid "## Summary"
msgstr "## 概要"

msgid ""
"`pgroonga.snippet_html` function returns texts around keywords from target tex"
"t. It's also known as [KWIC](https://en.wikipedia.org/wiki/Key_Word_in_Context"
") (keyword in context). You can see it in search result on Web search engine."
msgstr ""
"`pgroonga.snippet_html`関数は対象テキストの中からキーワード周辺のテキストを抽出して返します。これは[KWIC](https://ja"
".wikipedia.org/wiki/KWIC)(keyword in context)とも呼ばれています。Web検索エンジンの結果で使われていることが多"
"いので見たことが多い人も多いでしょう。"

msgid "## Syntax"
msgstr "## 構文"

msgid "Here is the syntax of this function:"
msgstr "この関数の構文は次の通りです。"

msgid ""
"```text\n"
"text[] pgroonga.snippet_html(target, ARRAY[keyword1, keyword2, ...])\n"
"```"
msgstr ""

msgid ""
"`target` is a `text` type value. `pgroonga.snippet_html` extracts keywords wit"
"h around texts from `target`."
msgstr "`target`は`text`型の値です。`pgroonga.snippet_html`は`target`の中からキーワード周辺のテキストを抽出します。"

msgid ""
"`keyword1`, `keyword2`, `...` are an array of `text` type. The keywords to be "
"extracted from `target`. You must specify one or more keywords."
msgstr ""
"`keyword1`, `keyword2`, `...`は`text`型の配列です。これらのキーワードを`target`から抽出します。1つ以上のキーワー"
"ドを指定する必要があります。"

msgid "`pgroonga.snippet_html` returns an array of `text` type."
msgstr "`pgroonga.snippet_html`は`text`型の配列を返します。"

msgid ""
"Element in the returned array is a text around keyword. The keyword is surroun"
"d with `<span class=\"keyword\">` and `</span>`. `<`, `>`, `&` and `\"` in `targe"
"t` is HTML escaped."
msgstr ""
"返ってくる配列の各要素はキーワード周辺のテキストです。キーワードは`<span class=\"keyword\">`と`</span>`で囲まれています。`t"
"arget`中の`<`、`>`、`&`、`\"`はHTMLエスケープされます。"

msgid ""
"The maximum size of part of `target` in each element is 200 bytes. Its unit is"
" byte not the number of characters. Each element may be lager than 200 bytes b"
"ecause each element includes `<span class=\"keyword\">` and `</span>` and may ha"
"ve HTML escaped values. If `<` is HTML escaped to `&lt;`, the byte size is inc"
"reased to 4 from 1."
msgstr ""
"各要素の`target`由来の部分の最大サイズは200バイトです。単位は文字数ではなくバイトです。各要素は200バイトより大きくなることがありまう。なぜなら"
"、各要素には`<span class=\"keyword\">`と`</span>`が含まれますし、HTMLエスケープした値が含まれることもあるからです。もし、"
"`<`がHTMLエスケープされると`&lt;`になり、バイトサイズは1から4に増えます。"

msgid "## Usage"
msgstr "## 使い方"

msgid "See [examples in tutorial](../../tutorial/#snippet)."
msgstr "[チュートリアルの中の例](../../tutorial/#snippet)も参考にしてください。"

msgid "## See also"
msgstr "## 参考"

msgid " * [Examples in tutorial](../../tutorial/#snippet)"
msgstr " * [チュートリアルの中の例](../../tutorial/#snippet)"
36 changes: 36 additions & 0 deletions ja/reference/functions/pgroonga-snippet-html.md
@@ -0,0 +1,36 @@
---
title: pgroonga.snippet関数
layout: ja
---

# `pgroonga.snippet`関数

## 概要

`pgroonga.snippet_html`関数は対象テキストの中からキーワード周辺のテキストを抽出して返します。これは[KWIC](https://ja.wikipedia.org/wiki/KWIC)(keyword in context)とも呼ばれています。Web検索エンジンの結果で使われていることが多いので見たことが多い人も多いでしょう。

## 構文

この関数の構文は次の通りです。

```text
text[] pgroonga.snippet_html(target, ARRAY[keyword1, keyword2, ...])
```

`target``text`型の値です。`pgroonga.snippet_html``target`の中からキーワード周辺のテキストを抽出します。

`keyword1`, `keyword2`, `...``text`型の配列です。これらのキーワードを`target`から抽出します。1つ以上のキーワードを指定する必要があります。

`pgroonga.snippet_html``text`型の配列を返します。

返ってくる配列の各要素はキーワード周辺のテキストです。キーワードは`<span class="keyword">``</span>`で囲まれています。`target`中の`<``>``&``"`はHTMLエスケープされます。

各要素の`target`由来の部分の最大サイズは200バイトです。単位は文字数ではなくバイトです。各要素は200バイトより大きくなることがありまう。なぜなら、各要素には`<span class="keyword">``</span>`が含まれますし、HTMLエスケープした値が含まれることもあるからです。もし、`<`がHTMLエスケープされると`&lt;`になり、バイトサイズは1から4に増えます。

## 使い方

[チュートリアルの中の例](../../tutorial/#snippet)も参考にしてください。

## 参考

* [チュートリアルの中の例](../../tutorial/#snippet)
2 changes: 1 addition & 1 deletion reference/functions/pgroonga-snippet-html.md
Expand Up @@ -25,7 +25,7 @@ text[] pgroonga.snippet_html(target, ARRAY[keyword1, keyword2, ...])

Element in the returned array is a text around keyword. The keyword is surround with `<span class="keyword">` and `</span>`. `<`, `>`, `&` and `"` in `target` is HTML escaped.

The maximum size of part of `target` in each element is 200 bytes. It's unit is byte not the number of characters. Each element may be lager than 200 bytes because each element includes `<span class="keyword">` and `</span>` and may have HTML escaped values. If '<' is HTML escaped to `&lt;`, the byte size is increased to 4 from 1.
The maximum size of part of `target` in each element is 200 bytes. Its unit is byte not the number of characters. Each element may be lager than 200 bytes because each element includes `<span class="keyword">` and `</span>` and may have HTML escaped values. If `<` is HTML escaped to `&lt;`, the byte size is increased to 4 from 1.

## Usage

Expand Down

0 comments on commit 97c88f0

Please sign in to comment.