Giter Site home page Giter Site logo

crf's Introduction

crf

pytorch 条件随机场实现序列标注

模型下载

bert-vocab-chinese
bert-model-chinese
Traditional-Chinese ELMo

Pre-requirements

  • must python >= 3.6 (if you use python3.5, you will encounter this issue HIT-SCIR/ELMoForManyLangs#8)
  • pytorch 1.0
  • opencc
  • elmoformanylangs
  • pytorch_pretrained_bert

简体转繁体

# 安装
# pip install opencc-python-reimplemented

# t2s - 繁体转简体(Traditional Chinese to Simplified Chinese)
# s2t - 简体转繁体(Simplified Chinese to Traditional Chinese)
# mix2t - 混合转繁体(Mixed to Traditional Chinese)
# mix2s - 混合转简体(Mixed to Simplified Chinese)

import opencc
cc = opencc.OpenCC('s2t')
s = cc.convert('你好,吃饭了吗?')
print(s)

Result

Network + CRF acc precision recall f1-score
Bi-GRU 0.9638 0.9294 0.9264 0.9279
2 layer Bi-GRU 0.9613 0.9404 0.9362 0.9383
3 layer Bi-GRU 0.9644 0.9366 0.9433 0.94
bert 0.9655 0.9531 0.9556 0.9543
bert Bi-GRU 0.9648 0.9572 0.9511 0.9541
elmo Bi-GRU 0.9649 0.9468 0.9394 0.9431

crf's People

Contributors

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