GithubHelp home page GithubHelp logo

bert-bilstm-crf's Introduction

BERT-BiLSTM-CRF

BERT-BiLSTM-CRF的Keras版实现

BERT配置

  1. 首先需要下载Pre-trained的BERT模型,本文用的是Google开源的中文BERT模型:
  1. 安装BERT客户端和服务器 pip install bert-serving-server pip install bert-serving-client,源项目如下:
  1. 打开服务器,在BERT根目录下,打开终端,输入命令:
  • bert-serving-start -pooling_strategy NONE -max_seq_len 144 -mask_cls_sep -model_dir chinese_L-12_H-768_A-12/ -num_worker 1

DEMO数据

  • 2015词性标注数据集

文件描述

  • preprocess.py 数据预处理,产生模型输入的pickle文件
  • train.py 通过训练集,训练模型
  • test.py 计算模型在测试集中的F1值
  • Modellib.py 模型位置
  • config.py 参数配置

模型训练

配置BERT->>执行preprocess.py->>执行train.py

配置

  • python 2.7
  • tensorflow-gpu 1.10.0
  • Keras 2.2.4
  • keras-contrib 2.0.8

bert-bilstm-crf's People

Contributors

aidenhuen 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.