File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 33
44import torch
55import json
6+ import os .path
67from typing import List , Tuple
78from EduNLP .constant import MODEL_DIR
89from ..Vector import T2V , get_pretrained_t2v as get_t2v_pretrained_model
Original file line number Diff line number Diff line change 11# coding: utf-8
22# 2021/8/1 @ tongshiwei
33
4+ from pickle import NONE
45from typing import Iterable , Union
56from ..SIF .segment import seg
67from ..SIF .tokenization import tokenize
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ class T2V(object):
4949 ... 如图$\\ FigureID{088f15ea-8b7c-11eb-897e-b46bfc50aa29}$,若$x,y$满足约束条件$\\ SIFSep$,则$z=x+7 y$的最大值为$\\ SIFBlank$'}]
5050 >>> model_dir = "examples/test_model/d2v"
5151 >>> url, model_name, *args = get_pretrained_model_info('d2v_test_256')
52- >>> path = get_data(url, model_dir); # doctest: +ELLIPSIS
53- downloader, INFO ...
52+ >>> (); path = get_data(url, model_dir); () # doctest: +ELLIPSIS
53+ ( ...)
5454 >>> path = path_append(path, os.path.basename(path) + '.bin', to_str=True)
5555 >>> t2v = T2V('d2v',filepath=path)
5656 >>> print(t2v(item))
You can’t perform that action at this time.
0 commit comments