Giter Site home page Giter Site logo

chinese_prosody_predict's Introduction

Prosody Prediction

韵律预测停顿位置
生产停顿等级:#1 #2 #3 #4

Quickstart

  1. https://ai.tencent.com/ailab/nlp/en/index.html 下载腾讯开源的ChineseEmbedding 到根目录

  2. 下载标贝开源数据,提取 000001-010000.txt 文件到根目录

  3. 开始训练

sh run.sh
  1. 运行交互式命令行进行测试
python demo.py
Working directory: /home/chan/test/Prosody_Prediction_3
2021-01-04 16:26:46,792 - ProsodyPred - DEBUG - Loaded pretrained model in 0.1708s
2021-01-04 16:26:46,807 - ProsodyPred - DEBUG - Number of Parameters: 5414614
2021-01-04 16:26:46,807 - ProsodyPred - DEBUG - Number of Trainable Parameters: 402814
2021-01-04 16:26:46,983 - ProsodyPred - DEBUG - Loaded pretrained model in 0.1280s
2021-01-04 16:26:46,983 - ProsodyPred - DEBUG - Number of Parameters: 5414614
2021-01-04 16:26:46,984 - ProsodyPred - DEBUG - Number of Trainable Parameters: 402814
2021-01-04 16:26:47,203 - ProsodyPred - DEBUG - Loaded pretrained model in 0.1727s
2021-01-04 16:26:47,203 - ProsodyPred - DEBUG - Number of Parameters: 5414614
2021-01-04 16:26:47,203 - ProsodyPred - DEBUG - Number of Trainable Parameters: 402814
Model loaded succeed
>> 高铁坐过站咋办?这样做免费返回
0.01025991439819336
gao1 tie3 #1 zuo4 guo4 zhan4 #1 za3 ban4 #3 ? zhe4 yang4 zuo4 #1 mian3 fei4 #1 fan3 hui2

API

  1. 指定模型进行预测, 参考demo.py
net1 = ProsodyNet(args.model_dir, 'pw')
words, pos = tokenize(text)
tags = net.inference(words, pos)

Training(2020/12/20)

thulac

prosody level accuracy block_acc precison recall loss
biaobei1 EVAL 0.939 0.885 0.750 0.950 0.154
biaobei2 EVAL 0.930 0.747 0.573 0.853 0.168
biaobei3 EVAL 0.982 0.910 0.809 0.952 0.061
biaobei4 EVAL 1.000 1.000 0.999 1.000 0.000

pkuseg

prosody level accuracy block_acc precison recall loss
biaobei1 EVAL 0.940 0.900 0.799 0.965 0.154
biaobei2 EVAL 0.924 0.737 0.590 0.846 0.176
biaobei3 EVAL 0.981 0.909 0.871 0.953 0.065
biaobei4 EVAL 1.000 1.000 1.000 1.000 0.000

jieba

prosody level accuracy block_acc precison recall loss
biaobei1 EVAL 0.939 0.895 0.810 0.957 0.150
biaobei2 EVAL 0.922 0.751 0.594 0.865 0.183
biaobei3 EVAL 0.980 0.907 0.813 0.951 0.065
biaobei4 EVAL 1.000 0.999 0.930 0.999 0.000

chinese_prosody_predict's People

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.