[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-zjunlp--DeepKE":3,"tool-zjunlp--DeepKE":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",149489,2,"2026-04-10T11:32:46",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":77,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":94,"forks":95,"last_commit_at":96,"license":97,"difficulty_score":10,"env_os":98,"env_gpu":99,"env_ram":100,"env_deps":101,"category_tags":115,"github_topics":118,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":139,"updated_at":140,"faqs":141,"releases":177},6327,"zjunlp\u002FDeepKE","DeepKE","[EMNLP 2022] An Open Toolkit for Knowledge Graph Extraction and Construction","DeepKE 是一款基于深度学习的开源知识图谱构建工具包，专为从非结构化数据中高效提取实体、关系和属性而设计。它主要解决了传统方法在处理低资源场景、文档级复杂语境以及多模态数据时面临的提取难题，同时完美支持中文模式（cnSchema），降低了构建高质量知识图谱的技术门槛。\n\n无论是人工智能领域的研究人员、算法工程师，还是希望快速落地知识图谱应用的开发者，都能通过 DeepKE 轻松上手。工具不仅提供了命名实体识别、关系抽取等核心功能的预训练模型，还集成了 LightNER、KnowPrompt 等多个前沿学术成果，支持用户直接调用或进行微调训练。\n\n其独特的技术亮点在于对“低资源”和“文档级”抽取的深度优化，并率先推出了结合大语言模型（LLM）的 DeepKE-LLM 模块，让用户能利用大模型的强大能力进一步提升抽取效果。此外，项目提供了详细的文档、在线演示及 Docker 部署方案，兼容 Linux 与 Windows 环境，帮助用户快速搭建从数据处理到图谱生成的完整流程，是探索语义理解与知识工程领域的得力助手。","\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzjunlp\u002Fdeepke\"> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzjunlp_DeepKE_readme_ca1d073c8992.png\" width=\"400\"\u002F>\u003C\u002Fa>\n\u003Cp>\n\u003Cp align=\"center\">  \n    \u003Ca href=\"http:\u002F\u002Fdeepke.zjukg.cn\">\n        \u003Cimg alt=\"Documentation\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdemo-website-blue\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fdeepke\u002F#files\">\n        \u003Cimg alt=\"PyPI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdeepke\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmaster\u002FLICENSE\">\n        \u003Cimg alt=\"GitHub\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fzjunlp\u002Fdeepke\">\n    \u003C\u002Fa>\n    \u003Ca href=\"http:\u002F\u002Fzjunlp.github.io\u002FDeepKE\">\n        \u003Cimg alt=\"Documentation\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdoc-website-red\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1vS8YJhJltzw3hpJczPt24O0Azcs3ZpRi?usp=sharing\">\n        \u003Cimg alt=\"Open In Colab\" src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\n\u003Cp align=\"center\">\n    \u003Cb> English | \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_CN.md\">简体中文\u003C\u002Fa> \u003C\u002Fb>\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">\n    \u003Cp>A Deep Learning Based Knowledge Extraction Toolkit\u003Cbr>for Knowledge Graph Construction\u003C\u002Fp>\n\u003C\u002Fh1>\n\n\n[DeepKE](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2201.03335.pdf) is a knowledge extraction toolkit for knowledge graph construction supporting **cnSchema**，**low-resource**, **document-level** and **multimodal** scenarios for *entity*, *relation* and *attribute* extraction. We provide [documents](https:\u002F\u002Fzjunlp.github.io\u002FDeepKE\u002F), [online demo](http:\u002F\u002Fdeepke.zjukg.cn\u002F), [paper](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2201.03335.pdf), [slides](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1IIeIZAbVduemqXc4zD40FUMoPHCJinLy\u002Fview?usp=sharing) and [poster](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1vd7xVHlWzoAxivN4T5qKrcqIGDcSM1_7\u002Fview?usp=sharing) for beginners.\n\n- ❗Want to use **Large Language Models** with DeepKE? Try [DeepKE-LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm) and [OneKE](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fllm\u002FOneKE.md), have fun!\n- ❗Want to train supervised models? Try [Quick Start](#quick-start), we provide the NER models (e.g, [LightNER(COLING'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Ffew-shot), [W2NER(AAAI'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fstandard\u002Fw2ner)), relation extraction models (e.g., [KnowPrompt(WWW'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Ffew-shot)), relational triple extraction models (e.g., [ASP(EMNLP'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FASP), [PRGC(ACL'21)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FPRGC), [PURE(NAACL'21)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FPURE)), and release off-the-shelf  models at [DeepKE-cnSchema](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002Fcnschema), have fun!\n- We recommend using Linux; if using Windows, please use `\\\\` in file paths;\n- If HuggingFace is inaccessible, please consider using `wisemodel` or `modescape`.\n\n**If you encounter any issues during the installation of DeepKE and DeepKE-LLM, please check [Tips](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE#tips) or promptly submit an [issue](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues), and we will assist you with resolving the problem!**\n\n\n# Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [What's New](#whats-new)\n- [Prediction Demo](#prediction-demo)\n- [Model Framework](#model-framework)\n- [Quick Start](#quick-start)\n  - [DeepKE-LLM](#deepke-llm)\n  - [DeepKE-MCP-Tools](#deepke-mcp-tools)\n  - [DeepKE](#deepke)\n      - [🔧Manual Environment Configuration](#manual-environment-configuration)\n      - [🐳Building With Docker Images](#building-with-docker-images)\n  - [Requirements](#requirements)\n    - [DeepKE](#deepke-1)\n  - [Introduction of Three Functions](#introduction-of-three-functions)\n    - [1. Named Entity Recognition](#1-named-entity-recognition)\n    - [2. Relation Extraction](#2-relation-extraction)\n    - [3. Attribute Extraction](#3-attribute-extraction)\n    - [4. Event Extraction](#4-event-extraction)\n- [Tips](#tips)\n- [To do](#to-do)\n- [Reading Materials](#reading-materials)\n- [Related Toolkit](#related-toolkit)\n- [Citation](#citation)\n- [Contributors](#contributors)\n- [Other Knowledge Extraction Open-Source Projects](#other-knowledge-extraction-open-source-projects)\n\n\u003Cbr>\n\n# What's New\n* `June, 2025` We integrate the [MCP service tools](https:\u002F\u002Fmodelscope.cn\u002Fmcp\u002Fservers\u002FOpenKG\u002Fdeepke-mcp-tools) into DeepKE, enabling knowledge extraction through large language models (LLMs) as tool callers for lightweight models.\n* `December, 2024` We open source the [OneKE](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FOneKE\u002Ftree\u002Fmain) knowledge extraction framework, supporting multi-agent knowledge extraction across various scenarios.\n* `April, 2024` We release a new bilingual (Chinese and English) schema-based information extraction model called [OneKE](https:\u002F\u002Fhuggingface.co\u002Fzjunlp\u002FOneKE) based on Chinese-Alpaca-2-13B.\n* `Feb, 2024` We release a large-scale (0.32B tokens) high-quality bilingual (Chinese and English) Information Extraction (IE) instruction dataset named [IEPile](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fzjunlp\u002Fiepie), along with two models trained with `IEPile`, [baichuan2-13b-iepile-lora](https:\u002F\u002Fhuggingface.co\u002Fzjunlp\u002Fbaichuan2-13b-iepile-lora) and [llama2-13b-iepile-lora](https:\u002F\u002Fhuggingface.co\u002Fzjunlp\u002Fllama2-13b-iepile-lora).\n* `Sep 2023` a bilingual Chinese English Information Extraction (IE) instruction dataset called  `InstructIE` was released for the Instruction based Knowledge Graph Construction Task (Instruction based KGC), as detailed in [here](.\u002Fexample\u002Fllm\u002FREADME.md\u002F#data).\n* `June, 2023` We update [DeepKE-LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm) to support **knowledge extraction** with [KnowLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FKnowLM), [ChatGLM](https:\u002F\u002Fgithub.com\u002FTHUDM\u002FChatGLM-6B), LLaMA-series, GPT-series etc.\n* `Apr, 2023` We have added new models, including [CP-NER(IJCAI'23)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fner\u002Fcross), [ASP(EMNLP'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FASP), [PRGC(ACL'21)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FPRGC), [PURE(NAACL'21)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FPURE), provided [event extraction](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fee\u002Fstandard) capabilities (Chinese and English), and offered compatibility with higher versions of Python packages (e.g., Transformers).\n* `Feb, 2023` We have supported using [LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm) (GPT-3) with in-context learning (based on [EasyInstruct](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FEasyInstruct)) & data generation, added a NER model [W2NER(AAAI'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fstandard\u002Fw2ner).\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Previous News\u003C\u002Fb>\u003C\u002Fsummary>\n\n* `Nov, 2022` Add data [annotation instructions](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_TAG.md) for entity recognition and relation extraction, automatic labelling of weakly supervised data ([entity extraction](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fprepare-data) and [relation extraction](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fprepare-data)), and optimize [multi-GPU training](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fstandard).\n  \n* `Sept, 2022` The paper [DeepKE: A Deep Learning Based Knowledge Extraction Toolkit for Knowledge Base Population](https:\u002F\u002Farxiv.org\u002Fabs\u002F2201.03335) has been accepted by the EMNLP 2022 System Demonstration Track.\n\n* `Aug, 2022` We have added [data augmentation](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Ffew-shot\u002FDA) (Chinese, English) support for [low-resource relation extraction](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Ffew-shot).\n\n* `June, 2022` We have added multimodal support for [entity](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fmultimodal) and [relation extraction](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fmultimodal).\n\n* `May, 2022` We have released [DeepKE-cnschema](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_CNSCHEMA.md) with off-the-shelf knowledge extraction models.\n\n* `Jan, 2022` We have released a paper [DeepKE: A Deep Learning Based Knowledge Extraction Toolkit for Knowledge Base Population](https:\u002F\u002Farxiv.org\u002Fabs\u002F2201.03335)\n\n* `Dec, 2021` We have added `dockerfile` to create the enviroment automatically. \n\n* `Nov, 2021` The demo of DeepKE, supporting real-time extration without deploying and training, has been released.\n* The documentation of DeepKE, containing the details of DeepKE such as source codes and datasets, has been released.\n\n* `Oct, 2021` `pip install deepke`\n* The codes of deepke-v2.0 have been released.\n\n* `Aug, 2019` The codes of deepke-v1.0 have been released.\n\n* `Aug, 2018` The project DeepKE startup and codes of deepke-v0.1 have been released.\n  \n\n\u003C\u002Fdetails>\n\n# Prediction Demo\n\nThere is a demonstration of prediction. The GIF file is created by [Terminalizer](https:\u002F\u002Fgithub.com\u002Ffaressoft\u002Fterminalizer). Get the [code](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1r4tWfAkpvynH3CBSgd-XG79rf-pB-KR3\u002Fview?usp=share_link).\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzjunlp_DeepKE_readme_dfe2b94226ee.gif\" width=\"636\" height=\"494\" align=center>\n\n\u003Cbr>\n\n# Model Framework\n\n\u003Ch3 align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzjunlp_DeepKE_readme_170db50fce99.png\">\n\u003C\u002Fh3>\n\n\n- DeepKE contains a unified framework for **named entity recognition**, **relation extraction** and **attribute extraction**, the three  knowledge extraction functions.\n- Each task can be implemented in different scenarios. For example, we can achieve relation extraction in **standard**, **low-resource (few-shot)**, **document-level** and **multimodal** settings.\n- Each application scenario comprises of three components: **Data** including Tokenizer, Preprocessor and Loader, **Model** including Module, Encoder and Forwarder, **Core** including Training, Evaluation and Prediction. \n\n\u003Cbr>\n\n# Quick Start\n\n## DeepKE-LLM\n\nIn the era of large models, DeepKE-LLM utilizes a completely new environment dependency.\n\n```\nconda create -n deepke-llm python=3.9\nconda activate deepke-llm\n\ncd example\u002Fllm\npip install -r requirements.txt\n```\n\nPlease note that the `requirements.txt` file is located in the `example\u002Fllm` folder.\n\n## DeepKE-MCP-Tools\n\nWe integrate the MCP (Model Calling Protocol) service tools into DeepKE, enabling knowledge extraction through large language models (LLMs) as tool callers for lightweight models.\n\n- The MCP service has been deployed and is accessible at [URL](https:\u002F\u002Fmodelscope.cn\u002Fmcp\u002Fservers\u002FOpenKG\u002Fdeepke-mcp-tools).\n- For local deployment, refer to the [README](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fmcp-tools\u002FREADME.md) for detailed operational procedures.\n\n## DeepKE\n- *DeepKE* supports `pip install deepke`. \u003Cbr>Take the fully supervised relation extraction for example.\n- *DeepKE* supports both **manual** and **docker image** environment configuration, you can choose the appropriate way to build.\n- Highly recommended to install deepke in a Linux environment.\n#### 🔧Manual Environment Configuration\n\n**Step1** Download the basic code\n\n```bash\ngit clone --depth 1 https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE.git\n```\n\n**Step2** Create a virtual environment using `Anaconda` and enter it.\u003Cbr>\n\n```bash\nconda create -n deepke python=3.8\n\nconda activate deepke\n```\n\n1. Install *DeepKE* with source code\n\n   ```bash\n   pip install -r requirements.txt\n   \n   python setup.py install\n   \n   python setup.py develop\n   ```\n\n2. Install *DeepKE* with `pip` (**NOT recommended!**)\n\n   ```bash\n   pip install deepke\n   ```\n   - Please make sure that pip version \u003C= 24.0\n\n**Step3** Enter the task directory\n\n```bash\ncd DeepKE\u002Fexample\u002Fre\u002Fstandard\n```\n\n**Step4** Download the dataset, or follow the [annotation instructions](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_TAG.md) to obtain data\n\n```bash\nwget 121.41.117.246:8080\u002FData\u002Fre\u002Fstandard\u002Fdata.tar.gz\n\ntar -xzvf data.tar.gz\n```\n\nMany types of data formats are supported,and details are in each part. \n\n**Step5** Training (Parameters for training can be changed in the `conf` folder)\n\nWe support visual parameter tuning by using *[wandb](https:\u002F\u002Fdocs.wandb.ai\u002Fquickstart)*.\n\n```bash\npython run.py\n```\n\n**Step6** Prediction (Parameters for prediction can be changed in the `conf` folder)\n\nModify the path of the trained model in `predict.yaml`.The absolute path of the model needs to be used，such as `xxx\u002Fcheckpoints\u002F2019-12-03_ 17-35-30\u002Fcnn_ epoch21.pth`.\n\n```bash\npython predict.py\n```\n\n - **❗NOTE: if you encounter any errors, please refer to the [Tips](#tips) or submit a GitHub issue.**\n\n\n\n#### 🐳Building With Docker Images\n**Step1** Install the Docker client\n\nInstall Docker and start the Docker service.\n\n**Step2** Pull the docker image and run the container\n\n```bash\ndocker pull zjunlp\u002Fdeepke:latest\ndocker run -it zjunlp\u002Fdeepke:latest \u002Fbin\u002Fbash\n```\n\nThe remaining steps are the same as **Step 3 and onwards** in **Manual Environment Configuration**.\n\n - **❗NOTE: You can refer to the [Tips](#tips) to speed up installation**\n\n## Requirements\n\n\n### DeepKE\n> python == 3.8\n\n- torch>=1.5,\u003C=1.11\n- hydra-core==1.0.6\n- tensorboard==2.4.1\n- matplotlib==3.4.1\n- transformers==4.26.0\n- jieba==0.42.1\n- scikit-learn==0.24.1\n- seqeval==1.2.2\n- opt-einsum==3.3.0\n- wandb==0.12.7\n- ujson==5.6.0\n- huggingface_hub==0.11.0\n- tensorboardX==2.5.1\n- nltk==3.8\n- protobuf==3.20.1\n- numpy==1.21.0\n- ipdb==0.13.11\n- pytorch-crf==0.7.2\n- tqdm==4.66.1\n- openai==0.28.0\n- Jinja2==3.1.2\n- datasets==2.13.2\n- pyhocon==0.3.60\n\n\u003Cbr>\n\n## Introduction of Three Functions\n\n### 1. Named Entity Recognition\n\n- 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.\n\n- The data is stored in `.txt` files. Some instances as following (Users can label data based on the tools [Doccano](https:\u002F\u002Fgithub.com\u002Fdoccano\u002Fdoccano), [MarkTool](https:\u002F\u002Fgithub.com\u002FFXLP\u002FMarkTool), or they can use the [Weak Supervision](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fner\u002Fprepare-data) with DeepKE to obtain data automatically):\n\n  |                           Sentence                           |           Person           |    Location    |          Organization          |\n  | :----------------------------------------------------------: | :------------------------: | :------------: | :----------------------------: |\n  | 本报北京9月4日讯记者杨涌报道：部分省区人民日报宣传发行工作座谈会9月3日在4日在京举行。 |            杨涌            |      北京      |            人民日报            |\n  | 《红楼梦》由王扶林导演，周汝昌、王蒙、周岭等多位专家参与制作。 | 王扶林，周汝昌，王蒙，周岭 |            |  |\n  | 秦始皇兵马俑位于陕西省西安市,是世界八大奇迹之一。 |           秦始皇           | 陕西省，西安市 |                          |\n\n- Read the detailed process in specific README\n  - **[STANDARD (Fully Supervised)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fstandard)**\n    \n    ***We [support LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm) and provide the off-the-shelf model, [DeepKE-cnSchema-NER](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_CNSCHEMA_CN.md), which will extract entities in cnSchema without training.***\n\n    **Step1** Enter  `DeepKE\u002Fexample\u002Fner\u002Fstandard`.  Download the dataset.\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fner\u002Fstandard\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    **Step2** Training\u003Cbr>\n\n    The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.\n  \n    ```bash\n    python run.py\n    ```\n\n    **Step3** Prediction\n\n    ```bash\n    python predict.py\n    ```\n  \n  - **[FEW-SHOT](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Ffew-shot)**\n\n    **Step1** Enter  `DeepKE\u002Fexample\u002Fner\u002Ffew-shot`.  Download the dataset.\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fner\u002Ffew_shot\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n  \n    **Step2** Training in the low-resouce setting \u003Cbr>\n  \n    The directory where the model is loaded and saved and the configuration parameters can be cusomized in the `conf` folder.\n  \n    ```bash\n    python run.py +train=few_shot\n    ```\n    \n    Users can modify `load_path` in `conf\u002Ftrain\u002Ffew_shot.yaml` to use existing loaded model.\u003Cbr>\n    \n    **Step3** Add `- predict` to `conf\u002Fconfig.yaml`, modify `loda_path` as the model path and `write_path` as the path where the predicted results are saved in `conf\u002Fpredict.yaml`, and then run `python predict.py`\n    \n    ```bash\n    python predict.py\n    ```\n\n  - **[MULTIMODAL](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fmultimodal)**\n\n    **Step1** Enter  `DeepKE\u002Fexample\u002Fner\u002Fmultimodal`.  Download the dataset.\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fner\u002Fmultimodal\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    We use RCNN detected objects and visual grounding objects from original images as visual local information, where RCNN via [faster_rcnn](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fvision\u002Fblob\u002Fmain\u002Ftorchvision\u002Fmodels\u002Fdetection\u002Ffaster_rcnn.py) and visual grounding via [onestage_grounding](https:\u002F\u002Fgithub.com\u002Fzyang-ur\u002Fonestage_grounding).\n\n    **Step2** Training in the multimodal setting \u003Cbr>\n\n    - The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.\n    - Start with the model trained last time: modify `load_path` in `conf\u002Ftrain.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`.\n\n    ```bash\n    python run.py\n    ```\n\n    **Step3** Prediction\n\n    ```bash\n    python predict.py\n    ```\n\n### 2. Relation Extraction\n\n- Relationship extraction is the task of extracting semantic relations between entities from a unstructured text.\n\n- The data is stored in `.csv` files. Some instances as following (Users can label data based on the tools [Doccano](https:\u002F\u002Fgithub.com\u002Fdoccano\u002Fdoccano), [MarkTool](https:\u002F\u002Fgithub.com\u002FFXLP\u002FMarkTool), or they can use the [Weak Supervision](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fre\u002Fprepare-data) with DeepKE to obtain data automatically):\n\n  |                        Sentence                        | Relation |    Head    | Head_offset |    Tail    | Tail_offset |\n  | :----------------------------------------------------: | :------: | :--------: | :---------: | :--------: | :---------: |\n  | 《岳父也是爹》是王军执导的电视剧，由马恩然、范明主演。 |   导演   | 岳父也是爹 |      1      |    王军    |      8      |\n  |  《九玄珠》是在纵横中文网连载的一部小说，作者是龙马。  | 连载网站 |   九玄珠   |      1      | 纵横中文网 |      7      |\n  |     提起杭州的美景，西湖总是第一个映入脑海的词语。     | 所在城市 |    西湖    |      8      |    杭州    |      2      |\n\n- **!NOTE: If there are multiple entity types for one relation, entity types can be prefixed with the relation as inputs.**\n- Read the detailed process in specific README\n\n  - **[STANDARD (Fully Supervised)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fstandard)** \n\n    ***We [support LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm) and provide the off-the-shelf model, [DeepKE-cnSchema-RE](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_CNSCHEMA_CN.md), which will extract relations in cnSchema without training.***\n\n    **Step1** Enter the `DeepKE\u002Fexample\u002Fre\u002Fstandard` folder.  Download the dataset.\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fre\u002Fstandard\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    **Step2** Training\u003Cbr>\n\n    The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.\n  \n    ```bash\n    python run.py\n    ```\n\n    **Step3** Prediction\n\n    ```bash\n    python predict.py\n    ```\n  \n  - **[FEW-SHOT](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Ffew-shot)**\n\n    **Step1** Enter `DeepKE\u002Fexample\u002Fre\u002Ffew-shot`. Download the dataset.\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fre\u002Ffew_shot\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    **Step 2** Training\u003Cbr>\n\n    - The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.\n    - Start with the model trained last time: modify `train_from_saved_model` in `conf\u002Ftrain.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`. \n  \n    ```bash\n    python run.py\n    ```\n  \n    **Step3** Prediction\n  \n    ```bash\n    python predict.py\n    ```\n  \n  - **[DOCUMENT](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fdocument)**\u003Cbr>\n  \n    **Step1** Enter `DeepKE\u002Fexample\u002Fre\u002Fdocument`.  Download the dataset.\n  \n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fre\u002Fdocument\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n    \n    **Step2** Training\u003Cbr>\n  \n    - The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.\n    - Start with the model trained last time: modify `train_from_saved_model` in `conf\u002Ftrain.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`. \n    \n    ```bash\n    python run.py\n    ```\n    \n    **Step3** Prediction\n    \n    ```bash\n    python predict.py\n    ```\n\n  - **[MULTIMODAL](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fmultimodal)**\n\n    **Step1** Enter  `DeepKE\u002Fexample\u002Fre\u002Fmultimodal`.  Download the dataset.\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fre\u002Fmultimodal\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    We use RCNN detected objects and visual grounding objects from original images as visual local information, where RCNN via [faster_rcnn](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fvision\u002Fblob\u002Fmain\u002Ftorchvision\u002Fmodels\u002Fdetection\u002Ffaster_rcnn.py) and visual grounding via [onestage_grounding](https:\u002F\u002Fgithub.com\u002Fzyang-ur\u002Fonestage_grounding).\n\n    **Step2** Training\u003Cbr>\n\n    - The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.\n    - Start with the model trained last time: modify `load_path` in `conf\u002Ftrain.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`.\n\n    ```bash\n    python run.py\n    ```\n\n    **Step3** Prediction\n\n    ```bash\n    python predict.py\n    ```\n\n### 3. Attribute Extraction\n\n- Attribute extraction is to extract attributes for entities in a unstructed text.\n\n- The data is stored in `.csv` files. Some instances as following:\n\n  |                           Sentence                           |   Att    |   Ent    | Ent_offset |      Val      | Val_offset |\n  | :----------------------------------------------------------: | :------: | :------: | :--------: | :-----------: | :--------: |\n  |          张冬梅，女，汉族，1968年2月生，河南淇县人           |   民族   |  张冬梅  |     0      |     汉族      |     6      |\n  |诸葛亮，字孔明，三国时期杰出的军事家、文学家、发明家。|   朝代   |   诸葛亮   |     0      |     三国时期      |     8     |\n  |        2014年10月1日许鞍华执导的电影《黄金时代》上映         | 上映时间 | 黄金时代 |     19     | 2014年10月1日 |     0      |\n\n- Read the detailed process in specific README\n  - **[STANDARD (Fully Supervised)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fae\u002Fstandard)**\n\n    **Step1** Enter the `DeepKE\u002Fexample\u002Fae\u002Fstandard` folder. Download the dataset.\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fae\u002Fstandard\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    **Step2** Training\u003Cbr>\n\n    The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.\n    \n    ```bash\n    python run.py\n    ```\n    \n    **Step3** Prediction\n    \n    ```bash\n    python predict.py\n    ```\n\n\u003Cbr>\n\n### 4. Event Extraction\n\n* Event extraction is the task to extract event type, event trigger words, event arguments from a unstructed text.\n* The data is stored in `.tsv` files, some instances are as follows:\n\n\u003Ctable h style=\"text-align:center\">\n    \u003Ctr>\n        \u003Cth colspan=\"2\"> Sentence \u003C\u002Fth>\n        \u003Cth> Event type \u003C\u002Fth>\n        \u003Cth> Trigger \u003C\u002Fth>\n        \u003Cth> Role \u003C\u002Fth>\n        \u003Cth> Argument \u003C\u002Fth>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd rowspan=\"3\" colspan=\"2\"> 据《欧洲时报》报道，当地时间27日，法国巴黎卢浮宫博物馆员工因不满工作条件恶化而罢工，导致该博物馆也因此闭门谢客一天。 \u003C\u002Ftd>\n      \t\u003Ctd rowspan=\"3\"> 组织行为-罢工 \u003C\u002Ftd>\n    \t\t\u003Ctd rowspan=\"3\"> 罢工 \u003C\u002Ftd>\n    \t\t\u003Ctd> 罢工人员 \u003C\u002Ftd>\n    \t\t\u003Ctd> 法国巴黎卢浮宫博物馆员工 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 时间 \u003C\u002Ftd>\n        \u003Ctd> 当地时间27日 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 所属组织 \u003C\u002Ftd>\n        \u003Ctd> 法国巴黎卢浮宫博物馆 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd rowspan=\"3\" colspan=\"2\"> 中国外运2019年上半年归母净利润增长17%：收购了少数股东股权 \u003C\u002Ftd>\n      \t\u003Ctd rowspan=\"3\"> 财经\u002F交易-出售\u002F收购 \u003C\u002Ftd>\n    \t\t\u003Ctd rowspan=\"3\"> 收购 \u003C\u002Ftd>\n    \t\t\u003Ctd> 出售方 \u003C\u002Ftd>\n    \t\t\u003Ctd> 少数股东 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 收购方 \u003C\u002Ftd>\n        \u003Ctd> 中国外运 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 交易物 \u003C\u002Ftd>\n        \u003Ctd> 股权 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd rowspan=\"3\" colspan=\"2\"> 美国亚特兰大航展13日发生一起表演机坠机事故，飞行员弹射出舱并安全着陆，事故没有造成人员伤亡。 \u003C\u002Ftd>\n      \t\u003Ctd rowspan=\"3\"> 灾害\u002F意外-坠机 \u003C\u002Ftd>\n    \t\t\u003Ctd rowspan=\"3\"> 坠机 \u003C\u002Ftd>\n    \t\t\u003Ctd> 时间 \u003C\u002Ftd>\n    \t\t\u003Ctd> 13日 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 地点 \u003C\u002Ftd>\n        \u003Ctd> 美国亚特兰 \u003C\u002Ftd>\n  \t\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n* Read the detailed process in specific README\n\n  * [STANDARD(Fully Supervised)](.\u002Fexample\u002Fee\u002Fstandard\u002FREADME.md)\n\n    **Step1** Enter the `DeepKE\u002Fexample\u002Fee\u002Fstandard` folder. Download the dataset.\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fee\u002FDuEE.zip\n    unzip DuEE.zip\n    ```\n\n    **Step 2** Training\n\n    The dataset and parameters can be customized in the `data` folder and `conf` folder respectively.\n\n    ```bash\n    python run.py\n    ```\n\n    **Step 3** Prediction\n\n    ```bash\n    python predict.py\n    ```\n\n\u003Cbr>\n\n# Tips\n\n1.```Using nearest mirror```, **[THU](https:\u002F\u002Fmirrors.tuna.tsinghua.edu.cn\u002Fhelp\u002Fanaconda\u002F) in China, will speed up the installation of *Anaconda*; [aliyun](http:\u002F\u002Fmirrors.aliyun.com\u002Fpypi\u002Fsimple\u002F) in China, will speed up `pip install XXX`**.\n\n2.When encountering `ModuleNotFoundError: No module named 'past'`，run `pip install future` .\n\n3.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.\n\n4.The old version of *DeepKE* is in the [deepke-v1.0](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fdeepke-v1.0) branch. Users can change the branch to use the old version. The old version has been totally transfered to the standard relation extraction ([example\u002Fre\u002Fstandard](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fre\u002Fstandard\u002FREADME.md)).\n\n5.If you want to modify the source code, it's recommended to install *DeepKE* with source codes. If not, the modification will not work. See [issue](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F117)\n\n6.More related low-resource knowledge extraction  works can be found in [Knowledge Extraction in Low-Resource Scenarios: Survey and Perspective](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2202.08063.pdf).\n\n7.Make sure the exact versions of requirements in `requirements.txt`.\n\n# To do\nIn next version, we plan to release a stronger LLM for KE. \n\nMeanwhile, we will offer long-term maintenance to **fix bugs**, **solve issues** and meet **new requests**. So if you have any problems, please put issues to us.\n\n# Reading Materials\n\nData-Efficient Knowledge Graph Construction, 高效知识图谱构建 ([Tutorial on CCKS 2022](http:\u002F\u002Fsigkg.cn\u002Fccks2022\u002F?page_id=24)) \\[[slides](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1xqeREw3dSiw-Y1rxLDx77r0hGUvHnuuE)\\] \n\nEfficient and Robust Knowledge Graph Construction ([Tutorial on AACL-IJCNLP 2022](https:\u002F\u002Fwww.aacl2022.org\u002FProgram\u002Ftutorials)) \\[[slides](https:\u002F\u002Fgithub.com\u002FNLP-Tutorials\u002FAACL-IJCNLP2022-KGC-Tutorial)\\] \n\nPromptKG Family: a Gallery of Prompt Learning & KG-related Research Works, Toolkits, and Paper-list [[Resources](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FPromptKG)\\] \n\nKnowledge Extraction in Low-Resource Scenarios: Survey and Perspective \\[[Survey](https:\u002F\u002Farxiv.org\u002Fabs\u002F2202.08063)\\]\\[[Paper-list](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FLow-resource-KEPapers)\\]\n\n\n# Related Toolkit\n\n[Doccano](https:\u002F\u002Fgithub.com\u002Fdoccano\u002Fdoccano)、[MarkTool](https:\u002F\u002Fgithub.com\u002FFXLP\u002FMarkTool)、[LabelStudio](https:\u002F\u002Flabelstud.io\u002F ): Data Annotation Toolkits\n\n[LambdaKG](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FPromptKG\u002Ftree\u002Fmain\u002FlambdaKG): A library and benchmark for PLM-based KG embeddings\n\n[EasyInstruct](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FEasyInstruct): An easy-to-use framework to instruct Large Language Models\n\n**Reading Materials**:\n\nData-Efficient Knowledge Graph Construction, 高效知识图谱构建 ([Tutorial on CCKS 2022](http:\u002F\u002Fsigkg.cn\u002Fccks2022\u002F?page_id=24)) \\[[slides](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1xqeREw3dSiw-Y1rxLDx77r0hGUvHnuuE)\\] \n\nEfficient and Robust Knowledge Graph Construction ([Tutorial on AACL-IJCNLP 2022](https:\u002F\u002Fwww.aacl2022.org\u002FProgram\u002Ftutorials)) \\[[slides](https:\u002F\u002Fgithub.com\u002FNLP-Tutorials\u002FAACL-IJCNLP2022-KGC-Tutorial)\\] \n\nPromptKG Family: a Gallery of Prompt Learning & KG-related Research Works, Toolkits, and Paper-list [[Resources](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FPromptKG)\\] \n\nKnowledge Extraction in Low-Resource Scenarios: Survey and Perspective \\[[Survey](https:\u002F\u002Farxiv.org\u002Fabs\u002F2202.08063)\\]\\[[Paper-list](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FLow-resource-KEPapers)\\]\n\n\n**Related Toolkit**:\n\n[Doccano](https:\u002F\u002Fgithub.com\u002Fdoccano\u002Fdoccano)、[MarkTool](https:\u002F\u002Fgithub.com\u002FFXLP\u002FMarkTool)、[LabelStudio](https:\u002F\u002Flabelstud.io\u002F ): Data Annotation Toolkits\n\n[LambdaKG](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FPromptKG\u002Ftree\u002Fmain\u002FlambdaKG): A library and benchmark for PLM-based KG embeddings\n\n[EasyInstruct](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FEasyInstruct): An easy-to-use framework to instruct Large Language Models\n\n# Citation\n\nPlease cite our paper if you use DeepKE in your work\n\n```bibtex\n@inproceedings{EMNLP2022_Demo_DeepKE,\n  author    = {Ningyu Zhang and\n               Xin Xu and\n               Liankuan Tao and\n               Haiyang Yu and\n               Hongbin Ye and\n               Shuofei Qiao and\n               Xin Xie and\n               Xiang Chen and\n               Zhoubo Li and\n               Lei Li},\n  editor    = {Wanxiang Che and\n               Ekaterina Shutova},\n  title     = {DeepKE: {A} Deep Learning Based Knowledge Extraction Toolkit for Knowledge Base Population},\n  booktitle = {{EMNLP} (Demos)},\n  pages     = {98--108},\n  publisher = {Association for Computational Linguistics},\n  year      = {2022},\n  url       = {https:\u002F\u002Faclanthology.org\u002F2022.emnlp-demos.10}\n}\n```\n\u003Cbr>\n\n# Contributors\n\n[Ningyu Zhang](https:\u002F\u002Fperson.zju.edu.cn\u002Fen\u002Fningyu), [Haofen Wang](https:\u002F\u002Ftjdi.tongji.edu.cn\u002FTeacherDetail.do?id=4991&lang=_en), Fei Huang, Feiyu Xiong, Liankuan Tao, Xin Xu, Honghao Gui,  Zhenru Zhang, Chuanqi Tan, Qiang Chen, Xiaohan Wang, Zekun Xi, Xinrong Li, Haiyang Yu, Hongbin Ye, Shuofei Qiao, Peng Wang, Yuqi Zhu, Xin Xie, Xiang Chen, Zhoubo Li, Lei Li, Xiaozhuan Liang, Yunzhi Yao, Jing Chen, Yuqi Zhu, Yujie Luo, Shumin Deng, Wen Zhang, Guozhou Zheng, Huajun Chen\n\nCommunity Contributors: Shuo Shen, Zhoutian Shao, Wei Hu, [thredreams](https:\u002F\u002Fgithub.com\u002Fthredreams), [eltociear](https:\u002F\u002Fgithub.com\u002Feltociear), Ziwen Xu, Rui Huang, Xiaolong Weng\n\n# Other Knowledge Extraction Open-Source Projects\n\n- [CogIE](https:\u002F\u002Fgithub.com\u002Fjinzhuoran\u002FCogIE)\n- [OpenNRE](https:\u002F\u002Fgithub.com\u002Fthunlp\u002FOpenNRE)\n- [OmniEvent](https:\u002F\u002Fgithub.com\u002FTHU-KEG\u002FOmniEvent)\n- [OpenUE](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FOpenUE)\n- [OpenIE](https:\u002F\u002Fstanfordnlp.github.io\u002FCoreNLP\u002Fopenie.html)\n- [RESIN](https:\u002F\u002Fgithub.com\u002FRESIN-KAIROS\u002FRESIN-pipeline-public)\n- [ZShot](https:\u002F\u002Fgithub.com\u002FIBM\u002Fzshot)\n- [ZS4IE](https:\u002F\u002Fgithub.com\u002FBBN-E\u002FZS4IE)\n- [OmniEvent](https:\u002F\u002Fgithub.com\u002FTHU-KEG\u002FOmniEvent)\n","\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzjunlp\u002Fdeepke\"> \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzjunlp_DeepKE_readme_ca1d073c8992.png\" width=\"400\"\u002F>\u003C\u002Fa>\n\u003Cp>\n\u003Cp align=\"center\">  \n    \u003Ca href=\"http:\u002F\u002Fdeepke.zjukg.cn\">\n        \u003Cimg alt=\"Documentation\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdemo-website-blue\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fdeepke\u002F#files\">\n        \u003Cimg alt=\"PyPI\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdeepke\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmaster\u002FLICENSE\">\n        \u003Cimg alt=\"GitHub\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fzjunlp\u002Fdeepke\">\n    \u003C\u002Fa>\n    \u003Ca href=\"http:\u002F\u002Fzjunlp.github.io\u002FDeepKE\">\n        \u003Cimg alt=\"Documentation\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdoc-website-red\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1vS8YJhJltzw3hpJczPt24O0Azcs3ZpRi?usp=sharing\">\n        \u003Cimg alt=\"Open In Colab\" src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n\n\u003Cp align=\"center\">\n    \u003Cb> 英文 | \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_CN.md\">简体中文\u003C\u002Fa> \u003C\u002Fb>\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">\n    \u003Cp>基于深度学习的知识抽取工具包\u003Cbr>用于知识图谱构建\u003C\u002Fp>\n\u003C\u002Fh1>\n\n\n[DeepKE](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2201.03335.pdf) 是一个用于知识图谱构建的知识抽取工具包，支持 *实体*、*关系* 和 *属性* 抽取的 **cnSchema**、**低资源**、**文档级** 以及 **多模态** 场景。我们为初学者提供了 [文档](https:\u002F\u002Fzjunlp.github.io\u002FDeepKE\u002F)、[在线演示](http:\u002F\u002Fdeepke.zjukg.cn\u002F)、[论文](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2201.03335.pdf)、[幻灯片](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1IIeIZAbVduemqXc4zD40FUMoPHCJinLy\u002Fview?usp=sharing) 和 [海报](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1vd7xVHlWzoAxivN4T5qKrcqIGDcSM1_7\u002Fview?usp=sharing)。\n\n- ❗想用 DeepKE 结合 **大语言模型** 吗？试试 [DeepKE-LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm) 和 [OneKE](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fllm\u002FOneKE.md)，尽情体验吧！\n- ❗想训练监督模型吗？试试 [快速入门](#quick-start)，我们提供了 NER 模型（例如，[LightNER(COLING'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Ffew-shot)、[W2NER(AAAI'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fstandard\u002Fw2ner)），关系抽取模型（例如，[KnowPrompt(WWW'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Ffew-shot)），以及三元组抽取模型（例如，[ASP(EMNLP'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FASP)、[PRGC(ACL'21)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FPRGC)、[PURE(NAACL'21)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FPURE)）。我们还在 [DeepKE-cnSchema](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002Fcnschema) 中发布了现成的模型，欢迎使用！\n- 建议使用 Linux 系统；如果使用 Windows，请在文件路径中使用 `\\\\`；\n- 如果无法访问 HuggingFace，请考虑使用 `wisemodel` 或 `modescape`。\n\n**如果您在安装 DeepKE 和 DeepKE-LLM 时遇到任何问题，请查看 [提示](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE#tips) 或及时提交 [问题](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues)，我们将协助您解决问题！**\n\n\n# 目录\n\n- [目录](#table-of-contents)\n- [最新动态](#whats-new)\n- [预测演示](#prediction-demo)\n- [模型框架](#model-framework)\n- [快速入门](#quick-start)\n  - [DeepKE-LLM](#deepke-llm)\n  - [DeepKE-MCP-Tools](#deepke-mcp-tools)\n  - [DeepKE](#deepke)\n      - [🔧手动环境配置](#manual-environment-configuration)\n      - [🐳使用 Docker 镜像构建](#building-with-docker-images)\n  - [所需条件](#requirements)\n    - [DeepKE](#deepke-1)\n  - [三大功能简介](#introduction-of-three-functions)\n    - [1. 命名实体识别](#1-named-entity-recognition)\n    - [2. 关系抽取](#2-relation-extraction)\n    - [3. 属性抽取](#3-attribute-extraction)\n    - [4. 事件抽取](#4-event-extraction)\n- [提示](#tips)\n- [待办事项](#to-do)\n- [阅读材料](#reading-materials)\n- [相关工具包](#related-toolkit)\n- [引用](#citation)\n- [贡献者](#contributors)\n- [其他知识抽取开源项目](#other-knowledge-extraction-open-source-projects)\n\n\u003Cbr>\n\n# 新闻动态\n* `2025年6月` 我们将[MCP服务工具](https:\u002F\u002Fmodelscope.cn\u002Fmcp\u002Fservers\u002FOpenKG\u002Fdeepke-mcp-tools)集成到DeepKE中，支持通过大型语言模型（LLMs）作为工具调用者，对轻量级模型进行知识抽取。\n* `2024年12月` 我们开源了[OneKE](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FOneKE\u002Ftree\u002Fmain)知识抽取框架，支持跨多种场景的多智能体知识抽取。\n* `2024年4月` 我们发布了一种新的中英双语、基于模式的信息抽取模型[OneKE](https:\u002F\u002Fhuggingface.co\u002Fzjunlp\u002FOneKE)，该模型基于Chinese-Alpaca-2-13B。\n* `2024年2月` 我们发布了一个大规模（0.32B tokens）、高质量的中英双语信息抽取（IE）指令数据集[IEPile](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fzjunlp\u002Fiepie)，并附带两套使用`IEPile`训练的模型：[baichuan2-13b-iepile-lora](https:\u002F\u002Fhuggingface.co\u002Fzjunlp\u002Fbaichuan2-13b-iepile-lora)和[llama2-13b-iepile-lora](https:\u002F\u002Fhuggingface.co\u002Fzjunlp\u002Fllama2-13b-iepile-lora)。\n* `2023年9月` 针对基于指令的知识图谱构建任务（Instruction based KGC），我们发布了名为`InstructIE`的中英双语信息抽取（IE）指令数据集，详情请参见[这里](.\u002Fexample\u002Fllm\u002FREADME.md\u002F#data)。\n* `2023年6月` 我们更新了[DeepKE-LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm)，以支持使用[KnowLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FKnowLM)、[ChatGLM](https:\u002F\u002Fgithub.com\u002FTHUDM\u002FChatGLM-6B)、LLaMA系列、GPT系列等模型进行**知识抽取**。\n* `2023年4月` 我们新增了多个模型，包括[CP-NER(IJCAI'23)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fner\u002Fcross)、[ASP(EMNLP'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FASP)、[PRGC(ACL'21)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FPRGC)、[PURE(NAACL'21)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Ftriple\u002FPURE)，提供了[事件抽取](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fee\u002Fstandard)能力（中文和英文），并兼容更高版本的Python包（如Transformers）。\n* `2023年2月` 我们支持使用[LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm)（GPT-3）结合上下文学习（基于[EasyInstruct](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FEasyInstruct))及数据生成，并新增了NER模型[W2NER(AAAI'22)](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fstandard\u002Fw2ner)。\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>往期新闻\u003C\u002Fb>\u003C\u002Fsummary>\n\n* `2022年11月` 增加了实体识别和关系抽取的数据[标注说明](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_TAG.md)，实现了弱监督数据的自动标注（[实体抽取](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fprepare-data)和[关系抽取](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fprepare-data)），并优化了[多GPU训练](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fstandard)。\n  \n* `2022年9月` 论文[DeepKE: 一种基于深度学习的知识抽取工具包用于知识库填充](https:\u002F\u002Farxiv.org\u002Fabs\u002F2201.03335)已被EMNLP 2022系统演示赛道接受。\n\n* `2022年8月` 我们为[低资源关系抽取](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Ffew-shot)增加了[数据增强](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Ffew-shot\u002FDA)（中文、英文）支持。\n\n* `2022年6月` 我们为[实体](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fmultimodal)和[关系抽取](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fmultimodal)增加了多模态支持。\n\n* `2022年5月` 我们发布了[DeepKE-cnschema](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_CNSCHEMA.md)，其中包含现成的知识抽取模型。\n\n* `2022年1月` 我们发表了一篇论文[DeepKE: 一种基于深度学习的知识抽取工具包用于知识库填充](https:\u002F\u002Farxiv.org\u002Fabs\u002F2201.03335)。\n\n* `2021年12月` 我们添加了`dockerfile`，以便自动创建环境。\n\n* `2021年11月` DeepKE的演示版本发布，支持无需部署和训练即可进行实时抽取。\n* 同时发布了DeepKE的文档，其中包含了源代码和数据集等详细信息。\n\n* `2021年10月` `pip install deepke`\n* DeepKE v2.0的代码已发布。\n\n* `2019年8月` DeepKE v1.0的代码已发布。\n\n* `2018年8月` DeepKE项目启动，并发布了DeepKE v0.1的代码。\n  \n\n\u003C\u002Fdetails>\n\n# 预测演示\n\n这里有一个预测演示。GIF文件由[Terminalizer](https:\u002F\u002Fgithub.com\u002Ffaressoft\u002Fterminalizer)生成。获取[代码](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1r4tWfAkpvynH3CBSgd-XG79rf-pB-KR3\u002Fview?usp=share_link)。\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzjunlp_DeepKE_readme_dfe2b94226ee.gif\" width=\"636\" height=\"494\" align=center>\n\n\u003Cbr>\n\n# 模型框架\n\n\u003Ch3 align=\"center\">\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzjunlp_DeepKE_readme_170db50fce99.png\">\n\u003C\u002Fh3>\n\n\n- DeepKE包含一个统一的框架，用于**命名实体识别**、**关系抽取**和**属性抽取**这三项知识抽取任务。\n- 每项任务都可以在不同的场景下实现。例如，我们可以实现**标准**、**低资源（少样本）**、**文档级**和**多模态**的关系抽取。\n- 每个应用场景都由三个部分组成：**数据**，包括分词器、预处理模块和加载器；**模型**，包括模块、编码器和前向传播组件；**核心**，包括训练、评估和预测功能。\n\n\u003Cbr>\n\n# 快速入门\n\n## DeepKE-LLM\n\n在大模型时代，DeepKE-LLM采用了全新的环境依赖。\n\n```\nconda create -n deepke-llm python=3.9\nconda activate deepke-llm\n\ncd example\u002Fllm\npip install -r requirements.txt\n```\n\n请注意，`requirements.txt`文件位于`example\u002Fllm`文件夹内。\n\n## DeepKE-MCP-Tools\n\n我们把MCP（模型调用协议）服务工具集成到DeepKE中，使大型语言模型（LLMs）能够作为工具调用者，对轻量级模型进行知识抽取。\n\n- MCP服务已经部署完毕，可通过[URL](https:\u002F\u002Fmodelscope.cn\u002Fmcp\u002Fservers\u002FOpenKG\u002Fdeepke-mcp-tools)访问。\n- 如需本地部署，请参考[README](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fmcp-tools\u002FREADME.md)，了解详细的操作步骤。\n\n## DeepKE\n- *DeepKE* 支持使用 `pip install deepke` 进行安装。\u003Cbr>以完全监督的关系抽取为例。\n- *DeepKE* 同时支持**手动**和**Docker 镜像**两种环境配置方式，您可以选择适合的方式进行搭建。\n- 强烈建议在 Linux 环境中安装 DeepKE。\n#### 🔧手动环境配置\n\n**步骤1** 下载基础代码\n\n```bash\ngit clone --depth 1 https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE.git\n```\n\n**步骤2** 使用 `Anaconda` 创建虚拟环境并进入该环境。\u003Cbr>\n\n```bash\nconda create -n deepke python=3.8\n\nconda activate deepke\n```\n\n1. 使用源码安装 *DeepKE*\n\n   ```bash\n   pip install -r requirements.txt\n   \n   python setup.py install\n   \n   python setup.py develop\n   ```\n\n2. 使用 `pip` 安装 *DeepKE*（**不推荐！**）\n\n   ```bash\n   pip install deepke\n   ```\n   - 请确保 pip 版本 ≤ 24.0\n\n**步骤3** 进入任务目录\n\n```bash\ncd DeepKE\u002Fexample\u002Fre\u002Fstandard\n```\n\n**步骤4** 下载数据集，或按照[标注说明](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_TAG.md)获取数据\n\n```bash\nwget 121.41.117.246:8080\u002FData\u002Fre\u002Fstandard\u002Fdata.tar.gz\n\ntar -xzvf data.tar.gz\n```\n\n支持多种数据格式，具体细节请参见各部分说明。\n\n**步骤5** 训练（训练参数可在 `conf` 文件夹中修改）\n\n我们支持通过 *[wandb](https:\u002F\u002Fdocs.wandb.ai\u002Fquickstart)* 进行可视化调参。\n\n```bash\npython run.py\n```\n\n**步骤6** 预测（预测参数可在 `conf` 文件夹中修改）\n\n在 `predict.yaml` 中修改已训练模型的路径。需使用模型的绝对路径，例如 `xxx\u002Fcheckpoints\u002F2019-12-03_ 17-35-30\u002Fcnn_ epoch21.pth`。\n\n```bash\npython predict.py\n```\n\n - **❗注意：如果遇到任何问题，请参考[提示](#tips)或提交 GitHub 问题。**\n\n\n\n#### 🐳使用 Docker 镜像构建\n**步骤1** 安装 Docker 客户端\n\n安装 Docker 并启动 Docker 服务。\n\n**步骤2** 拉取 Docker 镜像并运行容器\n\n```bash\ndocker pull zjunlp\u002Fdeepke:latest\ndocker run -it zjunlp\u002Fdeepke:latest \u002Fbin\u002Fbash\n```\n\n剩余步骤与**手动环境配置**中的**步骤3及以后**相同。\n\n - **❗注意：您可以参考[提示](#tips)以加快安装速度**\n\n## 要求\n\n\n### DeepKE\n> python == 3.8\n\n- torch>=1.5,\u003C=1.11\n- hydra-core==1.0.6\n- tensorboard==2.4.1\n- matplotlib==3.4.1\n- transformers==4.26.0\n- jieba==0.42.1\n- scikit-learn==0.24.1\n- seqeval==1.2.2\n- opt-einsum==3.3.0\n- wandb==0.12.7\n- ujson==5.6.0\n- huggingface_hub==0.11.0\n- tensorboardX==2.5.1\n- nltk==3.8\n- protobuf==3.20.1\n- numpy==1.21.0\n- ipdb==0.13.11\n- pytorch-crf==0.7.2\n- tqdm==4.66.1\n- openai==0.28.0\n- Jinja2==3.1.2\n- datasets==2.13.2\n- pyhocon==0.3.60\n\n\u003Cbr>\n\n## 三大功能介绍\n\n### 1. 命名实体识别\n\n- 命名实体识别旨在从非结构化文本中识别并分类出预定义类别的命名实体，如人名、组织机构、地点等。\n- 数据存储在 `.txt` 文件中。以下是一些示例（用户可以使用 [Doccano](https:\u002F\u002Fgithub.com\u002Fdoccano\u002Fdoccano)、[MarkTool](https:\u002F\u002Fgithub.com\u002FFXLP\u002FMarkTool) 等工具进行标注，也可以利用 DeepKE 的[弱监督方法](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fner\u002Fprepare-data)自动获取数据）：\n\n  |                           句子                           |           人名           |    地点    |          组织机构          |\n  | :----------------------------------------------------------: | :------------------------: | :------------: | :----------------------------: |\n  | 本报北京9月4日讯记者杨涌报道：部分省区人民日报宣传发行工作座谈会9月3日在4日在京举行。 |            杨涌            |      北京      |            人民日报            |\n  | 《红楼梦》由王扶林导演，周汝昌、王蒙、周岭等多位专家参与制作。 | 王扶林，周汝昌，王蒙，周岭 |            |  |\n  | 秦始皇兵马俑位于陕西省西安市,是世界八大奇迹之一。 |           秦始皇           | 陕西省，西安市 |                          |\n\n- 详细流程请参阅具体的 README：\n  - **[STANDARD（完全监督）](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fstandard)**\n    \n    ***我们[支持 LLM](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fllm)，并提供了现成的模型[DeepKE-cnSchema-NER](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_CNSCHEMA_CN.md)，无需训练即可提取 cnSchema 中的实体。***\n\n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fner\u002Fstandard` 目录，下载数据集。\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fner\u002Fstandard\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    **步骤2** 训练\u003Cbr>\n\n    数据集和参数可分别在 `data` 文件夹和 `conf` 文件夹中自定义。\n  \n    ```bash\n    python run.py\n    ```\n\n    **步骤3** 预测\n\n    ```bash\n    python predict.py\n    ```\n  \n  - **[FEW-SHOT（少样本学习）](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Ffew-shot)**\n\n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fner\u002Ffew-shot` 目录，下载数据集。\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fner\u002Ffew_shot\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n  \n    **步骤2** 在低资源条件下进行训练 \u003Cbr>\n  \n    模型加载和保存的目录以及配置参数均可在 `conf` 文件夹中自定义。\n  \n    ```bash\n    python run.py +train=few_shot\n    ```\n    \n    用户可以在 `conf\u002Ftrain\u002Ffew_shot.yaml` 中修改 `load_path` 以使用已加载的模型。\u003Cbr>\n    \n    **步骤3** 在 `conf\u002Fconfig.yaml` 中添加 `- predict`，并在 `conf\u002Fpredict.yaml` 中将 `loda_path` 修改为模型路径，`write_path` 修改为预测结果保存路径，然后运行 `python predict.py`\n    \n    ```bash\n    python predict.py\n    ```\n\n  - **[MULTIMODAL（多模态）](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fmultimodal)**\n\n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fner\u002Fmultimodal` 目录，下载数据集。\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fner\u002Fmultimodal\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    我们使用 RCNN 检测到的物体以及原始图像中的视觉定位对象作为视觉局部信息，其中 RCNN 通过 [faster_rcnn](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fvision\u002Fblob\u002Fmain\u002Ftorchvision\u002Fmodels\u002Fdetection\u002Ffaster_rcnn.py) 实现，视觉定位则通过 [onestage_grounding](https:\u002F\u002Fgithub.com\u002Fzyang-ur\u002Fonestage_grounding) 完成。\n  \n    **步骤2** 在多模态设置下进行训练 \u003Cbr>\n\n    - 数据集和参数可分别在 `data` 文件夹和 `conf` 文件夹中自定义。\n    - 从上次训练的模型开始：将 `conf\u002Ftrain.yaml` 中的 `load_path` 修改为上次保存的模型路径。同时，训练日志的保存路径可通过 `log_dir` 自定义。\n\n    ```bash\n    python run.py\n    ```\n\n    **步骤3** 预测\n\n    ```bash\n    python predict.py\n    ```\n\n### 2. 关系抽取\n\n- 关系抽取是从非结构化文本中提取实体间语义关系的任务。\n\n- 数据存储在 `.csv` 文件中。部分示例如下（用户可以使用 [Doccano](https:\u002F\u002Fgithub.com\u002Fdoccano\u002Fdoccano)、[MarkTool](https:\u002F\u002Fgithub.com\u002FFXLP\u002FMarkTool) 等工具对数据进行标注，也可以借助 DeepKE 的 [弱监督方法](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fre\u002Fprepare-data) 自动获取数据）：\n\n  |                        句子                        | 关系   |    头实体    | 头实体偏移量 |    尾实体    | 尾实体偏移量 |\n  | :----------------------------------------------------: | :------: | :--------: | :---------: | :--------: | :---------: |\n  | 《岳父也是爹》是王军执导的电视剧，由马恩然、范明主演。 | 导演   | 岳父也是爹 |      1      |    王军    |      8      |\n  |  《九玄珠》是在纵横中文网连载的一部小说，作者是龙马。  | 连载网站 |   九玄珠   |      1      | 纵横中文网 |      7      |\n  |     提起杭州的美景，西湖总是第一个映入脑海的词语。     | 所在城市 |    西湖    |      8      |    杭州    |      2      |\n\n- **!注意：如果一个关系涉及多种实体类型，可以在输入时将实体类型与关系名称前缀组合。**\n- 详细流程请参阅相应的 README 文件。\n\n  - **[标准模式（全监督）](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fstandard)** \n\n    ***我们支持大模型，并提供了现成的模型 [DeepKE-cnSchema-RE](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_CNSCHEMA_CN.md)，无需训练即可在 cnSchema 上抽取关系。***\n\n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fre\u002Fstandard` 文件夹，下载数据集。\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fre\u002Fstandard\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    **步骤2** 训练\u003Cbr>\n\n    数据集和参数可分别在 `data` 文件夹和 `conf` 文件夹中进行自定义。\n  \n    ```bash\n    python run.py\n    ```\n\n    **步骤3** 预测\n\n    ```bash\n    python predict.py\n    ```\n  \n  - **[少样本学习](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Ffew-shot)**\n\n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fre\u002Ffew-shot`，下载数据集。\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fre\u002Ffew_shot\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    **步骤2** 训练\u003Cbr>\n\n    - 数据集和参数可分别在 `data` 文件夹和 `conf` 文件夹中进行自定义。\n    - 如果上次训练过模型，可在 `conf\u002Ftrain.yaml` 中将 `train_from_saved_model` 修改为上次保存的模型路径；同时可通过 `log_dir` 自定义训练日志的保存路径。\n  \n    ```bash\n    python run.py\n    ```\n  \n    **步骤3** 预测\n  \n    ```bash\n    python predict.py\n    ```\n  \n  - **[文档级关系抽取](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fdocument)**\u003Cbr>\n  \n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fre\u002Fdocument`，下载数据集。\n  \n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fre\u002Fdocument\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n    \n    **步骤2** 训练\u003Cbr>\n  \n    - 数据集和参数可分别在 `data` 文件夹和 `conf` 文件夹中进行自定义。\n    - 如果上次训练过模型，可在 `conf\u002Ftrain.yaml` 中将 `train_from_saved_model` 修改为上次保存的模型路径；同时可通过 `log_dir` 自定义训练日志的保存路径。\n    \n    ```bash\n    python run.py\n    ```\n    \n    **步骤3** 预测\n    \n    ```bash\n    python predict.py\n    ```\n\n  - **[多模态关系抽取](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fmultimodal)**\n\n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fre\u002Fmultimodal`，下载数据集。\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fre\u002Fmultimodal\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    我们利用 RCNN 检测到的物体以及从原始图像中获得的视觉定位信息作为视觉局部特征，其中 RCNN 使用 [faster_rcnn](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fvision\u002Fblob\u002Fmain\u002Ftorchvision\u002Fmodels\u002Fdetection\u002Ffaster_rcnn.py)，视觉定位则采用 [onestage_grounding](https:\u002F\u002Fgithub.com\u002Fzyang-ur\u002Fonestage_grounding)。\n\n    **步骤2** 训练\u003Cbr>\n\n    - 数据集和参数可分别在 `data` 文件夹和 `conf` 文件夹中进行自定义。\n    - 如果上次训练过模型，可在 `conf\u002Ftrain.yaml` 中将 `load_path` 修改为上次保存的模型路径；同时可通过 `log_dir` 自定义训练日志的保存路径。\n\n    ```bash\n    python run.py\n    ```\n\n    **步骤3** 预测\n\n    ```bash\n    python predict.py\n    ```\n\n### 3. 属性抽取\n\n- 属性抽取是从非结构化文本中提取实体属性的过程。\n\n- 数据存储在 `.csv` 文件中。部分示例如下：\n\n  |                           句子                           |   属性   |   实体   | 实体偏移量 |      值      | 值偏移量 |\n  | :----------------------------------------------------------: | :------: | :------: | :--------: | :-----------: | :--------: |\n  |          张冬梅，女，汉族，1968年2月生，河南淇县人           |   民族   |  张冬梅  |     0      |     汉族      |     6      |\n  |诸葛亮，字孔明，三国时期杰出的军事家、文学家、发明家。|   朝代   |   诸葛亮   |     0      |     三国时期      |     8     |\n  |        2014年10月1日许鞍华执导的电影《黄金时代》上映         | 上映时间 | 黄金时代 |     19     | 2014年10月1日 |     0      |\n\n- 详细流程请参阅相应的 README 文件。\n  - **[标准模式（全监督）](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fae\u002Fstandard)**\n\n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fae\u002Fstandard` 文件夹，下载数据集。\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fae\u002Fstandard\u002Fdata.tar.gz\n    \n    tar -xzvf data.tar.gz\n    ```\n\n    **步骤2** 训练\u003Cbr>\n\n    数据集和参数可分别在 `data` 文件夹和 `conf` 文件夹中进行自定义。\n    \n    ```bash\n    python run.py\n    ```\n    \n    **步骤3** 预测\n\n    ```bash\n    python predict.py\n    ```\n\n\u003Cbr>\n\n### 4. 事件抽取\n\n* 事件抽取是从非结构化文本中提取事件类型、事件触发词和事件论元的任务。\n* 数据存储在 `.tsv` 文件中，部分实例如下：\n\n\u003Ctable h style=\"text-align:center\">\n    \u003Ctr>\n        \u003Cth colspan=\"2\"> 句子 \u003C\u002Fth>\n        \u003Cth> 事件类型 \u003C\u002Fth>\n        \u003Cth> 事件触发词 \u003C\u002Fth>\n        \u003Cth> 论元角色 \u003C\u002Fth>\n        \u003Cth> 论元 \u003C\u002Fth>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd rowspan=\"3\" colspan=\"2\"> 据《欧洲时报》报道，当地时间27日，法国巴黎卢浮宫博物馆员工因不满工作条件恶化而罢工，导致该博物馆也因此闭门谢客一天。 \u003C\u002Ftd>\n      \t\u003Ctd rowspan=\"3\"> 组织行为-罢工 \u003C\u002Ftd>\n    \t\t\u003Ctd rowspan=\"3\"> 罢工 \u003C\u002Ftd>\n    \t\t\u003Ctd> 罢工人员 \u003C\u002Ftd>\n    \t\t\u003Ctd> 法国巴黎卢浮宫博物馆员工 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 时间 \u003C\u002Ftd>\n        \u003Ctd> 当地时间27日 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 所属组织 \u003C\u002Ftd>\n        \u003Ctd> 法国巴黎卢浮宫博物馆 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd rowspan=\"3\" colspan=\"2\"> 中国外运2019年上半年归母净利润增长17%：收购了少数股东股权 \u003C\u002Ftd>\n      \t\u003Ctd rowspan=\"3\"> 财经\u002F交易-出售\u002F收购 \u003C\u002Ftd>\n    \t\t\u003Ctd rowspan=\"3\"> 收购 \u003C\u002Ftd>\n    \t\t\u003Ctd> 出售方 \u003C\u002Ftd>\n    \t\t\u003Ctd> 少数股东 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 收购方 \u003C\u002Ftd>\n        \u003Ctd> 中国外运 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 交易物 \u003C\u002Ftd>\n        \u003Ctd> 股权 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd rowspan=\"3\" colspan=\"2\"> 美国亚特兰大航展13日发生一起表演机坠机事故，飞行员弹射出舱并安全着陆，事故没有造成人员伤亡。 \u003C\u002Ftd>\n      \t\u003Ctd rowspan=\"3\"> 灾害\u002F意外-坠机 \u003C\u002Ftd>\n    \t\t\u003Ctd rowspan=\"3\"> 坠机 \u003C\u002Ftd>\n    \t\t\u003Ctd> 时间 \u003C\u002Ftd>\n    \t\t\u003Ctd> 13日 \u003C\u002Ftd>\n    \u003C\u002Ftr>\n    \u003Ctr> \n        \u003Ctd> 地点 \u003C\u002Ftd>\n        \u003Ctd> 美国亚特兰 \u003C\u002Ftd>\n  \t\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n* 详细流程请参阅具体的 README 文件。\n\n  * [STANDARD(完全监督)](.\u002Fexample\u002Fee\u002Fstandard\u002FREADME.md)\n\n    **步骤1** 进入 `DeepKE\u002Fexample\u002Fee\u002Fstandard` 文件夹。下载数据集。\n\n    ```bash\n    wget 121.41.117.246:8080\u002FData\u002Fee\u002FDuEE.zip\n    unzip DuEE.zip\n    ```\n\n    **步骤2** 训练\n\n    数据集和参数可以分别在 `data` 文件夹和 `conf` 文件夹中进行自定义。\n\n    ```bash\n    python run.py\n    ```\n\n    **步骤3** 预测\n\n    ```bash\n    python predict.py\n    ```\n\n\u003Cbr>\n\n# 小贴士\n\n1.```使用最近的镜像```, **在中国，[清华大学](https:\u002F\u002Fmirrors.tuna.tsinghua.edu.cn\u002Fhelp\u002Fanaconda\u002F) 的镜像会加快 *Anaconda* 的安装速度；在中国，[阿里云](http:\u002F\u002Fmirrors.aliyun.com\u002Fpypi\u002Fsimple\u002F) 的镜像会加快 `pip install XXX` 的速度**。\n\n2.当遇到 `ModuleNotFoundError: No module named 'past'` 时，请运行 `pip install future`。\n\n3.在线安装预训练语言模型的速度较慢。建议提前下载预训练模型并将其保存在 `pretrained` 文件夹中。请阅读每个任务目录下的 `README.md` 文件，以了解保存预训练模型的具体要求。\n\n4.*DeepKE* 的旧版本位于 [deepke-v1.0](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fdeepke-v1.0) 分支。用户可以通过切换分支来使用旧版本。旧版本已完全迁移到标准关系抽取任务中（[example\u002Fre\u002Fstandard](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002Fexample\u002Fre\u002Fstandard\u002FREADME.md)）。\n\n5.如果您想修改源代码，建议使用包含源代码的方式安装 *DeepKE*。否则，修改将无法生效。详情请参见 [issue](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F117)。\n\n6.更多与低资源知识抽取相关的工作可以在 [低资源场景下的知识抽取：综述与展望](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2202.08063.pdf) 中找到。\n\n7.请确保 `requirements.txt` 中所列依赖项的版本准确无误。\n\n# 待办事项\n在下一版本中，我们计划发布一个更强大的用于知识抽取的大型语言模型。\n\n同时，我们将提供长期维护服务，以 **修复漏洞**、**解决各类问题** 并满足 **新需求**。因此，如果您遇到任何问题，请随时向我们提交 issue。\n\n# 阅读材料\n\n数据高效的知识图谱构建，高效知识图谱构建 ([CCKS 2022 教程](http:\u002F\u002Fsigkg.cn\u002Fccks2022\u002F?page_id=24)) \\[[幻灯片](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1xqeREw3dSiw-Y1rxLDx77r0hGUvHnuuE)\\] \n\n高效且稳健的知识图谱构建 ([AACL-IJCNLP 2022 教程](https:\u002F\u002Fwww.aacl2022.org\u002FProgram\u002Ftutorials)) \\[[幻灯片](https:\u002F\u002Fgithub.com\u002FNLP-Tutorials\u002FAACL-IJCNLP2022-KGC-Tutorial)\\] \n\nPromptKG 家族：提示学习与知识图谱相关研究工作、工具包和论文列表 [[资源](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FPromptKG)\\] \n\n低资源场景下的知识抽取：综述与展望 \\[[综述](https:\u002F\u002Farxiv.org\u002Fabs\u002F2202.08063)\\]\\[[论文列表](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FLow-resource-KEPapers)\\]\n\n\n# 相关工具包\n\n[Doccano](https:\u002F\u002Fgithub.com\u002Fdoccano\u002Fdoccano)、[MarkTool](https:\u002F\u002Fgithub.com\u002FFXLP\u002FMarkTool)、[LabelStudio](https:\u002F\u002Flabelstud.io\u002F ): 数据标注工具包\n\n[LambdaKG](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FPromptKG\u002Ftree\u002Fmain\u002FlambdaKG): 一个基于预训练语言模型的知识图谱嵌入库及基准测试平台\n\n[EasyInstruct](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FEasyInstruct): 一个易于使用的框架，用于指导大型语言模型\n\n**阅读材料**:\n\n数据高效的知识图谱构建，高效知识图谱构建 ([CCKS 2022 教程](http:\u002F\u002Fsigkg.cn\u002Fccks2022\u002F?page_id=24)) \\[[幻灯片](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1xqeREw3dSiw-Y1rxLDx77r0hGUvHnuuE)\\] \n\n高效且稳健的知识图谱构建 ([AACL-IJCNLP 2022 教程](https:\u002F\u002Fwww.aacl2022.org\u002FProgram\u002Ftutorials)) \\[[幻灯片](https:\u002F\u002Fgithub.com\u002FNLP-Tutorials\u002FAACL-IJCNLP2022-KGC-Tutorial)\\] \n\nPromptKG 家族：提示学习与知识图谱相关研究工作、工具包和论文列表 [[资源](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FPromptKG)\\] \n\n低资源场景下的知识抽取：综述与展望 \\[[综述](https:\u002F\u002Farxiv.org\u002Fabs\u002F2202.08063)\\]\\[[论文列表](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FLow-resource-KEPapers)\\]\n\n\n**相关工具包**:\n\n[Doccano](https:\u002F\u002Fgithub.com\u002Fdoccano\u002Fdoccano)、[MarkTool](https:\u002F\u002Fgithub.com\u002FFXLP\u002FMarkTool)、[LabelStudio](https:\u002F\u002Flabelstud.io\u002F ): 数据标注工具包\n\n[LambdaKG](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FPromptKG\u002Ftree\u002Fmain\u002FlambdaKG): 一个基于预训练语言模型的知识图谱嵌入库及基准测试平台\n\n[EasyInstruct](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FEasyInstruct): 一个易于使用的框架，用于指导大型语言模型\n\n# 引用\n如果您在工作中使用了 DeepKE，请引用我们的论文：\n\n```bibtex\n@inproceedings{EMNLP2022_Demo_DeepKE,\n  author    = {Ningyu Zhang and\n               Xin Xu and\n               Liankuan Tao and\n               Haiyang Yu and\n               Hongbin Ye and\n               Shuofei Qiao and\n               Xin Xie and\n               Xiang Chen and\n               Zhoubo Li and\n               Lei Li},\n  editor    = {Wanxiang Che and\n               Ekaterina Shutova},\n  title     = {DeepKE: {A} Deep Learning Based Knowledge Extraction Toolkit for Knowledge Base Population},\n  booktitle = {{EMNLP} (Demos)},\n  pages     = {98--108},\n  publisher = {Association for Computational Linguistics},\n  year      = {2022},\n  url       = {https:\u002F\u002Faclanthology.org\u002F2022.emnlp-demos.10}\n}\n```\n\u003Cbr>\n\n# 贡献者\n\n[Ningyu Zhang](https:\u002F\u002Fperson.zju.edu.cn\u002Fen\u002Fningyu), [Haofen Wang](https:\u002F\u002Ftjdi.tongji.edu.cn\u002FTeacherDetail.do?id=4991&lang=_en), 黄飞, 熊飞宇, 陶连宽, 徐欣, 桂洪浩, 张振儒, 谭传奇, 陈强, 王晓涵, 席泽坤, 李新荣, 于海洋, 叶洪斌, 乔硕飞, 王鹏, 朱宇琪, 谢鑫, 陈翔, 李周波, 李磊, 梁晓专, 姚云志, 陈静, 朱宇琪, 罗雨洁, 邓淑敏, 张文, 郑国洲, 陈华军\n\n社区贡献者：沈硕、邵周天、胡伟、[thredreams](https:\u002F\u002Fgithub.com\u002Fthredreams)、[eltociear](https:\u002F\u002Fgithub.com\u002Feltociear)、徐子文、黄睿、翁小龙\n\n# 其他知识抽取开源项目\n\n- [CogIE](https:\u002F\u002Fgithub.com\u002Fjinzhuoran\u002FCogIE)\n- [OpenNRE](https:\u002F\u002Fgithub.com\u002Fthunlp\u002FOpenNRE)\n- [OmniEvent](https:\u002F\u002Fgithub.com\u002FTHU-KEG\u002FOmniEvent)\n- [OpenUE](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FOpenUE)\n- [OpenIE](https:\u002F\u002Fstanfordnlp.github.io\u002FCoreNLP\u002Fopenie.html)\n- [RESIN](https:\u002F\u002Fgithub.com\u002FRESIN-KAIROS\u002FRESIN-pipeline-public)\n- [ZShot](https:\u002F\u002Fgithub.com\u002FIBM\u002Fzshot)\n- [ZS4IE](https:\u002F\u002Fgithub.com\u002FBBN-E\u002FZS4IE)\n- [OmniEvent](https:\u002F\u002Fgithub.com\u002FTHU-KEG\u002FOmniEvent)","# DeepKE 快速上手指南\n\nDeepKE 是一个基于深度学习的知识抽取工具包，支持实体、关系和属性抽取，涵盖低资源、文档级及多模态等多种场景。\n\n## 1. 环境准备\n\n*   **操作系统**：推荐使用 **Linux**。若使用 Windows，请注意在文件路径中使用 `\\\\`。\n*   **Python 版本**：\n    *   标准版 DeepKE：推荐 Python 3.8\n    *   DeepKE-LLM（大模型版）：推荐 Python 3.9\n*   **依赖管理**：建议使用 `Anaconda` 或 `Miniconda` 创建虚拟环境。\n*   **网络提示**：若无法访问 HuggingFace，建议使用国内镜像源（如 `wisemodel` 或 `modescape`）。\n\n## 2. 安装步骤\n\n### 方案 A：标准版 DeepKE (源码安装推荐)\n\n适用于传统深度学习模型（如 NER、关系抽取等）。\n\n```bash\n# 1. 克隆代码库\ngit clone --depth 1 https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE.git\ncd DeepKE\n\n# 2. 创建并激活虚拟环境\nconda create -n deepke python=3.8\nconda activate deepke\n\n# 3. 安装依赖并配置环境\npip install -r requirements.txt\npython setup.py install\npython setup.py develop\n```\n\n> **注意**：若直接使用 `pip install deepke`，请确保 pip 版本 \u003C= 24.0，但更推荐上述源码安装方式。\n\n### 方案 B：DeepKE-LLM (大模型版)\n\n适用于结合大语言模型进行知识抽取的场景。\n\n```bash\n# 1. 创建专用虚拟环境\nconda create -n deepke-llm python=3.9\nconda activate deepke-llm\n\n# 2. 进入示例目录并安装依赖\ncd example\u002Fllm\npip install -r requirements.txt\n```\n\n### 方案 C：Docker 部署 (可选)\n\n若希望自动配置环境，可使用项目提供的 `dockerfile` 构建镜像。\n\n## 3. 基本使用\n\n以下以**全监督关系抽取**任务为例，展示最简使用流程。\n\n### 第一步：准备数据\n进入任务目录并下载示例数据集（或使用自定义数据）：\n\n```bash\ncd DeepKE\u002Fexample\u002Fre\u002Fstandard\n\n# 下载示例数据\nwget 121.41.117.246:8080\u002FData\u002Fre\u002Fstandard\u002Fdata.tar.gz\ntar -xzvf data.tar.gz\n```\n\n### 第二步：运行模型\n在确保配置文件（通常在 `conf` 目录下）指向正确的数据路径后，运行训练或预测脚本。\n\n```bash\n# 运行训练 (具体脚本名称视子任务而定，通常为 train.py 或 main.py)\npython train.py\n\n# 运行预测\npython predict.py\n```\n\n### 第三步：查看结果\n预测结果通常输出在指定的 `output` 目录中，包含抽取出的三元组或实体信息。\n\n---\n**更多资源**：\n*   **在线演示**：[http:\u002F\u002Fdeepke.zjukg.cn](http:\u002F\u002Fdeepke.zjukg.cn)\n*   **详细文档**：[https:\u002F\u002Fzjunlp.github.io\u002FDeepKE](https:\u002F\u002Fzjunlp.github.io\u002FDeepKE)\n*   **大模型工具链**：如需使用 MCP 服务工具，请参考 `mcp-tools` 目录下的说明。","某金融风控团队需要从每日海量的非结构化新闻舆情和财报文档中，自动提取企业间的担保、投资及高管任职关系，以构建实时的风险传导知识图谱。\n\n### 没有 DeepKE 时\n- **人工标注成本极高**：面对低资源场景（如特定行业的罕见事件），缺乏少量样本即可训练的模型，必须雇佣大量专家进行全量数据标注，耗时数周。\n- **文档级关系遗漏**：传统工具仅能处理单句内的实体关系，当“母公司”与“子公司”出现在文档的不同段落时，系统无法识别这种长距离依赖，导致关键风险链路断裂。\n- **多模态数据闲置**：财报中包含大量描述业务关系的图表，原有纯文本提取方案无法解析图片信息，造成高价值数据浪费。\n- **属性抽取困难**：难以从复杂句式中的实体上进一步抽取“持股比例”、“任职时间”等细粒度属性，导致图谱节点信息单薄，无法支撑深度推理。\n\n### 使用 DeepKE 后\n- **低资源快速冷启动**：利用 DeepKE 的少样本学习（Few-shot）模块，仅需提供几十条标注数据，即可在半天内训练出高精度的行业专用关系提取模型。\n- **全域关系精准捕获**：启用文档级提取功能，成功跨越段落界限，准确识别出分散在长篇研报中的复杂企业关联，图谱覆盖率提升 40%。\n- **多模态融合增强**：通过多模态场景支持，直接解析财报插图中的股权结构，将图像信息转化为图谱三元组，补全了纯文本缺失的关键证据。\n- **细粒度属性自动化**：一站式完成实体、关系及属性的联合抽取，自动填充节点的“持股比例”等动态属性，使风险量化计算成为可能。\n\nDeepKE 通过解决低资源、文档级及多模态下的提取难题，将原本需要数周的知识图谱构建周期缩短至天级，显著提升了风控系统的实时响应能力。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzjunlp_DeepKE_ca1d073c.png","zjunlp","ZJUNLP","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fzjunlp_4dd6d5d4.jpg","Knowledge Engine Lab: A NLP & KG Group of  Zhejiang  University",null,"huajunsir@zju.edu.cn","ChenHuajun","http:\u002F\u002Fzjunlp.org","https:\u002F\u002Fgithub.com\u002Fzjunlp",[82,86,90],{"name":83,"color":84,"percentage":85},"Python","#3572A5",99.3,{"name":87,"color":88,"percentage":89},"Shell","#89e051",0.7,{"name":91,"color":92,"percentage":93},"Dockerfile","#384d54",0,4363,742,"2026-04-10T08:16:54","MIT","Linux, Windows","未说明（支持多 GPU 训练，具体型号和显存取决于所选模型）","未说明",{"notes":102,"python":103,"dependencies":104},"强烈建议在 Linux 环境下使用；若在 Windows 上运行，文件路径需使用双反斜杠 '\\'；若无法访问 HuggingFace，建议使用 'wisemodel' 或 'modescape' 作为替代源；DeepKE-LLM 模块需要独立的 Python 3.9 环境；安装时需注意 pip 版本不超过 24.0。","3.8 (DeepKE), 3.9 (DeepKE-LLM)",[105,106,107,108,109,110,111,112,113,114],"torch","transformers","accelerate","pytorch-pretrained-bert","tqdm","numpy","pandas","scikit-learn","spacy","nltk",[16,116,35,117,14,15],"音频","视频",[119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138],"knowledge-graph","relation-extraction","chinese","named-entity-recognition","attribute-extraction","low-resource","document-level","information-extraction","pytorch","deepke","ner","nlp","few-shot","prompt","deep-learning","kg","multi-modal","lightner","knowprompt","instructie","2026-03-27T02:49:30.150509","2026-04-11T03:23:09.568646",[142,147,152,157,162,167,172],{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},28648,"在 Windows 上运行非大模型版本时遇到编码错误或兼容性问题如何解决？","非大模型版本是 5 年前开发的，早期版本对 Windows 兼容性存在问题。建议用户使用 Linux 环境安装和运行，Linux 对各种环境兼容性更好且适合 GPU 训练。如果必须使用最新技术栈，可以使用去年开发的大模型版本 deepke-llm（README 中有介绍），该版本的 conda 和 Python 库版本较高，兼容性更好。","https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F410",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},28649,"NER 任务是否支持直接输入 JSON 格式（如 Doccano 导出的 start\u002Fend 格式）而非 BIO 格式的 txt 文件？","当前系统设计主要为了统一，默认未直接支持 JSON 输入，需要修改 dataloader 来解析 JSON。对于非嵌套实体，BIO 格式已足够；对于嵌套实体，目前除了 w2ner 模型外其他模型均不支持。如果需要使用支持嵌套抽取的 w2ner 模型但受限于输入格式，可以直接使用 w2ner 源码（https:\u002F\u002Fgithub.com\u002Fljynlp\u002FW2NER），或者等待框架后续更新支持直接 JSON 输入。","https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F574",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},28650,"运行 NER 任务时报错 FileNotFoundError: '.\u002Fmeta\u002Frel2id.json' 不存在，或者找不到配置文件中的 batch size 设置？","关于 batch size 的设置，请在配置文件中查找。例如在 NER 标准任务的配置文件 (example\u002Fner\u002Fstandard\u002Fconf\u002Ftrain.yaml) 中，训练时的 batch size 由 'train_batch_size' 参数控制，评估时的 batch size 由 'eval_batch_size' 参数控制。确保配置文件路径正确且参数名称匹配。","https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F125",{"id":158,"question_zh":159,"answer_zh":160,"source_url":161},28651,"调用 OneKE 模型库时输出内容不可解析且大量重复，或者生成停不下来怎么办？","这可能是由于停止符设置不当或模型优化问题导致的。官方已将 OneKE 扩展为智能体系统并开源到 https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FOneKE，支持基于 Qwen、DeepSeek 等开源模型进行无需微调的信息抽取。如果遇到输出重复问题，可以尝试使用 OneKE 提供的训练数据自行训练模型（有用户反馈训练 14B 小模型后问题解决），或者关注官方后续的代码和模型优化更新。如需定制领域抽取模型，可使用 DeepKE-LLM 进行指令微调。","https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F543",{"id":163,"question_zh":164,"answer_zh":165,"source_url":166},28652,"在 macOS 上安装依赖包失败或项目结构与文档不符怎么办？","macOS 用户可能会遇到依赖包版本冲突或架构不匹配的问题。建议在 CentOS 或 Linux 环境下运行，或使用 Docker。如果在其他环境运行 LLM 相关任务，需注意：1. 调整依赖版本（如 bitsandbytes 改为 0.39.1，datasets 去掉版本号让 pip 自动解决冲突）；2. 修正推理命令中的模型路径和 checkpoint 目录，确保本地创建 models 和 lora 目录并放入对应权重；3. 注意半精度参数使用 --bf16 而非 --fp16（针对 IEPile 系列）。具体启动命令需根据实际模型调整 --model_name_or_path 和 --checkpoint_dir 参数。","https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F422",{"id":168,"question_zh":169,"answer_zh":170,"source_url":171},28653,"LLM 关系抽取任务运行缓慢或结果异常，以及如何执行推理得到输出？","运行缓慢或模型崩溃通常与训练数据集大小和超参数设置有关，建议检查数据量是否充足及超参数是否合理。关于推理：生成标准请求数据（processed.json）后，需通过特定的推理脚本执行。注意显卡显存需求，2GB 显存无法运行 7B 及以上的大模型。执行推理时，可能需要在 python 命令前添加 CUDA_VISIBLE_DEVICES 指定显卡，并将代码中的 device_setting 从 \"auto\" 修改为具体的设备字典（如 {\"\": 0}）。具体脚本参考 example\u002Fllm 目录下的 infer_scripts。","https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F336",{"id":173,"question_zh":174,"answer_zh":175,"source_url":176},28654,"如何在 DeepKE 中指定 GPU 设备进行 LLM 推理？","在运行推理脚本时，可以通过两种方式指定 GPU：1. 在终端命令前添加环境变量，例如：CUDA_VISIBLE_DEVICES=\"1\" python src\u002Finference.py ...；2. 修改代码中的配置，将 device_setting 参数从 \"auto\" 改为具体的设备映射，例如 device_setting = {\"\": 0}。请确保所选显卡显存充足（运行 7B 以上模型通常需要更大显存）。","https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fissues\u002F345",[178,183,188,193,197,202,207,212,217],{"id":179,"version":180,"summary_zh":181,"released_at":182},197563,"2.2.7","修复需求","2023-09-21T03:43:55",{"id":184,"version":185,"summary_zh":186,"released_at":187},197564,"2.2.6","上传 Docker 的新版本。","2023-08-05T12:54:24",{"id":189,"version":190,"summary_zh":191,"released_at":192},197565,"2.2.4","修复一些bug","2023-06-28T14:43:00",{"id":194,"version":195,"summary_zh":191,"released_at":196},197566,"2.2.1","2023-04-14T05:28:15",{"id":198,"version":199,"summary_zh":200,"released_at":201},197567,"2.2","1. 通过 EasyInstruct 支持大语言模型（如 ChatGPT），并新增 CP-NER、ASP、PRGC 和 PURE 等模型。\r\n\r\n2. 提供中英文事件抽取功能。\r\n\r\n3. 兼容更高版本的 Python 包（例如 Transformers）。\r\n\r\n4. 解决已知问题。","2023-04-04T11:20:22",{"id":203,"version":204,"summary_zh":205,"released_at":206},197568,"2.1.2","修复一些bug。","2023-01-01T15:37:15",{"id":208,"version":209,"summary_zh":210,"released_at":211},197569,"2.1.1","1. 为实体识别和关系抽取添加数据标注说明[链接](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Fblob\u002Fmain\u002FREADME_TAG.md)。\n2. 添加弱监督数据的自动标注功能（[实体识别](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fner\u002Fprepare-data)和[关系抽取](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fprepare-data)）。\n3. 优化[多GPU训练](https:\u002F\u002Fgithub.com\u002Fzjunlp\u002FDeepKE\u002Ftree\u002Fmain\u002Fexample\u002Fre\u002Fstandard)。\n4. 修复了一些Bug。","2022-11-17T06:24:56",{"id":213,"version":214,"summary_zh":215,"released_at":216},197570,"2.1.0","我们在本版本中新增了以下功能：\n1、新增多模态实体抽取和多模态关系抽取功能。\n2、新增基于cnSchema的预训练模型。\n3、新增用于实体抽取的LSTM-CRF模型。\n4、新增针对低资源关系抽取的数据增强功能。\n5、修复了一些Bug。\n","2022-08-28T16:03:17",{"id":218,"version":219,"summary_zh":76,"released_at":220},197571,"2.0.2","2022-04-12T12:38:44"]