GithubHelp home page GithubHelp logo

llcing / bilstm-crf-chinesener.pytorch Goto Github PK

View Code? Open in Web Editor NEW
61.0 3.0 17.0 2.69 MB

PyTorch implement of BiLSTM-CRF for Chinese NER

Perl 41.93% Python 58.07%
pytorch bilstm-crf named-entity-recognition

bilstm-crf-chinesener.pytorch's Introduction

BiLSTM-CRF-ChineseNER.pytorch

PyTorch implement of BiLSTM-CRF for Chinese NER

Requires:

  • PyTorch 0.4.1

  • Numpy

Just run python main.py --mode=train

P.S. use standard conlleval.pl to calculate entity-level precision, recall and f1-score. For details, you can refer the source codes.

Here's the best results (%):

TO BE COMPLETED

bilstm-crf-chinesener.pytorch's People

Contributors

llcing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bilstm-crf-chinesener.pytorch's Issues

我在用自己数据的时候,报错了

File "D:/nuoyi/biaodian/BiLSTM-CRF-ChineseNER.pytorch-master/main.py", line 141, in
loss = train()

File "D:/nuoyi/biaodian/BiLSTM-CRF-ChineseNER.pytorch-master/main.py", line 79, in train
loss, _ = model(word, label, seq_lengths)

File "C:\Users\xiongxi.conda\envs\tf\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)

File "D:\nuoyi\biaodian\BiLSTM-CRF-ChineseNER.pytorch-master\model.py", line 174, in forward
label_score = self.crf._score_sentence(output, labels)

File "D:\nuoyi\biaodian\BiLSTM-CRF-ChineseNER.pytorch-master\model.py", line 51, in _score_sentence
bsz_t = gather_index(temp.transpose(0, 1), tags[:, i + 1])

IndexError: index 3571 is out of bounds for dimension 1 with size 3571
我看了一下
ipdb> word.shape
torch.Size([50, 6351])

ipdb> label.shape
torch.Size([50, 3570])
请问这个是因为中间没有填充导致的吗?

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.