Skip to main content

Easy-to-use Information Extraction Framework

Project description

FastIE

此项目为开源文本分类、实体抽取、关系抽取和事件抽取模型的训练和推理提供统一的框架,具有以下特性

  • ✨ 支持多种开源文本分类、实体抽取、关系抽取和事件抽取模型

  • 👑 支持百度 UIE 模型的训练和推理

  • 🚀 统一的训练和推理框架

  • 🎯 集成对抗训练方法,简便易用

📢 更新日志

  • 【2024.8.30】 发布初始版本

📦 快速安装

pip install --upgrade fastie

🚀 模型训练

实体抽取

cd examples/named_entity_recognition
fastie-cli train global_pointer.yaml

具体参数详见 named_entity_recognition

关系抽取

cd examples/relation_extraction
fastie-cli train gplinker.yaml

具体参数详见 relation_extraction

事件抽取

cd examples/event_extraction
fastie-cli train gplinker.yaml

具体参数详见 event_extraction

📊 模型推理

本项目实现了对各类模型推理代码的封装,只需要4行代码即可推理!

from transformers import AutoModel, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("path_to_model", trust_remote_code=True)
model = AutoModel.from_pretrained("path_to_model", trust_remote_code=True)

print(model.predict(tokenizer, "因肺过度充气,常将肝脏推向下方。"))

致谢

本项目受益于 LLaMA-Factory,感谢以上诸位作者的付出。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastie-1.0.0.dev0.tar.gz (155.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastie-1.0.0.dev0-py3-none-any.whl (209.3 kB view details)

Uploaded Python 3

File details

Details for the file fastie-1.0.0.dev0.tar.gz.

File metadata

  • Download URL: fastie-1.0.0.dev0.tar.gz
  • Upload date:
  • Size: 155.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for fastie-1.0.0.dev0.tar.gz
Algorithm Hash digest
SHA256 e613f785c80e7a74fae6d148dd4da601398df0081e61cf63ee84769ed91e8ad3
MD5 f26af6c807dfbb8cce69ba758370d34f
BLAKE2b-256 41fc0522de61e483e26e1f6af8027e3f421b65cb78014545b5d88f46841376b8

See more details on using hashes here.

File details

Details for the file fastie-1.0.0.dev0-py3-none-any.whl.

File metadata

  • Download URL: fastie-1.0.0.dev0-py3-none-any.whl
  • Upload date:
  • Size: 209.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for fastie-1.0.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d5a2127ceccba256e39df991640945eae40f7671e161c15d437395c5cd9dac8
MD5 ef12cd2d87912dc645b5cce58dd0d5d1
BLAKE2b-256 d1a816a1b51350b02fc446647ba329dce92741670e9c9b5bbd72a64e2e4c2e85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page