def _load_embedding(self, pretrained_file_path, elem_delim,<EOL>encoding='<STR_LIT:utf8>'):
pretrained_file_path = os.path.expanduser(pretrained_file_path)<EOL>if not os.path.isfile(pretrained_file_path):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>logging.info('<STR_LIT>',<EOL>pretrained_file_path)<EOL>if pretrained_file_path.endswith('<STR_LIT>'):<EOL><INDENT>self._load_embedding_serialized(<EOL>pretrained_file_path=pretrained_file_path)<EOL><DEDENT>else:<EOL><INDENT>self._load_embedding_txt(<EOL>pretrained_file_path=pretrained_file_path,<EOL>elem_delim=elem_delim, encoding=encoding)<EOL><DEDENT>
Load embedding vectors from a pre-trained token embedding file.

        Both text files and TokenEmbedding serialization files are supported.
        elem_delim and encoding are ignored for non-text files.

        For every unknown token, if its representation `self.unknown_token` is encountered in the
        pre-trained token embedding file, index 0 of `self.idx_to_vec` maps to the pre-trained token
        embedding vector loaded from the file; otherwise, index 0 of `self.idx_to_vec` maps to the
        text embedding vector initialized by `self._init_unknown_vec`.

        If a token is encountered multiple times in the pre-trained text embedding file, only the
        first-encountered token embedding vector will be loaded and the rest will be skipped.