GithubHelp home page GithubHelp logo

sequence-labeling's Introduction

Sequential Labeling

  • HMM
  • BILSTM-CRF

Input Format

The first column is the char, the second column is the label(BMEO), there is an empty line between two sentences

N B

B M

A E

D O

an empty line

Z O

Z O

Z O

Z O

Z O

Output Format

NBAD<@>NBA

ZZZZZ<@>

Train

python train.py train.in model -v validation.in -c char_emb -e 10 -g 2

  • train.in, the path of the train file
  • model, the path of the saved model
  • v, the path of the validation file(optional, otherwise split the train set into train and val)
  • c, the char embedding file(optional)
  • e, the number of epoch(optional, default 100)
  • g, the id of gpu(optional, default 0)

Test

python test.py model test.in test.out -c char_emb -g 2

  • model, the path of model file
  • test.in, the path of test file
  • test.out, the path of predict file of test
  • c, the char embedding file(optional)
  • g, the id of gpu(optional, default 0)

Embedding

The first line of the embedding file is the number of char and embedding dimension, seperating by space, e.g 5 10. The remaining line is the char and embedding vector, seperating by space, e.g N dim1 ... dim 10

Installation Dependencies

  • python 2.7
  • tensorflow 0.8
  • numpy
  • pandas

References

sequence-labeling's People

Contributors

chilynn avatar

Watchers

 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.