Update README

This commit is contained in:
xxupiano 2021-10-28 13:10:37 +00:00
parent 4353a1bae2
commit c941044ab6
2 changed files with 222 additions and 118 deletions

120
README.md
View File

@ -19,9 +19,7 @@
<h1 align="center">
<p>基于深度学习的开源中文知识图谱抽取框架</p>
</h1>
DeepKE 是一个支持**低资源、长篇章**的知识抽取工具可以基于pytorch实现命名实体识别、关系抽取和属性抽取功能。
DeepKE 是一个支持**低资源、长篇章**的知识抽取工具,可以基于**PyTorch**实现**命名实体识别**、**关系抽取**和**属性抽取**功能。
<br>
@ -43,7 +41,7 @@ Deepke的架构图如下所示
<img src="pics/architectures.png">
</h3>
DeepKE包括了三个模块可以进行关系抽取、实体命名识别以及属性抽取任务,在各个模块下包括各自的子模块。其中关系抽取模块就有常规模块、文档级抽取模块以及低资源少样本模块。在每一个子模块中,分为分词、预处理等的一个工具集合,以及编码和训练预测部分。
DeepKE包括了三个模块可以进行命名实体识别、关系抽取以及属性抽取任务,在各个模块下包括各自的子模块。其中关系抽取模块就有常规模块、文档级抽取模块以及低资源少样本模块。在每一个子模块中,包含实现分词、预处理等功能的一个工具集合,以及编码、训练和预测部分。
<br>
@ -51,19 +49,14 @@ DeepKE包括了三个模块可以进行关系抽取、实体命名识别以
DeepKE支持pip安装使用以常规全监督设定关系抽取为例
1下载代码 ```git clone https://github.com/zjunlp/DeepKE.git```别忘记star和fork哈
1. 下载代码 ```git clone https://github.com/zjunlp/DeepKE.git```别忘记star和fork哈
2、创建虚拟环境 ```conda create -n deepke python=3.8```
3、进入虚拟环境 ```conda activate deepke```
4、pip安装需要的依赖包如果直接使用```pip install deepke```;如需修改源码使用,首先```python setup.py install```,修改完后,```python setup.py develop```
5、进入使用位置 ```cd DeepKE/example/re/standard```
6、进行训练 ```python run.py```,训练用到的参数可在conf文件夹内修改
7、进行预测```python predict.py```,预测用到的参数可在conf文件夹内修改
2. 推荐使用anaconda创建虚拟环境 ```conda create -n deepke python=3.8```
3. 进入虚拟环境 ```conda activate deepke```
4. pip安装需要的依赖包如果直接使用```pip install deepke```;如需修改源码使用,首先```python setup.py install```,修改完后,```python setup.py develop```
5. 进入使用位置 ```cd DeepKE/example/re/standard```
6. 进行训练 ```python run.py```,训练用到的参数可在conf文件夹内修改
7. 进行预测```python predict.py```,预测用到的参数可在conf文件夹内修改
### 环境依赖
@ -82,60 +75,69 @@ DeepKE支持pip安装使用以常规全监督设定关系抽取为例
- opt-einsum==3.3.0
- ujson
1. **命名实体识别NER**
### 具体功能介绍
数据为txt文件样式范例为
| Sentence | Person | Location | Organization |
| :----------------------------------------------------------: | :------------------------: | :------------: | :----------------------------: |
| 本报北京9月4日讯记者杨涌报道部分省区人民日报宣传发行工作座谈会9月3日在4日在京举行。 | 杨涌 | 北京 | 人民日报 |
| 《红楼梦》是中央电视台和中国电视剧制作中心根据中国古典文学名著《红楼梦》摄制于1987年的一部古装连续剧由王扶林导演周汝昌、王蒙、周岭等多位红学家参与制作。 | 王扶林,周汝昌,王蒙,周岭 | 中国 | 中央电视台,中国电视剧制作中心 |
| 秦始皇兵马俑位于陕西省西安市1961年被国务院公布为第一批全国重点文物保护单位是世界八大奇迹之一。 | 秦始皇 | 陕西省,西安市 | 国务院 |
#### 1. 命名实体识别NER
具体流程请进入详细的README中
- 命名实体识别是从非结构化的文本中识别出实体和其类型。数据为txt文件样式范例为
**[常规全监督STANDARD](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/ner/standard)**
常规模块为预训练模型可进入其目录修改数据集以及conf文件夹下的参数```python run.py```即可训练,```python predict.py```即可预测。
| Sentence | Person | Location | Organization |
| :----------------------------------------------------------: | :------------------------: | :------------: | :----------------------------: |
| 本报北京9月4日讯记者杨涌报道部分省区人民日报宣传发行工作座谈会9月3日在4日在京举行。 | 杨涌 | 北京 | 人民日报 |
| 《红楼梦》是中央电视台和中国电视剧制作中心根据中国古典文学名著《红楼梦》摄制于1987年的一部古装连续剧由王扶林导演周汝昌、王蒙、周岭等多位红学家参与制作。 | 王扶林,周汝昌,王蒙,周岭 | 中国 | 中央电视台,中国电视剧制作中心 |
| 秦始皇兵马俑位于陕西省西安市1961年被国务院公布为第一批全国重点文物保护单位是世界八大奇迹之一。 | 秦始皇 | 陕西省,西安市 | 国务院 |
**[少样本FEW-SHOT](https://github.com/zjunlp/DeepKE/tree/test_new_deepke/example/ner/few-shot)**
少样本模块可进入其目录模型加载和保存位置以及配置可以在conf文件夹中修改```python run.py```训练conll2003,```python run.py +train=few_shot```直接进行few-shot训练,若要加载模型修改few_shot.yaml中的load_path。 若要进行预测在config.yaml中加入 - predict 再在predict.yaml中修改load_path为模型路径以及write_path为预测结果保存路径再``` python predict.py ```即可。
- 具体流程请进入详细的README中
- **[常规全监督STANDARD](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/ner/standard)**
常规模块使用预训练模型BERT
进入`DeepKE/example/ner/standard`,数据集和参数配置可以分别进入`data`和`conf`文件夹中修改;
```python run.py```即可训练,```python predict.py```即可预测。
- **[少样本FEW-SHOT](https://github.com/zjunlp/DeepKE/tree/test_new_deepke/example/ner/few-shot)**
低资源少样本模块;
进入`DeepKE/example/ner/few-shot`,模型加载和保存位置以及配置可以在`conf`文件夹中修改;
使用`CoNLL-2003`进行训练:`python run.py`
进行few-shot训练`python run.py +train=few_shot`,若要加载模型,修改`few_shot.yaml`中的`load_path`
若要进行预测,在`config.yaml`中追加`- predict``predict.yaml`中修改`load_path`为模型路径以及`write_path`为预测结果的保存路径,完成修改后使用`python predict.py`即可预测。
2. **关系抽取RE**
#### 2. 关系抽取RE
关系抽取是从非结构化的文本中抽取出实体之间的关系以下为几个样式范例数据为csv文件
- 关系抽取是从非结构化的文本中抽取出实体之间的关系以下为几个样式范例数据为csv文件
| Sentence | Relation | Head | Head_offset | Tail | Tail_offset |
| :----------------------------------------------------: | :------: | :--------: | :---------: | :--------: | :---------: |
| 《岳父也是爹》是王军执导的电视剧,由马恩然、范明主演。 | 导演 | 岳父也是爹 | 1 | 王军 | 8 |
| 《九玄珠》是在纵横中文网连载的一部小说,作者是龙马。 | 连载网站 | 九玄珠 | 1 | 纵横中文网 | 7 |
| 提起杭州的美景,西湖总是第一个映入脑海的词语。 | 所在城市 | 西湖 | 8 | 杭州 | 2 |
| Sentence | Relation | Head | Head_offset | Tail | Tail_offset |
| :----------------------------------------------------: | :------: | :--------: | :---------: | :--------: | :---------: |
| 《岳父也是爹》是王军执导的电视剧,由马恩然、范明主演。 | 导演 | 岳父也是爹 | 1 | 王军 | 8 |
| 《九玄珠》是在纵横中文网连载的一部小说,作者是龙马。 | 连载网站 | 九玄珠 | 1 | 纵横中文网 | 7 |
| 提起杭州的美景,西湖总是第一个映入脑海的词语。 | 所在城市 | 西湖 | 8 | 杭州 | 2 |
具体流程请进入详细的README中RE包括了以下三个子功能
- 具体流程请进入详细的README中RE包括了以下三个子功能
- **[常规全监督STANDARD](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/standard)**
常规模块为常用的深度学习模型包括CNN、RNN、Capsule、GCN、Transforemer以及预训练模型
进入`DeepKE/example/re/standard`,数据集和参数配置可以分别进入`data`和`conf`文件夹中修改;
```python run.py```即可训练,```python predict.py```即可预测。
- **[少样本FEW-SHOT](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/few-shot)**
进入`DeepKE/example/re/few-shot`,数据集和参数配置可以分别进入`data`和`conf`文件夹中修改;
```python run.py```即可训练;如需从上次训练的模型开始训练:设置`conf/train.yaml`中的`train_from_saved_model`为上次保存模型的路径,每次训练的日志默认保存在根目录,可用`log_dir`来配置;
```python predict.py```即可预测。
- **[文档级DOCUMENT](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/document)**
```train_distant.json```由于文件太大请自行从Google Drive上下载到data/目录下;
进入`DeepKE/example/re/document`,数据集和参数配置可以分别进入`data`和`conf`文件夹中修改;
```python run.py```即可训练;如需从上次训练的模型开始训练:设置`conf/train.yaml`中的`train_from_saved_model`为上次保存模型的路径,每次训练的日志默认保存在根目录,可用`log_dir`来配置;
**[常规全监督STANDARD](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/standard)**
常规模块为常用的深度学习模型有CNN、RNN、Capsule、GCN、Transforemer以及预训练模型可进入其目录修改数据集以及conf文件夹下的目录```python run.py```即可训练。修改conf文件夹下predict.yaml中fp```python predict.py``` 即可进行预测。
#### 3. 属性抽取AE
**[少样本FEW-SHOT](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/few-shot)** :
进入其目录修改数据集以及conf文件夹下的目录```python run.py```即可训练,如需从上次训练的模型开始训练:设置.yaml中的train_from_saved_model为上次保存模型的路径每次训练的日志保存路径默认保存在根目录可以通过.yaml中的log_dir来配置```python predict.py```即可预测。
- 数据为csv文件样式范例为
**[文档级DOCUMENT](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/document)** :
```train_distant.json```由于文件太大请自行从Google Drive上下载到data/目录下.进入其目录修改数据集以及conf文件夹下的目录```python run.py```即可训练,如需从上次训练的模型开始训练:设置.yaml中的train_from_saved_model为上次保存模型的路径每次训练的日志保存路径默认保存在根目录可以通过.yaml中的log_dir来配置```python predict.py```即可预测。
| Sentence | Att | Ent | Ent_offset | Val | Val_offset |
| :----------------------------------------------------------: | :------: | :------: | :--------: | :-----------: | :--------: |
| 张冬梅汉族1968年2月生河南淇县人 | 民族 | 张冬梅 | 0 | 汉族 | 6 |
| 杨缨,字绵公,号钓溪,松溪县人,祖籍将乐,是北宋理学家杨时的七世孙 | 朝代 | 杨缨 | 0 | 北宋 | 22 |
| 2014年10月1日许鞍华执导的电影《黄金时代》上映 | 上映时间 | 黄金时代 | 19 | 2014年10月1日 | 0 |
3. **属性抽取AE**
数据为csv文件样式范例为
| Sentence | Att | Ent | Ent_offset | Val | Val_offset |
| :----------------------------------------------------------: | :------: | :------: | :--------: | :-----------: | :--------: |
| 张冬梅汉族1968年2月生河南淇县人 | 民族 | 张冬梅 | 0 | 汉族 | 6 |
| 杨缨,字绵公,号钓溪,松溪县人,祖籍将乐,是北宋理学家杨时的七世孙 | 朝代 | 杨缨 | 0 | 北宋 | 22 |
| 2014年10月1日许鞍华执导的电影《黄金时代》上映 | 上映时间 | 黄金时代 | 19 | 2014年10月1日 | 0 |
具体流程请进入详细的README中:
**[常规全监督STANDARD](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/ae/standard)**
常规模块为常用的深度学习模型有CNN、RNN、Capsule、GCN、Transforemer以及预训练模型可进入其目录修改数据集以及conf文件夹下的目录```python run.py```即可训练,```python predict.py```即可预测。
<br>
- 具体流程请进入详细的README中
- **[常规全监督STANDARD](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/ae/standard)**
常规模块为常用的深度学习模型包括CNN、RNN、Capsule、GCN、Transforemer以及预训练模型
进入`DeepKE/example/re/standard`,数据集和参数配置可以分别进入`data`和`conf`文件夹中修改;
```python run.py```即可训练,```python predict.py```即可预测。
## 备注(常见问题)
1. 使用 Anaconda 时,建议添加国内镜像,下载速度更快。如[清华镜像](https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/)。
@ -144,7 +146,7 @@ DeepKE支持pip安装使用以常规全监督设定关系抽取为例
1. 安装后提示 `ModuleNotFoundError: No module named 'past'`,输入命令 `pip install future` 即可解决。
1. 使用语言预训练模型时,在线安装下载模型比较慢,更建议提前下载好,存放到 pretrained 文件夹内。具体存放文件要求见文件夹内的 readme.md
1. 使用语言预训练模型时,在线安装下载模型比较慢,更建议提前下载好,存放到 pretrained 文件夹内。具体存放文件要求见文件夹内的 `README.md`
<br>

View File

@ -1,88 +1,190 @@
<p align="center">
<br>
<!-- <img src="https://raw.githubusercontent.com/huggingface/transformers/master/docs/source/imgs/transformers_logo_name.png" width="400"/> -->
DeepKE
<br>
<a href="https://github.com/zjunlp/deepke"> <img src="pics/logo.png" width="400"/></a>
<p>
<p align="center">
<a href="https://circleci.com/gh/huggingface/transformers">
<img alt="Build" src="https://img.shields.io/circleci/build/github/huggingface/transformers/master">
<a href="https://deepke.openkg.cn">
<img alt="Documentation" src="https://img.shields.io/badge/DeepKE-website-green">
</a>
<a href="https://github.com/huggingface/transformers/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/huggingface/transformers.svg?color=blue">
<a href="https://pypi.org/project/deepke/#files">
<img alt="PyPI" src="https://img.shields.io/pypi/v/deepke">
</a>
<a href="https://huggingface.co/transformers/index.html">
<img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/transformers/index.html.svg?down_color=red&down_message=offline&up_message=online">
<a href="https://github.com/zjunlp/DeepKE/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/zjunlp/deepke">
</a>
<a href="https://github.com/huggingface/transformers/releases">
<img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/transformers.svg">
</a>
<a href="https://github.com/huggingface/transformers/blob/master/CODE_OF_CONDUCT.md">
<img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg">
</a>
<a href="https://zenodo.org/badge/latestdoi/155220641"><img src="https://zenodo.org/badge/155220641.svg" alt="DOI"></a>
</p>
<h4 align="center">
<p>
<a href="https://github.com/zjunlp/DeepKE/blob/test_new_deepke/README.md">简体中文</a> |
<b>English</b>
<p>
</h4>
<p align="center">
<b><a href="https://github.com/zjunlp/DeepKE/blob/test_new_deepke/README.md">简体中文</a> | English</b>
</p>
<h3 align="center">
<p>Open source Chinese knowledge atlas extraction framework based on deep learning</p>
</h3>
<br>
<h3 align="center">
<a href="https://hf.co/course"><img src="https://raw.githubusercontent.com/huggingface/transformers/master/docs/source/imgs/course_banner.png"></a>
</h3>
<h2 align="center">
<p>A Deep Learning Based <br>Knowledge Extraction Toolkit<br> for Knowledge Base Population</p>
</h2>
DeepKE offers some models for knowledge extrations
DeepKE is a knowledge extraction toolkit supporting **low-resource** and **document-level** scenarios. It provides three functions based **PyTorch**, including **Named Entity Recognition**, **Relation Extraciton** and **Attribute Extraction**.
<br>
## Online Demo
demo 's urls
1.NER
[demo](https://deepke.openkg.cn)
```
REGULAR
```
### Prediction
2.RE
There is a demonstration of prediction.
<img src="README_ENGLISH.assets/demo.gif" width="636" height="494" align=center>
1.REGULAR
<br>
2.FEW-SHOT
## Model Framework
3.DOCUMENT
<h3 align="center">
<img src="pics/architectures.png">
</h3>
<p align="center">
Figure 1: The framework of DeepKE
</p>
3.AE
- DeepKE contains three modules for **named entity recognition**, **relation extraction** and **attribute extraction**, the three tasks respectively.
- Each module has its own submodules. For example, there are **standard**, **document-level** and **few-shot** submodules in the attribute extraction modular.
- Each submodule compose of three parts: a **collection of tools**, which can function as tokenizer, dataloader, preprocessor and the like, a **encoder** and a part for **training and prediction**
<br>
## Quick Tour
## Quickstart
## Installtion
pip installtion
```
pip install deepke
```
Take the fully supervised attribute extraction for example.
## Model architectures
Deepke contains these models:
1. Download basic codes `git clone https://github.com/zjunlp/DeepKE.git `
2. Create a virtual environment (recommend `anaconda`) `conda create -n deepke python=3.8`
3. Enter the environment `conda activate deepke`
4. Install dependent packages
- If use deepke directly: `pip install deepke`
- If modify source codes before usage:
run `python setup.py install` firstly,
after modification, run `python setup.py develop`
1.NER
5. Enter the corresponding directory `cd DeepKE/example/re/standard`
6. Train `python run.py` (Parameters for training can be changed in the `conf` folder)
7. Predict `python predict.py`(Parameters for prediction can be changed in the `conf` folder)
**[REGULAR](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/ner/regular/README.md)**
### Requirements
2.RE
> python == 3.8
**[REGULAR](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/regular/README.md)**
- torch == 1.5
- hydra-core == 1.0.6
- tensorboard == 2.4.1
- matplotlib == 3.4.1
- transformers == 3.4.0
- jieba == 0.42.1
- scikit-learn == 0.24.1
- pytorch-transformers == 1.2.0
- seqeval == 1.2.2
- tqdm == 4.60.0
- opt-einsum==3.3.0
- ujson
### Introduction of Three Functions
FEW-SHOT
#### 1. Named Entity Recognition
DOCUMENT
- Named entity recognition seeks to locate and classify named entities mentioned in unstructured text into pre-defined categories such as person names, organizations, locations, organizations, etc.
3.AE
- The data is stored in `.txt` files. Some instances as following:
## Citation
| Sentence | Person | Location | Organization |
| :----------------------------------------------------------: | :------------------------: | :------------: | :----------------------------: |
| 本报北京9月4日讯记者杨涌报道部分省区人民日报宣传发行工作座谈会9月3日在4日在京举行。 | 杨涌 | 北京 | 人民日报 |
| 《红楼梦》是中央电视台和中国电视剧制作中心根据中国古典文学名著《红楼梦》摄制于1987年的一部古装连续剧由王扶林导演周汝昌、王蒙、周岭等多位红学家参与制作。 | 王扶林,周汝昌,王蒙,周岭 | 中国 | 中央电视台,中国电视剧制作中心 |
| 秦始皇兵马俑位于陕西省西安市1961年被国务院公布为第一批全国重点文物保护单位是世界八大奇迹之一。 | 秦始皇 | 陕西省,西安市 | 国务院 |
- Read the detailed process in specific README
- **[STANDARD (Fully Supervised)](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/ner/standard)**
- The standard module is implemented by the pretrained model *BERT*.
- Enter `DeepKE/example/ner/standard`.
- The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.
- **Train**: `python run.py`
- **Predict**: `python predict.py`
- **[FEW-SHOT](https://github.com/zjunlp/DeepKE/tree/test_new_deepke/example/ner/few-shot)**
- This module is in the low-resouce scenario.
- Enter `DeepKE/example/ner/few-shot`.
- The directory where the model is loaded and saved and the configuration parameters can be cusomized in the `conf` folder.
- **Train with *CoNLL-2003***: `python run.py`
- **Train in the few-shot scenario**: `python run.py +train=few_shot`. Users can modify `load_path` in `conf/train/few_shot.yaml` with the use of existing loaded model.
- **Predict**: add `- predict` to `conf/config.yaml`, modify `loda_path` as the model path and `write_path` as the path where the predicted results are saved in `conf/predict.yaml`, and then run `python predict.py`
#### 2. Relation Extraction
- Relationship extraction is the task of extracting semantic relations between entities from a unstructured text.
- The data is stored in `.csv` files. Some instances as following:
| Sentence | Relation | Head | Head_offset | Tail | Tail_offset |
| :----------------------------------------------------: | :------: | :--------: | :---------: | :--------: | :---------: |
| 《岳父也是爹》是王军执导的电视剧,由马恩然、范明主演。 | 导演 | 岳父也是爹 | 1 | 王军 | 8 |
| 《九玄珠》是在纵横中文网连载的一部小说,作者是龙马。 | 连载网站 | 九玄珠 | 1 | 纵横中文网 | 7 |
| 提起杭州的美景,西湖总是第一个映入脑海的词语。 | 所在城市 | 西湖 | 8 | 杭州 | 2 |
- Read the detailed process in specific README
- **[STANDARD](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/standard)**
- The standard module is implemented by common deep learning models, including CNN, RNN, Capsule, GCN, Transformer and the pretrained model.
- Enter the `DeepKE/example/re/standard` folder.
- The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.
- **Train**: `python run.py`
- **Predict**: `python predict.py`
- **[FEW-SHOT](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/few-shot)**
- This module is in the low-resouce scenario.
- Enter `DeepKE/example/re/few-shot` .
- **Train**: `python run.py`
Start with the model trained last time: modify `train_from_saved_model` in `conf/train.yaml`as the path where the model trained last time was saved.
And the path saving logs generated in training can be customized by `log_dir`.
- **Predict**: `python predict.py`
- **[DOCUMENT](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/re/document)**
- Download the model `train_distant.json` from [*Google Drive*](https://drive.google.com/drive/folders/1c5-0YwnoJx8NS6CV2f-NoTHR__BdkNqw) to `data/`.
- Enter `DeepKE/example/re/document` .
- **Train**: `python run.py`
Start with the model trained last time: modify `train_from_saved_model` in `conf/train.yaml`as the path where the model trained last time was saved.
And the path saving logs generated in training can be customized by `log_dir`.
- **Predict**: `python predict.py`
#### 3. Attribute Extraction
- Attribute extraction is to extract attributes for entities in a unstructed text.
- The data is stored in `.csv` files. Some instances as following:
| Sentence | Att | Ent | Ent_offset | Val | Val_offset |
| :----------------------------------------------------------: | :------: | :------: | :--------: | :-----------: | :--------: |
| 张冬梅汉族1968年2月生河南淇县人 | 民族 | 张冬梅 | 0 | 汉族 | 6 |
| 杨缨,字绵公,号钓溪,松溪县人,祖籍将乐,是北宋理学家杨时的七世孙 | 朝代 | 杨缨 | 0 | 北宋 | 22 |
| 2014年10月1日许鞍华执导的电影《黄金时代》上映 | 上映时间 | 黄金时代 | 19 | 2014年10月1日 | 0 |
- Read the detailed process in specific README
- **[STANDARD](https://github.com/zjunlp/deepke/blob/test_new_deepke/example/ae/standard)**
- The standard module is implemented by common deep learning models, including CNN, RNN, Capsule, GCN, Transformer and the pretrained model.
- Enter the `DeepKE/example/ae/standard` folder.
- The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.
- **Train**: `python run.py`
- **Predict**: `python predict.py`
<br>
## Tips
1. Using nearest mirror, like [THU](https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/) in China, will speed up the installation of *Anaconda*.
2. Using nearest mirror, like [aliyun](http://mirrors.aliyun.com/pypi/simple/) in China, will speed up `pip install XXX`.
3. When encountering `ModuleNotFoundError: No module named 'past'`run `pip install future` .
4. It's slow to install the pretrained language models online. Recommend download pretrained models before use and save them in the `pretrained` folder. Read `README.md` in every task directory to check the specific requirement for saving pretrained models.
<br>
## Developers
Zhejiang University: Ningyu Zhang, Liankuan Tao, Haiyang Yu, Xiang Chen, Xin Xu, Xi Tian, Lei Li, Zhoubo Li, Shumin Deng, Yunzhi Yao, Hongbin Ye, Xin Xie, Guozhou Zheng, Huajun Chen
Alibaba DAMO: Chuanqi Tan, Fei Huang