Coder Social home page Coder Social logo

ner_with_allennlp's Introduction

CoNLL2003命名实体识别

目录结构和介绍

.
├── allennlp-source-code # allennlp源码
├── configs # 模型配置文件
├── data # 数据集
├── models # 生成的模型目录,不包含大模型,只保存了训练日志和结果
│   ├── model_bert # BERT+BiLSTM+CRF
│   ├── model_bilstm_crf # BiLSTM+CRF
│   ├── model_bilstm_crf_focalloss # BiLSTM+CRF+FocalLoss
│   ├── model_cnn # CNN+BiLSTM+CRF
│   ├── model_crf # CRF only
│   ├── model_crf_facolloss # CRF with FocalLoss
│   ├── model_hmm # HMM only
│   └── model_roberta_crf # RoBERTa+BiLSTM+CRF
│   └── model_roberta_crf_focalloss # RoBERTa+BiLSTM+CRF+FocalLoss
├─── ner_modules # 包含HMM和CRF tagger
│   ├── crf_tagger.py # CRF tagger
│   ├── crf_tagger_facol_loss.py # CRF tagger with Focal Loss
│   ├── conditional_random_field_2.py # Crf with Focal Loss
│   ├── hmm_pre.py # 第一版HMM模型
│   └── hmm.py # 第二版HMM模型
└── report # 项目报告

运行方式

  1. clone到本地
    • git clone https://github.com/HanielF/ner_with_allennlp.git
  2. 主要依赖环境介绍:
    • python== 3.7
    • pytorch== 1.8.1
    • allennlp== 2.4.0
    • allennlp-models==2.4.0
    • conda create -n allennlp python=3.7
    • conda activate allennlp
    • pip install allennlp==2.4.0
    • pip install allennlp-models==2.4.0
    • ``
  3. 切换到项目路径
    • cd ner_with_allennlp
  4. HMM运行方式
    • python ner_modules/hmm.py
  5. CRF/CNN/BiLSTM/BERT/RoBERTa运行方式
    • bash run.sh crf
    • bash run.sh cnn
    • bash run.sh bilstm_crf
    • bash run.sh bert
    • bash run.sh roberta_crf

项目报告节选

img

img

ner_with_allennlp's People

Contributors

hanielf avatar 5symx avatar

Stargazers

SQG avatar  avatar takayoshi-s avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.