Code Monkey home page Code Monkey logo

chinese_time_recogniztion's Introduction

Hi there 👋

Percent4's GitHub stats

Top Langs

chinese_time_recogniztion's People

Contributors

percent4 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

Watchers

 avatar  avatar

chinese_time_recogniztion's Issues

预测文本长度不能超过127么?

楼主,这里我测试一个新闻文本,新闻文本长度为360。

>>> len("9月中旬,对沙特阿拉伯的阿卜卡伊克石油设施和库赖斯油田的无人机袭击影响了全球石油供应。之后,沙特国防部展示了它所谓伊朗参与的证据:无人机和巡航导弹残骸。一位发言人说,该国仍在努力准确了解发射地点。美国也表示伊朗对此负责。高级官员告诉美国媒体,他们有证据显示袭击起源于伊朗南部。伊朗一再否认在袭击中有任何参与。鲁哈尼总统称这次袭击是也门人民的对等行为。而美国国务卿蓬佩奥称这次袭击是战争行为。而伊朗外长扎里夫在推特上警告说,伊朗没有战争的欲望,但将毫不犹豫地保卫自己。与此同时,沙特国有石油公司阿美(Aramco)表示,预计到9月底,石油产量将恢复到袭击前的水平。胡塞人多次向沙特阿拉伯人口稠密地区发射火箭、导弹 和无人驾驶飞机。他们与沙特领导的联盟发生军事冲突。该联盟支持的也门总统在2015年3月也门冲突升级时逃离该国。")
360

但是预测出来的序列长度只有127,是因为做了什么限制么?

>>> text = "9月中旬,对沙特阿拉伯的阿卜卡伊克石油设施和库赖斯油田的无人机袭击影响了全球石油供应。之后,沙特国防部展示了它所谓伊朗参与的证据:无人机和巡航导弹残骸。一位发言人说,该国仍在努力准确了解发射地 点。美国也表示伊朗对此负责。高级官员告诉美国媒体,他们有证据显示袭击起源于伊朗南部。伊朗一再否认在袭击中有任何参与。鲁哈尼总统称这次袭击是也门人民的对等行为。而美国国务卿蓬佩奥称这次袭击是战争行为。而伊朗外长扎里夫在推特上警告说,伊朗没有战争的欲望,但将毫不犹豫地保卫自己。与此同时,沙特国有石油公司阿美(Aramco)表示,预计到9月底,石油产量将恢复到袭击前的水平。胡塞人多次向沙特阿拉伯人口稠密地区发射火箭、 导弹和无人驾驶飞机。他们与沙特领导的联盟发生军事冲突。该联盟支持的也门总统在2015年3月也门冲突升级时逃离该国。"
>>> t = loaded_model.predict([[char for char in text]])
>>> print(t)
[['B-TIME', 'I-TIME', 'I-TIME', 'I-TIME', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O']]
>>> len(t)
1
>>> len(t[0])
127

thanks

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.