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 3
3
4
4
import torch
5
5
import json
6
+ import os .path
6
7
from typing import List , Tuple
7
8
from EduNLP .constant import MODEL_DIR
8
9
from ..Vector import T2V , get_pretrained_t2v as get_t2v_pretrained_model
Original file line number Diff line number Diff line change 1
1
# coding: utf-8
2
2
# 2021/8/1 @ tongshiwei
3
3
4
+ from pickle import NONE
4
5
from typing import Iterable , Union
5
6
from ..SIF .segment import seg
6
7
from ..SIF .tokenization import tokenize
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ class T2V(object):
49
49
... 如图$\\ FigureID{088f15ea-8b7c-11eb-897e-b46bfc50aa29}$,若$x,y$满足约束条件$\\ SIFSep$,则$z=x+7 y$的最大值为$\\ SIFBlank$'}]
50
50
>>> model_dir = "examples/test_model/d2v"
51
51
>>> 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
+ ( ...)
54
54
>>> path = path_append(path, os.path.basename(path) + '.bin', to_str=True)
55
55
>>> t2v = T2V('d2v',filepath=path)
56
56
>>> print(t2v(item))
You can’t perform that action at this time.
0 commit comments