1. 分词 word segmentation

国内有jieba 分词

2. Named Entity Recognition

  1. 训练自己的Model

      

How can I train my own NER model

https://nlp.stanford.edu/software/crf-faq.html#a

C:\my_study\ML\NLP\stanford-ner--->java -cp stanford-ner.jar edu.stanford.nlp.ie.crf.CRFClassifier -prop chinese.meal.fpp.prop
Invoked on Thu Mar :: CST with arguments: -prop chinese.meal.fpp.prop
usePrevSequences=true
useClassFeature=true
useTypeSeqs2=true
useSequences=true
wordShape=chris2useLC
useTypeySequences=true
useDisjunctive=true
noMidNGrams=true
serializeTo=ner-model.ser.gz
maxNGramLeng=
useNGrams=true
usePrev=true
useNext=true
maxLeft=
trainFile=chinese.meal.fpp.tsv
map=word=,answer=
useWord=true
useTypeSeqs=true
numFeatures =
Time to convert docs to feature indices: 0.0 seconds
numClasses: [=O,=TIME,=QUANTITY,=UNIT,=FOOD]
numDocuments:
numDatums:
numFeatures:
Time to convert docs to data/labels: 0.0 seconds
numWeights:
QNMinimizer called on double function of variables, using M = .
An explanation of the output:
Iter The number of iterations
evals The number of function evaluations
SCALING <D> Diagonal scaling was used; <I> Scaled Identity
LINESEARCH [## M steplength] Minpack linesearch
-Function value was too high
-Value ok, gradient positive, positive curvature
-Value ok, gradient negative, positive curvature
-Value ok, gradient negative, negative curvature
[.. B] Backtracking
VALUE The current function value
TIME Total elapsed time
|GNORM| The current norm of the gradient
{RELNORM} The ratio of the current to initial gradient norms
AVEIMPROVE The average improvement / current value
EVALSCORE The last available eval score Iter ## evals ## <SCALING> [LINESEARCH] VALUE TIME |GNORM| {RELNORM} AVEIMPROVE EVALSCORE Iter evals <D> [M 1.000E-1] 9.068E2 .04s |4.550E1| {4.995E-1} 0.000E0 -
Iter evals <D> [M 1.000E0] 6.222E2 .05s |3.525E1| {3.870E-1} 2.287E-1 -
Iter evals <D> [M 1.000E0] 2.386E2 .07s |5.406E1| {5.935E-1} 9.334E-1 -
Iter evals <D> [M 1.000E0] 9.082E1 .08s |1.571E1| {1.724E-1} 2.246E0 -
Iter evals <D> [M 1.000E0] 7.031E1 .10s |1.181E1| {1.297E-1} 2.379E0 -
Iter evals <D> [M 1.000E0] 5.308E1 .11s |1.025E1| {1.125E-1} 2.681E0 -
Iter evals <D> [1M 2.740E-1] 2.988E1 .14s |7.586E0| {8.328E-2} 4.193E0 -
Iter evals <D> [1M 1.292E-1] 2.234E1 .16s |6.471E0| {7.105E-2} 4.949E0 -
Iter evals <D> [1M 1.801E-1] 1.615E1 .18s |5.573E0| {6.118E-2} 6.127E0 -
Iter evals <D> [1M 1.815E-1] 1.218E1 .24s |4.477E0| {4.915E-2} 7.346E0 -
Iter evals <D> [1M 3.119E-1] 8.873E0 .30s |4.694E0| {5.154E-2} 6.912E0 -
Iter evals <D> [1M 4.760E-1] 6.621E0 .31s |2.092E0| {2.296E-2} 3.504E0 -
Iter evals <D> [M 1.000E0] 6.093E0 .32s |1.906E0| {2.092E-2} 1.390E0 -
Iter evals <D> [M 1.000E0] 5.844E0 .33s |9.067E-1| {9.955E-3} 1.103E0 -
Iter evals <D> [M 1.000E0] 5.721E0 .33s |5.774E-1| {6.339E-3} 8.279E-1 -
Iter evals <D> [M 1.000E0] 5.660E0 .34s |3.535E-1| {3.881E-3} 4.279E-1 -
Iter evals <D> [M 1.000E0] 5.640E0 .35s |1.946E-1| {2.137E-3} 2.961E-1 -
Iter evals <D> [M 1.000E0] 5.632E0 .36s |7.832E-2| {8.599E-4} 1.868E-1 -
Iter evals <D> [M 1.000E0] 5.631E0 .38s |3.559E-2| {3.907E-4} 1.163E-1 -
Iter evals <D> [M 1.000E0] 5.631E0 .39s |2.149E-2| {2.359E-4} 5.758E-2 -
Iter evals <D> [M 1.000E0] 5.631E0 .41s |1.027E-2| {1.128E-4} 1.758E-2 -
Iter evals <D> [M 1.000E0] 5.631E0 .42s |3.631E-3| {3.986E-5} 8.218E-3 -
Iter evals <D> [M 1.000E0] 5.631E0 .44s |1.629E-3| {1.789E-5} 3.791E-3 -
Iter evals <D> [M 1.000E0] 5.631E0 .45s |9.548E-4| {1.048E-5} 1.596E-3 -
Iter evals <D> [M 1.000E0] 5.631E0 .45s |5.724E-4| {6.284E-6} 5.196E-4 -
Iter evals <D> [M 1.000E0] 5.631E0 .47s |1.578E-4| {1.732E-6} 1.686E-4 -
QNMinimizer terminated due to average improvement: | newest_val - previous_val | / |newestVal| < TOL
Total time spent in optimization: .49s
CRFClassifier training ... done [0.6 sec].
Serializing classifier to ner-model.ser.gz... done.

2. 使用训练好的Model来evaluate 一下,看看效果怎么样.

C:\my_study\ML\NLP\stanford-ner--->java -cp stanford-ner.jar edu.stanford.nlp.ie.crf.CRFClassifier -loadClassifier ner-model.ser.gz -testFile chinese.meal.fpp.test.tsv
Invoked on Thu Mar :: CST with arguments: -loadClassifier ner-model.ser.gz -testFile chinese.meal.fpp.test.tsv
testFile=chinese.meal.fpp.test.tsv
loadClassifier=ner-model.ser.gz
Loading classifier from ner-model.ser.gz ... done [0.1 sec].
我 O O
今天 O O
晚上 TIME TIME
吃 O O
了 O O
两 QUANTITY QUANTITY
盘 UNIT UNIT
回锅肉 FOOD FOOD CRFClassifier tagged words in documents at 88.89 words per second.
Entity P R F1 TP FP FN
FOOD 1.0000 1.0000 1.0000
QUANTITY 1.0000 1.0000 1.0000
TIME 1.0000 1.0000 1.0000
UNIT 1.0000 1.0000 1.0000
Totals 1.0000 1.0000 1.0000

还不错哦!

Ref:

1. Standford NLP NER: https://nlp.stanford.edu/software/CRF-NER.html

Food Log with Speech Recognition and NLP的更多相关文章

  1. 论文翻译:2015_DNN-Based Speech Bandwidth Expansion and Its Application to Adding High-Frequency Missing Features for Automatic Speech Recognition of Narrowband Speech

    论文地址:基于DNN的语音带宽扩展及其在窄带语音自动识别中加入高频缺失特征的应用 论文代码:github 博客作者:凌逆战 博客地址:https://www.cnblogs.com/LXP-Never ...

  2. Utterance-Wise Recurrent Dropout And Iterative Speaker Adaptation For Robust Monaural Speech Recognition

    单声道语音识别的逐句循环Dropout迭代说话人自适应     WRBN(wide residual BLSTM network,宽残差双向长短时记忆网络) [2] J. Heymann, L. Dr ...

  3. FPGA 17最佳论文导读 ESE: Efficient Speech Recognition Engine with Compressed LSTM on FPGA

    欢迎转载,转载请注明:本文出自Bin的专栏blog.csdn.net/xbinworld. 技术交流QQ群:433250724,欢迎对算法.机器学习技术感兴趣的同学加入. 后面陆续写一些关于神经网络加 ...

  4. [翻译]Review——How to do Speech Recognition with Deep Learning

    原文地址:https://medium.com/@ageitgey/machine-learning-is-fun-part-6-how-to-do-speech-recognition-with-d ...

  5. Speech Recognition Grammar Specification Version 1.0 JavaScript TTS 文本发音

    Speech Recognition Grammar Specification Version 1.0 https://www.w3.org/TR/speech-grammar/ W3C Recom ...

  6. 论文阅读笔记“Attention-based Audio-Visual Fusion for Rubust Automatic Speech recognition”

    关于论文的阅读笔记 论文的题目是“Attention-based Audio-Visual Fusion for Rubust Automatic Speech recognition”,翻译成中文为 ...

  7. Speech Recognition Java Code - HMM VQ MFCC ( Hidden markov model, Vector Quantization and Mel Filter Cepstral Coefficient)

    Hi everyone,I have shared speech recognition code inhttps://github.com/gtiwari333/speech-recognition ...

  8. C#的语音识别 using System.Speech.Recognition;

    using System; using System.Collections.Generic; using System.Linq; using System.Speech.Recognition; ...

  9. 第三篇:ASR(Automatic Speech Recognition)语音识别

    ASR(Automatic Speech Recognition)语音识别: 百度语音--语音识别--python SDK文档: https://ai.baidu.com/docs#/ASR-Onli ...

随机推荐

  1. logback 设置按天,文件切割大小,总共日志文件大小。

    设置按天,文件切割大小,总共日志文件大小. <?xml version="1.0" encoding="UTF-8"?> <configura ...

  2. 纪中2018暑假培训day5提高b组改题记录

    因为今天省选组也做a组,以为今天a组会很难,就做了做b组.t1和t3强行暴力,好在有t2保底.t1和正解就差一点,然而考试时死活想不起来...... 今天改题可以少改一道了!ovo 救救孩子吧!t1T ...

  3. Win32-API: 终于能正常的捕获焦点事件: WM_COMMAND、BN_SETFOCUS、EN_SETFOCUS

    学习和使用win32-api来写窗口程序算算也有二三年了. 以前有个需求,想捕获控件的焦点事件(SETFOCUS. KILLFOCUS),我一直认为应该捕获 WM_SETFOCUS 和 WM_KILL ...

  4. 项目管理干货——项目管理入门级书籍(附赠5G项目管理书籍电子版)

    各位项目经理我们都是在不断的学习和自我学习中不断成长的,所以我们需要多看书,才能做好一个项目经理,但是很多人,在挑选书籍的时候犯了难,今天我就把自己学习的时候看的那些书单整理出来,大家有需要的可以留言 ...

  5. Spring3 (事务管理)

    简介: 1.事务管理.2.整合Junit.3.整和Web 1       事务管理 1.1   回顾事务 l  事务:一组业务操作ABCD,要么全部成功,要么全部不成功. l  特性:ACID 原子性 ...

  6. 快速傅里叶变换(FFT)_转载

    FFTFFT·Fast  Fourier  TransformationFast  Fourier  Transformation快速傅立叶变换 P3803 [模板]多项式乘法(FFT) 参考上文 首 ...

  7. MySQL准备

    目录 数据库管理软件的由来 什么是数据? 什么是数据库管理系统/软件? 数据库管理的三个阶段 MySQL 概述SQL语句 安装MySQL(在命令行的操作全要用管理员权限) 将MySQL服务制作为win ...

  8. C++ vector的运用

    C++ vector 用法(#include <vector>) 标准库Vector类型 使用需要的头文件: #include <vector> Vector:Vector 是 ...

  9. 本地服务器上挂载A目录到B目录

    原因: 由于某个分区满了,切磁盘无法扩大分区空间,但是项目依赖该分区,需要继续像该分区存储文件,此时其他分区还有很大的空间,使用挂载的方式,在有空间的分区创建新目录,将新目录挂载到源目录下即可. 执行 ...

  10. python 线程(其他方法,队列,线程池,协程 greenlet模块 gevent模块)

    1.线程的其他方法 from threading import Thread,current_thread import time import threading def f1(n): time.s ...