[perldocjp-cvs 2077] CVS update: docs/perl/5.22.1

Back to archive index

argra****@users***** argra****@users*****
2018年 3月 16日 (金) 18:12:03 JST


Index: docs/perl/5.22.1/perlrebackslash.pod
diff -u docs/perl/5.22.1/perlrebackslash.pod:1.1 docs/perl/5.22.1/perlrebackslash.pod:1.2
--- docs/perl/5.22.1/perlrebackslash.pod:1.1	Tue Mar 28 23:40:49 2017
+++ docs/perl/5.22.1/perlrebackslash.pod	Fri Mar 16 18:12:03 2018
@@ -1252,13 +1252,13 @@
 
 =end original
 
-C<\b{...}>, available starting in v5.22, matches a boundary (between two
-characters, or before the first character of the string, or after the
-final character of the string) based on the Unicode rules for the
-boundary type specified inside the braces.  The currently known boundary
-types are given a few paragraphs below.  C<\B{...}> matches at any place
-between characters where C<\b{...}> of the same type doesn't match.
-(TBT)
+v5.22 から利用可能である C<\b{...}> は、
+中かっこの中で指定された境界タイプに関する Unicode の規則を基にして、
+境界 (二つの文字の間、
+文字列の最初の文字の前、文字列の最後の文字の後のいずれか) にマッチングします。
+現在知られている境界タイプは数段落後に述べます。
+C<\B{...}> は、同じ種類の C<\b{...}> がマッチングしない全ての文字間に
+マッチングします。
 
 =begin original
 
@@ -1270,13 +1270,12 @@
 
 =end original
 
-C<\b> の直後に C<"{"> が引き続かない場合は、単語文字 (C<\w> でマッチングするもの) と
-非単語文字 (C<\W>) の境界にマッチングします;
+C<\b> の直後に C<"{"> が引き続かない場合は、単語文字 (C<\w> で
+マッチングするもの) と非単語文字 (C<\W>) の境界にマッチングします;
 C<\B> の直後に C<"{"> が引き続かない場合は、C<\b> が
 マッチングしない任意の文字間にマッチングします。
-To get better
-word matching of natural language text, see L<\b{wb}> below.
-(TBT)
+よりよい自然言語テキストの単語マッチングのためには、
+後述の L<\b{wb}> を参照してください。
 
 =begin original
 
@@ -1309,7 +1308,8 @@
 仮定しないでください。
 これはできません; なぜなら非単語 "=" の前に境界があり、直前に単語文字が
 なければならないからです。
-全ての単なる C<\b> および C<\B> の境界決定は単語文字のみを探し、非単語文字や文字列の末尾は探しません。
+全ての単なる C<\b> および C<\B> の境界決定は単語文字のみを探し、非単語文字や
+文字列の末尾は探しません。
 <\b> と <\B> がどのように動作するかは以下のように同等化することで
 理解の助けになるでしょう:
 
@@ -1326,12 +1326,11 @@
 
 =end original
 
-In contrast, C<\b{...}> and C<\B{...}> may or may not match at the
-beginning and end of the line, depending on the boundary type.  These
-implement the Unicode default boundaries, specified in
-L<http://www.unicode.org/reports/tr29/>.
-The boundary types currently available are:
-(TBT)
+一方、C<\b{...}> と C<\B{...}> は、境界の種類に依存して、
+行の先頭と末尾にマッチングしたりしなかったりします。
+これらは L<http://www.unicode.org/reports/tr29/> で定義されている
+Unicode のデフォルト境界を実装しています。
+現在利用可能な境界タイプは:
 
 =over
 
@@ -1347,12 +1346,14 @@
 
 =end original
 
-This matches a Unicode "Grapheme Cluster Boundary".  (Actually Perl
-always uses the improved "extended" grapheme cluster").  These are
-explained below under L</C<\X>>.  In fact, C<\X> is another way to get
-the same functionality.  It is equivalent to C</.+?\b{gcb}/>.  Use
-whichever is most convenient for your situation.
-(TBT)
+これは Unicode の「書記素境界」("Grapheme Cluster Boundary") に
+マッチングします。
+(実際には Perl は改良された「拡張書記素」("extended grapheme cluster") を
+常に使います。)
+これらは L</C<\X>> で後述します。
+実際のところ、C<\X> は同じ機能を使うためのもう一つの方法です。
+これは C</.+?\b{gcb}/> と等価です。
+状況に応じて使いやすい方を使ってください。
 
 =item C<\b{sb}>
 
@@ -1376,22 +1377,24 @@
 
 =end original
 
-This matches a Unicode "Sentence Boundary".  This is an aid to parsing
-natural language sentences.  It gives good, but imperfect results.  For
-example, it thinks that "Mr. Smith" is two sentences.  More details are
-at L<http://www.unicode.org/reports/tr29/>.  Note also that it thinks
-that anything matching L</\R> (except form feed and vertical tab) is a
-sentence boundary.  C<\b{sb}> works with text designed for
+これは Unicode の「文境界」("Sentence Boundary") にマッチングします。
+これは自然言語文をパースする助けとなります。
+この結果はよいけれども完璧ではないものです。
+例えば、これは "Mr. Smith" を二つの文と考えます。
+さらなる詳細は L<http://www.unicode.org/reports/tr29/> にあります。
+また、(フォームフィードと垂直タブを除く) L</\R> にマッチングするものも
+行境界と考えることに注意してください。
+C<\b{sb}> works with text designed for
 word-processors which wrap lines
 automatically for display, but hard-coded line boundaries are considered
 to be essentially the ends of text blocks (paragraphs really), and hence
-the ends of sententces.  C<\b{sb}> doesn't do well with text containing
-embedded newlines, like the source text of the document you are reading.
-Such text needs to be preprocessed to get rid of the line separators
-before looking for sentence boundaries.  Some people view this as a bug
-in the Unicode standard, and this behavior is quite subject to change in
-future Perl versions.
-(TBT)
+the ends of sententces.
+C<\b{sb}> は、あなたが今読んでいる文書のソーステキストのような、
+組み込みの改行を含むテキストに対しては上手く動作しません。
+このようなテキストについては、文境界を探す前に行セパレータを取り除く
+前処理が必要です。
+これは Unicode 標準のバグであると考える人々もいて、
+この振る舞いは将来の Perl バージョンで変更されるかもしれません。
 
 =item C<\b{wb}>
 
@@ -1405,12 +1408,13 @@
 
 =end original
 
-This matches a Unicode "Word Boundary".  This gives better (though not
-perfect) results for natural language processing than plain C<\b>
-(without braces) does.  For example, it understands that apostrophes can
-be in the middle of words and that parentheses aren't (see the examples
-below).   More details are at L<http://www.unicode.org/reports/tr29/>.
-(TBT)
+これは Unicode の「単語境界」("Word Boundary") にマッチングします。
+これは自然言語処理において単なる C<\b> (中かっこなし) よりも良い
+(しかし完璧ではない)結果を返します。
+例えば、アポストロフィは単語の途中にあってもよいけれども
+かっこはあってはならないということを理解します
+(後述する例を参照してください)。
+さらなる詳細は L<http://www.unicode.org/reports/tr29/> にあります。
 
 =back
 
@@ -1435,23 +1439,22 @@
 
 =end original
 
-It is important to realize when you use these Unicode boundaries,
-that you are taking a risk that a future version of Perl which contains
-a later version of the Unicode Standard will not work precisely the same
-way as it did when your code was written.  These rules are not
-considered stable and have been somewhat more subject to change than the
-rest of the Standard.  Unicode reserves the right to change them at
-will, and Perl reserves the right to update its implementation to
-Unicode's new rules.  In the past, some changes have been because new
-characters have been added to the Standard which have different
-characteristics than all previous characters, so new rules are
-formulated for handling them.  These should not cause any backward
-compatibility issues.  But some changes have changed the treatment of
-existing characters because the Unicode Technical Committee has decided
-that the change is warranted for whatever reason.  This could be to fix
-a bug, or because they think better results are obtained with the new
-rule.
-(TBT)
+これらの Unicode 境界を使う場合、
+後のバージョンの Unicode 標準を含む将来のバージョンの Perl では、
+コードを書いた時点と正確に同じように動作しないかもしれないという
+リスクを取ることになるということを認識することは重要です。
+これらの規則は安定しているとは考えられておらず、標準の他の部分よりも
+変更される可能性がより高いです。
+Unicode は自分の意思でこれらを変更する権利を保持していて、
+Perl はその実装を Unicode の新しい規則に更新する権利を保持しています。
+過去には、以前の全ての文字と異なる性格を持つ新しい文字を標準に追加するために、
+変更が行われたことがあります。
+それらを扱うために新しい規則が策定されました。
+これらは後方互換性問題は発生させないはずです。
+しかし、Unicode Technical Committee が何らかの理由で変更が正当化されると
+考えたことによって、既存の文字の扱いがされたことがあります。
+これはバグを修正するためかもしれませんし、彼らが新しい規則によって
+より良い結果を得られると考えるからかもしれません。
 
 =begin original
 
@@ -1461,10 +1464,8 @@
 
 =end original
 
-It is also important to realize that these are default boundary
-definitions, and that implementations may wish to tailor the results for
-particular purposes and locales.
-(TBT)
+また、これらはデフォルトの境界定義であり、実装は特定の目的やロケールのために
+結果を調整する必要があることがあるということを認識することが重要です。
 
 =begin original
 
@@ -1473,9 +1474,8 @@
 
 =end original
 
-Unicode defines a fourth boundary type, accessible through the
-L<Unicode::LineBreak> module.
-(TBT)
+Unicode は 4 番目の境界タイプを定義していて、
+L<Unicode::LineBreak> モジュールを通じてアクセスできます。
 
 =begin original
 
@@ -1741,8 +1741,7 @@
 
 =end original
 
-See also L<C<\b{gcb}>|/\b{}, \b, \B{}, \B>.
-(TBT)
+L<C<\b{gcb}>|/\b{}, \b, \B{}, \B> も参照してください。
 
 =begin original
 
@@ -1772,7 +1771,7 @@
 =begin meta
 
 Translate: SHIRAKATA Kentaro <argra****@ub32*****> (5.10.1-)
-Status: in progress
+Status: completed
 
 =end meta
 



perldocjp-cvs メーリングリストの案内
Back to archive index