GithubHelp home page GithubHelp logo

在CMeEE数据上报错 about w2ner HOT 6 CLOSED

ljynlp avatar ljynlp commented on August 13, 2024
在CMeEE数据上报错

from w2ner.

Comments (6)

ljynlp avatar ljynlp commented on August 13, 2024

应该是处理完后句子长度太长了,超过了设定的1000导致报错。如果句子里面英文单词过多的话不建议把单词拆成字母,不然句子很可能过长导致程序无法运行。

from w2ner.

nlper01 avatar nlper01 commented on August 13, 2024

应该是处理完后句子长度太长了,超过了设定的1000导致报错。如果句子里面英文单词过多的话不建议把单词拆成字母,不然句子很可能过长导致程序无法运行。

好的,我试试吧英文句子删掉试试。另外,这个1000可以修改吗?我尝试修改了这里的1000
dis2idx = np.zeros((1000), dtype='int64')还是一样的错误

from w2ner.

ljynlp avatar ljynlp commented on August 13, 2024

即使这里修改了,还是会超出BERT的512个token的限制,同样会报错,最好直接将超出长度的句子处理掉。

from w2ner.

nlper01 avatar nlper01 commented on August 13, 2024

即使这里修改了,还是会超出BERT的512个token的限制,同样会报错,最好直接将超出长度的句子处理掉。

好的,谢谢

from w2ner.

nlper01 avatar nlper01 commented on August 13, 2024

即使这里修改了,还是会超出BERT的512个token的限制,同样会报错,最好直接将超出长度的句子处理掉。
微信截图_20220708213356
你好,句子长度大于500个token的我都处理掉了,又报新的越界错误,这怎么解决呢?是不是因为我数据集里面的实体类别比代码里面原来设定的类别数多的问题?

from w2ner.

ljynlp avatar ljynlp commented on August 13, 2024

可能是你数据处理的有问题,最好查验一下每个样本中的实体index与对应文本中的内容是否一致。

from w2ner.

Related Issues (20)

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.