# SOME DESCRIPTIVE TITLE. # Copyright (C) 2021, PaddleNLP # This file is distributed under the same license as the PaddleNLP package. # FIRST AUTHOR , 2022. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PaddleNLP \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-03-18 21:31+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.0\n" #: ../source/paddlenlp.data.vocab.rst:2 msgid "vocab" msgstr "" #: of paddlenlp.data.vocab.Vocab:1 msgid "基类::class:`object`" msgstr "" #: of paddlenlp.data.vocab.Vocab:1 msgid "" "The class used to convert between tokens and ids. It also includes some " "store/load functions." msgstr "" #: of paddlenlp.data.vocab.Vocab paddlenlp.data.vocab.Vocab.build_vocab #: paddlenlp.data.vocab.Vocab.from_dict paddlenlp.data.vocab.Vocab.from_json #: paddlenlp.data.vocab.Vocab.load_vocabulary #: paddlenlp.data.vocab.Vocab.to_indices paddlenlp.data.vocab.Vocab.to_json #: paddlenlp.data.vocab.Vocab.to_tokens msgid "参数" msgstr "" #: of paddlenlp.data.vocab.Vocab:4 msgid "" "A Counter intance describes the tokens and their frequencies. Its keys " "will be indexed accroding to the order of frequency sorting to construct " "mapping relationship. If None, `token_to_idx` must be provided as the " "mapping relationship. Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab:10 msgid "Max size of vocab, not including special tokens. Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab:13 paddlenlp.data.vocab.Vocab.build_vocab:11 msgid "Ignore tokens whose frequencies are less than `min_freq`. Default: 1." msgstr "" #: of paddlenlp.data.vocab.Vocab:16 paddlenlp.data.vocab.Vocab.build_vocab:14 msgid "" "A dict specifies the mapping relationship between tokens and indices to " "be used. If provided, adjust the tokens and indices mapping according to " "it. If None, counter must be provided. Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab:21 msgid "" "Special token for unknow token. If no need, it also could be None. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab:24 msgid "" "Special token for padding token. If no need, it also could be None. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab:27 msgid "" "Special token for bos token. If no need, it also could be None. Default: " "None." msgstr "" #: of paddlenlp.data.vocab.Vocab:30 msgid "" "Special token for eos token. If no need, it lso could be None. Default: " "None." msgstr "" #: of paddlenlp.data.vocab.Vocab:33 paddlenlp.data.vocab.Vocab.build_vocab:31 #: paddlenlp.data.vocab.Vocab.from_dict:18 #: paddlenlp.data.vocab.Vocab.load_vocabulary:19 msgid "" "Keyword arguments ending with `_token`. It can be used to specify further" " special tokens that will be exposed as attribute of the vocabulary and " "associated with an index." msgstr "" #: of paddlenlp.data.vocab.Vocab.to_tokens:1 msgid "Maps the input indices to token list." msgstr "" #: of paddlenlp.data.vocab.Vocab.to_tokens:3 msgid "" "The input indice(s) for mapping. Must be an `int` or 1D " "`list[int]`|`tuple[int]`|`numpy.ndarray`." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab #: paddlenlp.data.vocab.Vocab.from_dict paddlenlp.data.vocab.Vocab.from_json #: paddlenlp.data.vocab.Vocab.load_vocabulary #: paddlenlp.data.vocab.Vocab.to_indices paddlenlp.data.vocab.Vocab.to_json #: paddlenlp.data.vocab.Vocab.to_tokens msgid "返回" msgstr "" #: of paddlenlp.data.vocab.Vocab.to_tokens:7 msgid "" "Obtained token(s). If `indices` is an integer, it will return a str. If " "`indices` is a list/tuple of integers, it will return a list of str." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab #: paddlenlp.data.vocab.Vocab.from_dict paddlenlp.data.vocab.Vocab.from_json #: paddlenlp.data.vocab.Vocab.load_vocabulary #: paddlenlp.data.vocab.Vocab.to_indices paddlenlp.data.vocab.Vocab.to_json #: paddlenlp.data.vocab.Vocab.to_tokens msgid "返回类型" msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:41 #: paddlenlp.data.vocab.Vocab.from_dict:28 #: paddlenlp.data.vocab.Vocab.from_json:12 #: paddlenlp.data.vocab.Vocab.load_vocabulary:28 #: paddlenlp.data.vocab.Vocab.to_indices:13 #: paddlenlp.data.vocab.Vocab.to_json:14 #: paddlenlp.data.vocab.Vocab.to_tokens:13 msgid "示例" msgstr "" #: of paddlenlp.data.vocab.Vocab.to_indices:1 msgid "Maps the input tokens into indices." msgstr "" #: of paddlenlp.data.vocab.Vocab.to_indices:3 msgid "The input token(s) for mapping." msgstr "" #: of paddlenlp.data.vocab.Vocab.to_indices:7 msgid "" "Obationed indice(s). If `tokens` is a str, it will return an integer. If " "`tokens` is a list/tuple of str, it will return a list of integers." msgstr "" #: of paddlenlp.data.vocab.Vocab.__call__:1 msgid "" "Maps the input tokens into indices. Its function is the same as the " ":meth:`to_indices` method." msgstr "" #: of paddlenlp.data.vocab.Vocab.__call__:4 msgid "See detail at `to_indices`." msgstr "" #: of paddlenlp.data.vocab.Vocab.to_json:1 msgid "" "Summarizes some information of vocab as JSON string. If path is gaven, " "the JSON string will be saved into files. The JSON string and the saved " "file all can be used to reconstruct the :class:`Vocab` by calling " ":meth:`from_json` method." msgstr "" #: of paddlenlp.data.vocab.Vocab.to_json:6 msgid "" "The path to save JSON string. If None, the JSON will not be saved. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.to_json:10 msgid "The JSON string including information of vocab." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_json:1 msgid "" "Loads :class:`Vocab` from JSON string or JSON file, which is gotten by " "calling :meth:`to_json` method." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_json:4 msgid "JSON string or file path of JSON string." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_json:7 msgid "" "An instance of :class:`Vocab` generated from information contained in " "JSON string." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_dict:1 msgid "Builds the :class:`Vocab` from a dict." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_dict:3 msgid "A dict describes the mapping relationship between tokens and indices." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_dict:6 msgid "" "The special token for unknow token. If no need, it also could be None. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_dict:9 msgid "" "The special token for padding token. If no need, it also could be None. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_dict:12 msgid "" "The special token for bos token. If no need, it also could be None. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_dict:15 msgid "" "The special token for eos token. If no need, it also could be None. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.from_dict:23 msgid "" "An instance of :class:`Vocab` generated from the given dict and special " "tokens." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:1 msgid "" "Builds the :class:`Vocab` accoring to given iterator and other " "information. Firstly, iterate over the `iterator` to construct a " ":class:`collections.Counter` and used to init the as :class:`Vocab`." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:5 msgid "" "Iterator of tokens. Each element should be a list of tokens if wordlevel " "vocab is needed." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:8 msgid "The max size of vocab, not including special tokens. Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:19 msgid "" "The special token for unknow token ''. If no need, it also could be " "None. Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:22 msgid "" "The special token for padding token ''. If no need, it also could be" " None. Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:25 msgid "" "The special token for bos token ''. If no need, it also could be " "None. Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:28 msgid "" "The special token for eos token ''. If no need, it also could be " "None. Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.build_vocab:36 msgid "" "An instance of :class:`Vocab` generated from given iterator and other " "informations." msgstr "" #: of paddlenlp.data.vocab.Vocab.load_vocabulary:1 msgid "" "Builds the :class:`Vocab` from a file reserving all tokens by calling " ":meth:`Vocab.from_dict` method. The file contains a token per line, and " "the line index would be the index of corresponding token." msgstr "" #: of paddlenlp.data.vocab.Vocab.load_vocabulary:5 msgid "the path of file to construct vocabulary." msgstr "" #: of paddlenlp.data.vocab.Vocab.load_vocabulary:7 msgid "" "special token for unknown token. If no need, it also could be None. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.load_vocabulary:10 msgid "" "special token for padding token. If no need, it also could be None. " "Default: None." msgstr "" #: of paddlenlp.data.vocab.Vocab.load_vocabulary:13 msgid "" "special token for bos token. If no need, it also could be None. Default: " "None." msgstr "" #: of paddlenlp.data.vocab.Vocab.load_vocabulary:16 msgid "" "special token for eos token. If no need, it also could be None. Default: " "None." msgstr "" #: of paddlenlp.data.vocab.Vocab.load_vocabulary:24 msgid "An instance of :class:`Vocab` generated from the given file." msgstr ""