DeepKE  by zjunlp

Deep learning toolkit for knowledge graph extraction/construction

Created 7 years ago
4,119 stars

Top 12.0% on SourcePulse

GitHubView on GitHub
Project Summary

DeepKE is an open-source toolkit for knowledge graph extraction and construction, targeting researchers and practitioners in Natural Language Processing and Knowledge Engineering. It provides a unified framework for Named Entity Recognition (NER), Relation Extraction (RE), and Attribute Extraction (AE), supporting various scenarios including low-resource, document-level, and multimodal data.

How It Works

DeepKE employs a modular architecture where each task (NER, RE, AE) is composed of Data (Tokenizer, Preprocessor, Loader), Model (Module, Encoder, Forwarder), and Core (Training, Evaluation, Prediction) components. This design allows for flexibility in handling different data formats and implementing various extraction models, including support for Large Language Models (LLMs) through its DeepKE-LLM extension.

Quick Start & Requirements

  • DeepKE-LLM: conda create -n deepke-llm python=3.9, conda activate deepke-llm, cd example/llm, pip install -r requirements.txt.
  • DeepKE (Manual): git clone --depth 1 https://github.com/zjunlp/DeepKE.git, conda create -n deepke python=3.8, conda activate deepke, pip install -r requirements.txt, python setup.py install. Then navigate to task-specific directories (e.g., example/re/standard) and download data.
  • DeepKE (Docker): docker pull zjunlp/deepke:latest, docker run -it zjunlp/deepke:latest /bin/bash.
  • Requirements: Python 3.8, PyTorch (<=1.11), Transformers (4.26.0). See README for a full list.
  • Documentation: https://zjunlp.github.io/DeepKE/
  • Demo: http://deepke.zjukg.cn/

Highlighted Details

  • Supports extraction for entities, relations, and attributes across standard, low-resource, document-level, and multimodal settings.
  • Integrates with LLMs via DeepKE-LLM and OneKE for advanced extraction capabilities.
  • Provides off-the-shelf models for cnSchema extraction.
  • Includes examples for Named Entity Recognition (NER), Relation Extraction (RE), Attribute Extraction (AE), and Event Extraction (EE).

Maintenance & Community

The project has active development with recent updates including LLM integration, new datasets (IEPile), and models. Community contributions are acknowledged. For issues, users are directed to submit GitHub issues.

Licensing & Compatibility

The repository does not explicitly state a license in the README. However, the presence of dockerfile and general open-source practices suggest it is intended for broad use. Compatibility with commercial or closed-source projects would require license clarification.

Limitations & Caveats

The project recommends Linux environments, with specific notes for Windows path usage. Installation of large pretrained models online can be slow, suggesting pre-downloading. The pip install deepke method is noted as not recommended. Python version compatibility might be strict (e.g., Python 3.8 for DeepKE core, 3.9 for DeepKE-LLM).

Health Check
Last Commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
35 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.