[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/python/python-docs-ja/3.10/library/difflib.po [Back]  [Original]

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR , YEAR.
#
# Translators:
# Rafael Fontenelle , 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-30 14:59+0000\n"
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
"Last-Translator: Rafael Fontenelle , 2022\n"
"Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/"
"ja/)\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"

#: ../../library/difflib.rst:2
msgid ":mod:`difflib` --- Helpers for computing deltas"
msgstr ":mod:`difflib` --- "

#: ../../library/difflib.rst:11
msgid "**Source code:** :source:`Lib/difflib.py`"
msgstr "**:** :source:`Lib/difflib.py`"

#: ../../library/difflib.rst:20
msgid ""
"This module provides classes and functions for comparing sequences. It can "
"be used for example, for comparing files, and can produce information about "
"file differences in various formats, including HTML and context and unified "
"diffs. For comparing directories and files, see also, the :mod:`filecmp` "
"module."
msgstr ""
""
" HTML  context diff, unified diff "
""
" :mod:`filecmp` "
""

#: ../../library/difflib.rst:29
msgid ""
"This is a flexible class for comparing pairs of sequences of any type, so "
"long as the sequence elements are :term:`hashable`.  The basic algorithm "
"predates, and is a little fancier than, an algorithm published in the late "
"1980's by Ratcliff and Obershelp under the hyperbolic name \"gestalt pattern "
"matching.\"  The idea is to find the longest contiguous matching subsequence "
"that contains no \"junk\" elements; these \"junk\" elements are ones that "
"are uninteresting in some sense, such as blank lines or whitespace.  "
"(Handling junk is an extension to the Ratcliff and Obershelp algorithm.) The "
"same idea is then applied recursively to the pieces of the sequences to the "
"left and to the right of the matching subsequence.  This does not yield "
"minimal edit sequences, but does tend to yield matches that \"look right\" "
"to people."
msgstr ""
" :term:` "
"` "
"1980 Ratcliff  Obershelp \""
"\""
"\"junk\" "
"  \"junk\" "
" (junk Ratcliff "
" Obershelp )"
""
""
""

#: ../../library/difflib.rst:41
msgid ""
"**Timing:** The basic Ratcliff-Obershelp algorithm is cubic time in the "
"worst case and quadratic time in the expected case. :class:`SequenceMatcher` "
"is quadratic time for the worst case and has expected-case behavior "
"dependent in a complicated way on how many elements the sequences have in "
"common; best case time is linear."
msgstr ""
"**:**  Ratcliff-Obershelp 3"
"2 :class:`SequenceMatcher` "
"2"
""

#: ../../library/difflib.rst:47
msgid ""
"**Automatic junk heuristic:** :class:`SequenceMatcher` supports a heuristic "
"that automatically treats certain sequence items as junk. The heuristic "
"counts how many times each individual item appears in the sequence. If an "
"item's duplicates (after the first one) account for more than 1% of the "
"sequence and the sequence is at least 200 items long, this item is marked as "
"\"popular\" and is treated as junk for the purpose of sequence matching. "
"This heuristic can be turned off by setting the ``autojunk`` argument to "
"``False`` when creating the :class:`SequenceMatcher`."
msgstr ""
"** junk :** :class:`SequenceMatcher` "
" junk "
""
" ()  1% "
" 200  \"popular\" "
" junk "
" :class:`SequenceMatcher`  ``autojunk``  "
"``False`` "

#: ../../library/difflib.rst:55 ../../library/difflib.rst:388
msgid "The *autojunk* parameter."
msgstr "*autojunk* "

#: ../../library/difflib.rst:61
msgid ""
"This is a class for comparing sequences of lines of text, and producing "
"human-readable differences or deltas.  Differ uses :class:`SequenceMatcher` "
"both to compare sequences of lines, and to compare sequences of characters "
"within similar (near-matching) lines."
msgstr ""
""
" Differ  :class:`SequenceMatcher` "
"()"

#: ../../library/difflib.rst:66
msgid "Each line of a :class:`Differ` delta begins with a two-letter code:"
msgstr ":class:`Differ` 2:"

#: ../../library/difflib.rst:69
msgid "Code"
msgstr ""

#: ../../library/difflib.rst:69 ../../library/difflib.rst:498
msgid "Meaning"
msgstr ""

#: ../../library/difflib.rst:71
msgid "``'- '``"
msgstr "``'- '``"

#: ../../library/difflib.rst:71
msgid "line unique to sequence 1"
msgstr "1"

#: ../../library/difflib.rst:73
msgid "``'+ '``"
msgstr "``'+ '``"

#: ../../library/difflib.rst:73
msgid "line unique to sequence 2"
msgstr "2"

#: ../../library/difflib.rst:75
msgid "``'  '``"
msgstr "``'  '``"

#: ../../library/difflib.rst:75
msgid "line common to both sequences"
msgstr ""

#: ../../library/difflib.rst:77
msgid "``'? '``"
msgstr "``'? '``"

#: ../../library/difflib.rst:77
msgid "line not present in either input sequence"
msgstr ""

#: ../../library/difflib.rst:80
msgid ""
"Lines beginning with '``?``' attempt to guide the eye to intraline "
"differences, and were not present in either input sequence. These lines can "
"be confusing if the sequences contain tab characters."
msgstr ""
"'``?``' "
""
""

#: ../../library/difflib.rst:87
msgid ""
"This class can be used to create an HTML table (or a complete HTML file "
"containing the table) showing a side by side, line by line comparison of "
"text with inter-line and intra-line change highlights.  The table can be "
"generated in either full or contextual difference mode."
msgstr ""
""
" HTML  ( HTML "
") "
""

#: ../../library/difflib.rst:92
msgid "The constructor for this class is:"
msgstr ":"

#: ../../library/difflib.rst:97
msgid "Initializes instance of :class:`HtmlDiff`."
msgstr ":class:`HtmlDiff` "

#: ../../library/difflib.rst:99
msgid ""
"*tabsize* is an optional keyword argument to specify tab stop spacing and "
"defaults to ``8``."
msgstr ""
"*tabsize* "
" ``8`` "

#: ../../library/difflib.rst:102
msgid ""
"*wrapcolumn* is an optional keyword to specify column number where lines are "
"broken and wrapped, defaults to ``None`` where lines are not wrapped."
msgstr ""
"*wrapcolumn* "
" ``None`` "

#: ../../library/difflib.rst:105
msgid ""
"*linejunk* and *charjunk* are optional keyword arguments passed into :func:"
"`ndiff` (used by :class:`HtmlDiff` to generate the side by side HTML "
"differences).  See :func:`ndiff` documentation for argument default values "
"and descriptions."
msgstr ""
"*linejunk*  *charjunk*  :func:`ndiff`  "
"(:class:`HtmlDiff`  HTML "
")  :func:`ndiff` "
""

#: ../../library/difflib.rst:109
msgid "The following methods are public:"
msgstr " public :"

#: ../../library/difflib.rst:114
msgid ""
"Compares *fromlines* and *tolines* (lists of strings) and returns a string "
"which is a complete HTML file containing a table showing line by line "
"differences with inter-line and intra-line changes highlighted."
msgstr ""
"*fromlines*  *tolines* () "
" HTML "
""

#: ../../library/difflib.rst:118
msgid ""
"*fromdesc* and *todesc* are optional keyword arguments to specify from/to "
"file column header strings (both default to an empty string)."
msgstr ""
"*fromdesc*  *todesc* "
" "
"()"

#: ../../library/difflib.rst:121
msgid ""
"*context* and *numlines* are both optional keyword arguments. Set *context* "
"to ``True`` when contextual differences are to be shown, else the default is "
"``False`` to show the full files. *numlines* defaults to ``5``.  When "
"*context* is ``True`` *numlines* controls the number of context lines which "
"surround the difference highlights.  When *context* is ``False`` *numlines* "
"controls the number of lines which are shown before a difference highlight "
"when using the \"next\" hyperlinks (setting to zero would cause the \"next\" "
"hyperlinks to place the next difference highlight at the top of the browser "
"without any leading context)."
msgstr ""
"*context*  *numlines* "
"*context*  ``True``  "
"``False`` *numlines* "
" ``5`` *context*  ``True`` *numlines* "
"*context*  ``False`` *numlines*  "
"\"next\" "
" (\"next\" "
")"

#: ../../library/difflib.rst:132
msgid ""
"*fromdesc* and *todesc* are interpreted as unescaped HTML and should be "
"properly escaped while receiving input from untrusted sources."
msgstr ""
"*fromdesc*  *todesc* HTML"
""

#: ../../library/difflib.rst:135
msgid ""
"*charset* keyword-only argument was added.  The default charset of HTML "
"document changed from ``'ISO-8859-1'`` to ``'utf-8'``."
msgstr ""
"*charset* HTML "
" ``'ISO-8859-1'``  ``'utf-8'`` "

#: ../../library/difflib.rst:141
msgid ""
"Compares *fromlines* and *tolines* (lists of strings) and returns a string "
"which is a complete HTML table showing line by line differences with inter-"
"line and intra-line changes highlighted."
msgstr ""
"*fromlines*  *tolines* () "
" HTML "

#: ../../library/difflib.rst:145
msgid ""
"The arguments for this method are the same as those for the :meth:"
"`make_file` method."
msgstr " :meth:`make_file` "

#: ../../library/difflib.rst:148
msgid ""
":file:`Tools/scripts/diff.py` is a command-line front-end to this class and "
"contains a good example of its use."
msgstr ""
":file:`Tools/scripts/diff.py` "
""

#: ../../library/difflib.rst:154
msgid ""
"Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` "
"generating the delta lines) in context diff format."
msgstr ""
"*a*  *b* ()  ( :term:`"
" `)  context diff ("
")"

#: ../../library/difflib.rst:157
msgid ""
"Context diffs are a compact way of showing just the lines that have changed "
"plus a few lines of context.  The changes are shown in a before/after "
"style.  The number of context lines is set by *n* which defaults to three."
msgstr ""
""
"/ ("
")  *n*  3 "

#: ../../library/difflib.rst:161
msgid ""
"By default, the diff control lines (those with ``***`` or ``---``) are "
"created with a trailing newline.  This is helpful so that inputs created "
"from :func:`io.IOBase.readlines` result in diffs that are suitable for use "
"with :func:`io.IOBase.writelines` since both the inputs and outputs have "
"trailing newlines."
msgstr ""
" diff  (``***``  ``---`` ) "
" :func:`io.IOBase.readlines`  :func:`io.IOBase."
"writelines`  diff  ("
") "

#: ../../library/difflib.rst:167 ../../library/difflib.rst:298
msgid ""
"For inputs that do not have trailing newlines, set the *lineterm* argument "
"to ``\"\"`` so that the output will be uniformly newline free."
msgstr ""
" "
"*lineterm*  ``\"\"`` "

#: ../../library/difflib.rst:170 ../../library/difflib.rst:301
msgid ""
"The context diff format normally has a header for filenames and modification "
"times.  Any or all of these may be specified using strings for *fromfile*, "
"*tofile*, *fromfiledate*, and *tofiledate*.  The modification times are "
"normally expressed in the ISO 8601 format. If not specified, the strings "
"default to blanks."
msgstr ""
""
" *fromfile*, *tofile*, *fromfiledate*, *tofiledate* "
"ISO 8601 "
""

#: ../../library/difflib.rst:193 ../../library/difflib.rst:322
msgid "See :ref:`difflib-interface` for a more detailed example."
msgstr " :ref:`difflib-interface` "

#: ../../library/difflib.rst:198
msgid ""
"Return a list of the best \"good enough\" matches.  *word* is a sequence for "
"which close matches are desired (typically a string), and *possibilities* is "
"a list of sequences against which to match *word* (typically a list of "
"strings)."
msgstr ""
"*word*  "
"() *possibilities*  *word* "
" () "

#: ../../library/difflib.rst:202
msgid ""
"Optional argument *n* (default ``3``) is the maximum number of close matches "
"to return; *n* must be greater than ``0``."
msgstr ""
" *n* ( ``3``)"
"*n*  ``0`` "

#: ../../library/difflib.rst:205
msgid ""
"Optional argument *cutoff* (default ``0.6``) is a float in the range [0, 1]. "
"Possibilities that don't score at least that similar to *word* are ignored."
msgstr ""
" *cutoff* ( ``0.6``) [0, 1] "
"*word*  *possibilities* "
""

#: ../../library/difflib.rst:208
msgid ""
"The best (no more than *n*) matches among the possibilities are returned in "
"a list, sorted by similarity score, most similar first."
msgstr ""
"*possibilities* ( *n* )"
"()"

#: ../../library/difflib.rst:224
msgid ""
"Compare *a* and *b* (lists of strings); return a :class:`Differ`\\ -style "
"delta (a :term:`generator` generating the delta lines)."
msgstr ""
"*a*  *b* ()  ( :term:`"
" `)  :class:`Differ` "

#: ../../library/difflib.rst:227
msgid ""
"Optional keyword parameters *linejunk* and *charjunk* are filtering "
"functions (or ``None``):"
msgstr ""
" *linejunk*  *charjunk*  ("
" ``None``) "

#: ../../library/difflib.rst:230
msgid ""
"*linejunk*: A function that accepts a single string argument, and returns "
"true if the string is junk, or false if not. The default is ``None``. There "
"is also a module-level function :func:`IS_LINE_JUNK`, which filters out "
"lines without visible characters, except for at most one pound character "
"(``'#'``) -- however the underlying :class:`SequenceMatcher` class does a "
"dynamic analysis of which lines are so frequent as to constitute noise, and "
"this usually works better than using this function."
msgstr ""
"*linejunk*:  1  junk "
" ``None`` "
" :func:`IS_LINE_JUNK`  1 (``'#'``)"
" :"
"class:`SequenceMatcher` "
""
""

#: ../../library/difflib.rst:238
msgid ""
"*charjunk*: A function that accepts a character (a string of length 1), and "
"returns if the character is junk, or false if not. The default is module-"
"level function :func:`IS_CHARACTER_JUNK`, which filters out whitespace "
"characters (a blank or tab; it's a bad idea to include newline in this!)."
msgstr ""
"*charjunk*:  (1)  junk "
" :"
"func:`IS_CHARACTER_JUNK`  ("
") "

#: ../../library/difflib.rst:243
msgid ""
":file:`Tools/scripts/ndiff.py` is a command-line front-end to this function."
msgstr ""
":file:`Tools/scripts/ndiff.py` "
""

#: ../../library/difflib.rst:261
msgid "Return one of the two sequences that generated a delta."
msgstr ""

#: ../../library/difflib.rst:263
msgid ""
"Given a *sequence* produced by :meth:`Differ.compare` or :func:`ndiff`, "
"extract lines originating from file 1 or 2 (parameter *which*), stripping "
"off line prefixes."
msgstr ""
":meth:`Differ.compare`  :func:`ndiff`  *sequence* "
" 1  2 ( "
"*which* ) "

#: ../../library/difflib.rst:267
msgid "Example:"
msgstr ":"

#: ../../library/difflib.rst:284
msgid ""
"Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` "
"generating the delta lines) in unified diff format."
msgstr ""
"*a*  *b* ()  ( :term:`"
" `)  unified diff ("
")"

#: ../../library/difflib.rst:287
msgid ""
"Unified diffs are a compact way of showing just the lines that have changed "
"plus a few lines of context.  The changes are shown in an inline style "
"(instead of separate before/after blocks).  The number of context lines is "
"set by *n* which defaults to three."
msgstr ""
""
" (/) "
"*n* "
" 3 "

#: ../../library/difflib.rst:292
msgid ""
"By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) "
"are created with a trailing newline.  This is helpful so that inputs created "
"from :func:`io.IOBase.readlines` result in diffs that are suitable for use "
"with :func:`io.IOBase.writelines` since both the inputs and outputs have "
"trailing newlines."
msgstr ""
" diff  (``---``, ``+++``, ``@@`` ) "
" :func:`io.IOBase.readlines`  :func:`io.IOBase."
"writelines`  diff  ("
") "

#: ../../library/difflib.rst:326
msgid ""
"Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence "
"of delta lines (also bytes) in the format returned by *dfunc*. *dfunc* must "
"be a callable, typically either :func:`unified_diff` or :func:`context_diff`."
msgstr ""
"*dfunc*  *a*  *b* (bytes ) "
" ( bytes ) *dfunc* "
"*dfunc*  :func:"
"`unified_diff`  :func:`context_diff` "

#: ../../library/difflib.rst:331
msgid ""
"Allows you to compare data with unknown or inconsistent encoding. All inputs "
"except *n* must be bytes objects, not str. Works by losslessly converting "
"all inputs (except *n*) to str, and calling ``dfunc(a, b, fromfile, tofile, "
"fromfiledate, tofiledate, n, lineterm)``. The output of *dfunc* is then "
"converted back to bytes, so the delta lines that you receive have the same "
"unknown/inconsistent encodings as *a* and *b*."
msgstr ""
""
"*n* bytes "
"*n*  str ``dfunc(a, b, fromfile, "
"tofile, fromfiledate, tofiledate, n, lineterm)`` "
"*dfunc* bytes "
"*a*  *b* "
""

#: ../../library/difflib.rst:342
msgid ""
"Return ``True`` for ignorable lines.  The line *line* is ignorable if *line* "
"is blank or contains a single ``'#'``, otherwise it is not ignorable.  Used "
"as a default for parameter *linejunk* in :func:`ndiff` in older versions."
msgstr ""
" ``True``  *line*   ``'#'`` "
""
" :func:`ndiff`  *linejunk* "

#: ../../library/difflib.rst:349
msgid ""
"Return ``True`` for ignorable characters.  The character *ch* is ignorable "
"if *ch* is a space or tab, otherwise it is not ignorable.  Used as a default "
"for parameter *charjunk* in :func:`ndiff`."
msgstr ""
" ``True``  *ch* "
" :func:`ndiff`  "
"*charjunk* "

#: ../../library/difflib.rst:357
msgid ""
"`Pattern Matching: The Gestalt Approach `_"
msgstr ""
"`Pattern Matching: The Gestalt Approach `_"

#: ../../library/difflib.rst:357
msgid ""
"Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. "
"This was published in `Dr. Dobb's Journal `_ in "
"July, 1988."
msgstr ""
"John W. Ratcliff  D. E. Metzener "
"`Dr. Dobb's Journal `_ 19887"

#: ../../library/difflib.rst:364
msgid "SequenceMatcher Objects"
msgstr "SequenceMatcher"

#: ../../library/difflib.rst:366
msgid "The :class:`SequenceMatcher` class has this constructor:"
msgstr ""
":class:`SequenceMatcher` :"

#: ../../library/difflib.rst:371
msgid ""
"Optional argument *isjunk* must be ``None`` (the default) or a one-argument "
"function that takes a sequence element and returns true if and only if the "
"element is \"junk\" and should be ignored. Passing ``None`` for *isjunk* is "
"equivalent to passing ``lambda x: False``; in other words, no elements are "
"ignored. For example, pass::"
msgstr ""
" *isjunk* ``None`` () "
""
" junk "
"*isjunk*  ``None`` ``lambda x: False`` "
"; "
"::"

#: ../../library/difflib.rst:379
msgid ""
"if you're comparing lines as sequences of characters, and don't want to "
"synch up on blanks or hard tabs."
msgstr ""

#: ../../library/difflib.rst:382
msgid ""
"The optional arguments *a* and *b* are sequences to be compared; both "
"default to empty strings.  The elements of both sequences must be :term:"
"`hashable`."
msgstr ""
" *a*  *b* "
" :term:` ` "
""

#: ../../library/difflib.rst:385
msgid ""
"The optional argument *autojunk* can be used to disable the automatic junk "
"heuristic."
msgstr ""
" *autojunk*  junk "
""

#: ../../library/difflib.rst:391
msgid ""
"SequenceMatcher objects get three data attributes: *bjunk* is the set of "
"elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of non-"
"junk elements considered popular by the heuristic (if it is not disabled); "
"*b2j* is a dict mapping the remaining elements of *b* to a list of positions "
"where they occur. All three are reset whenever *b* is reset with :meth:"
"`set_seqs` or :meth:`set_seq2`."
msgstr ""
"SequenceMatcher 3: *bjunk*  "
"*isjunk*  ``True``  *b* ; *bpopular*  ("
")  popular "
"; *b2j*  *b* "
" dict  3  :meth:`set_seqs`  :meth:`set_seq2`  *b* "
""

#: ../../library/difflib.rst:398
msgid "The *bjunk* and *bpopular* attributes."
msgstr "*bjunk*  *bpopular* "

#: ../../library/difflib.rst:401
msgid ":class:`SequenceMatcher` objects have the following methods:"
msgstr ":class:`SequenceMatcher` :"

#: ../../library/difflib.rst:405
msgid "Set the two sequences to be compared."
msgstr "2"

#: ../../library/difflib.rst:407
msgid ""
":class:`SequenceMatcher` computes and caches detailed information about the "
"second sequence, so if you want to compare one sequence against many "
"sequences, use :meth:`set_seq2` to set the commonly used sequence once and "
"call :meth:`set_seq1` repeatedly, once for each of the other sequences."
msgstr ""
":class:`SequenceMatcher` 2"
" 1"
" :meth:`set_seq2` 1"
" :meth:`set_seq1` "

#: ../../library/difflib.rst:415
msgid ""
"Set the first sequence to be compared.  The second sequence to be compared "
"is not changed."
msgstr ""
"12"
""

#: ../../library/difflib.rst:421
msgid ""
"Set the second sequence to be compared.  The first sequence to be compared "
"is not changed."
msgstr ""
"21"
""

#: ../../library/difflib.rst:427
msgid "Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``."
msgstr "``a[alo:ahi]``  ``b[blo:bhi]`` "

#: ../../library/difflib.rst:429
msgid ""
"If *isjunk* was omitted or ``None``, :meth:`find_longest_match` returns "
"``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo "
"

Web Proxy Viewer  |  New URL  |  Original Page