版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1DigitalSpeechProcessing数字语音处理概论第六讲Language
Modelling语言建模讲解课件LanguageModeling:providinglinguisticconstraintstohelptheselectionofcorrectwordsProb[thecomputerislistening]>Prob[theycometutorislistsunny]Prob[计算机听声音]>Prob[店老天呻吟]
t
tThecomputerislisteningtheycomelistsunnytutor电脑听声音店老天呻吟Fig.
1Fig.
22FromFundamentalsofInformationTheoryExamplesforLanguages
0
H(S)
logMSourceofEnglishtextgeneration
thiscourseisaboutspeech.....therandomvariableisthecharacter26*2+.....<64=26
H(S)<6bits(ofinformation)percharactertherandomvariableisthewordassumetotalnumberofwords=30,000<215 H(S)<15bits(ofinformation)perwordSourceofspeechforMandarinChinese
这一门课有关语音.....therandomvariableisthesyllable(includingthetone)1300<211H(S)<11bits(ofinformation)persyllable(includingthetone)therandomvariableisthesyllable(ignoringthetone)400<29 H(S)<9bits(ofinformation)persyllable(ignoringthetone)therandomvariableisthecharacter8,000<213 H(S)<13bits(ofinformation)percharacterComparison:speech―语音,girl―女孩,computer―计算机SS3
EntropyandPerplexityP(Xi)P(xi)
EntropyandPerplexityx1xM
abc.....zABC.....ZFig.
34
EntropyandPerplexity机率分布之分散程度相同Uncertainty:选词之难度Fig.
45Perplexity
ni=3
c2ci(perplexity:混淆度)6PerplexityPerplexityofALanguageModelP(wi|ci)withrespecttoaTestCorpusDH(P;D)=,averageofalllogP(wj|cj)overthe wholecorpusD
=,logarithmofgeometricmeanofP(wj|cj)pp(P;D)=2H(P;D)
averagebranchingfactor(inthesenseofgeometricalmeanofreciprocals)e.g.P(W=w1w2...wn)=P(w1)P(w2|w1)P(w3|w1,w2)P(w4|w2,w3)P(w5|w3,w4).....thecapabilitiesofthelanguagemodelinpredictingthenextwordgiventhelinguisticconstraintsextractedfromthetrainingcorpusthesmallerthebetter,performancemeasureforalanguagemodelwithrespecttoatestcorpusafunctionofalanguagemodelPandtextcorpusD7PerplexityTrainingcorpusLanguageModelP(wi
|ci)DTestingCorpusLMTrainingPPTestingPP(P;D)8AnPerplexityAnalysisExamplewithRespecttoDifferentSubjectDomainsDomain-specificLanguageModelsTrainedwithDomainSpecificCorpusofMuchSmallerSizeveryoftenPerformBetterthanaGeneralDomainModelTrainingcorpus:Internetnewsin ChineselanguageSportssectiongivesthelowestperplexityevenwithverysmalltrainingcorpus1politics 19.6M2congress 2.7M3business 8.9M4culture 4.3M5sports 2.1M6transportation 1.6M7society 10.8M8local 8.1M9general(average) 58.1M0~~123456789Fig.
59PerplexityKLDivergenceorCross-EntropyJensen’sInequality
entropywhenp(x)isincorrectlyestimatedasq(x)(leadstosomeentropyincrease)TheTrueProbabilitiesP(wi|ci)incorrectlyestimatedasP(wi|ci)bythelanguagemodelThePerplexityisakind“Cross-Entropy”whenthetruestatisticalcharacteristicsofthetestcorpusDisincorrectlyestimatedasp(wi|ci)bythelanguagemodelH(P;D)=X(D‖P)thelargertheworseSomeonecallthis“cross-entropy”=X[p(x)‖q(x)](averagingifp(xi)isknown)(averagingbyallsamples)lawoflargenumbers10LawofLargeNumbers值次数a1n1a2n2+aknkN11SmoothingofLanguageModelsDataSparsenessmanyeventsneveroccurinthetrainingdata
e.g.Prob[Jasonimmediatelystandsup]=0becauseProb[immediately|Jason]=0smoothing:tryingtoassignsomenon-zeroprobabilitiestoalleventseveniftheyneveroccurinthetrainingdataAdd-oneSmoothingassumingalleventsoccuroncemorethanitactuallydoese.g.bigramV:totalnumberofdistinctwordsinthevocabulary12P(wi)P(wi|wi-1)P(wi|wi-2,wi-1)unigrambi-gramtrigram
Smoothing:UnseenEventsFig.
613SmoothingofLanguageModels
14SmoothingofLanguageModels
15
Good-Turing
次数出现该次数之不同event数seeneventsunseenevents:994Ananalogy:duringfishing,gettingeachkindoffishisaneventanexample:n(1)=10,n(2)=3,n(3)=2,n(4)=n(5)=n(6)=1,N=18prob(nextfishgotisofanewkind)=prob(thoseoccurringonlyonce)=
0
12
r
r+1
Fig.
716SmoothingofLanguageModelsKatzSmoothinglargecountsarereliable,sounchangedsmallcountsarediscounted,withtotalreducedcountsassignedtounseenevents,basedonGood-Turingestimates ,distributionofcountsamongunseeneventsbasedonnext-lower-ordermodel:backoffanexampleforbigram:dr:discountratioforeventswithrtimesa(wi-1,wi):suchthatthetotalcountsequaltothoseassignedN(<wi-1,wi>)/N(wi),r>r0dr‧N(<wi-1,wi>)/N(wi),r0
r>0a(wi-1,wi)P(wi),r=017
KatzSmoothing
次数不同event数unchanged
18Class-basedLanguageModelingClusteringWordswithSimilarSemantic/GrammaticBehaviorintoClassese.g.P(wi|wi-2,wi-1)
P(wi|c(wi))P(c(wi)|c(wi-2),c(wi-1)) c(wj):theclassincludingwjSmoothingeffect:back-offtoclasseswhentoofewcounts,classescomplementingthelowerordermodelsparametersizereducedLimitedDomainApplications:Rule-basedClusteringbyHumanKnowledgee.g.TellmeallflightsoffromtoonnewitemscanbeeasilyaddedwithouttrainingdataGeneralDomainApplications:Data-drivenClustering(probablyaidedbyrule-basedknowledge)JohnMarryHeShefathersistersawfounddroverodeadogcatcarbusoninthestreetroadcampusparkMyUnitedChinaAirlineEvaAirTaipeiLosAngelesSunday19Class-basedLanguageModelingData-drivenWordClusteringAlgorithmExamplesExample1: initiallyeachwordbelongstoadifferentclusterineachiterationapairofclusterswasidentifiedandmergedintoaclusterwhichminimizestheoverallperplexitystopswhennofurther(significant)reductioninperplexitycanbeachieved
Reference:“Cluster-basedN-gramModelsofNaturalLanguage”, ComputationalLinguistics,1992(4),pp.467-479Example2: Prob[W=w1w2w3....wn]=ΠProb(wi|w1,w2....wi-1)=ΠProb(wi|hi) hi:w1,w2,...wi-1,historyofwiclusteringthehistoriesintoclassesbydecisiontrees(CART)developingaquestionset,entropyasacriterionmayincludebothgrammaticandstatisticalknowledge,bothlocalandlong-distancerelationship
Reference:“ATree-basedStatisticalLanguageModelforNatural LanguageSpeechRecognition”,IEEETrans.Acoustics, SpeechandSignalProcessing,1989,37(7),pp.1001-1008ni=1ni=120AnExampleClass-basedChineseLanguageModelAThree-stageHierarchicalWordClassificationAlgorithmstage1:classificationby198
POSfeatures(syntactic&semantic)eachwordbelongingtooneclassonlyeachclasscharacterizedbyasetofPOS’sstage2:furtherclassificationwithdata-drivenapproachesstage3:finalmergingwithdata-drivenapproachesallwords.....POSfeatureiPOSfeaturej....................................................................坐乘搭(take)(ride)驾驶开(drive)(steer)汽车巴士火车飞机(bus)(car)(train)(airplane)(ride)rarelyusedwordsclassifiedbyhumanknowledgebothdata-drivenandhuman-knowledge-driven21POSfeatures
Data-drivenApproachExample组织(_,_,_,_...)Fig.
822StructuralFeaturesofChineseLanguageAlmostEachCharacterwithItsOwnMeaning,thusPlayingSomeLinguisticRoleIndependentlyNoNaturalWordBoundariesinaChineseSentence
计算机科技的进步改变了人类的生活和工作方式wordsegmentationnotuniquewordsnotwelldefinedcommonlyacceptedlexiconnotexistingOpen(EssentiallyUnlimited)VocabularywithFlexibleWordingStructure–
newwordseasilycreatedeveryday 电(electricity)+脑(brain)→计算机(computer)–longwordarbitrarilyabbreviated我省大学(TaiwanUniversity)→台大–name/title李登辉前xx(formerPresidentT.H.Lee)→李前xx登辉–unlimitednumberofcompoundwords高(high)+速(speed)+公路(highway)→高速公路(freeway)DifficultforWord-basedApproachesPopularlyUsedinAlphabeticLanguages
–seriousout-of-vocabulary(OOV)problem23Word-basedandCharacter-basedChineseLanguageModelsWord-basedandClass-basedLanguageModelingwordsaretheprimarybuildingblocksofsentencesmoreinformationmaybeaddedlexiconplaysthekeyroleflexiblewordingstructuremakesitdifficulttohaveagoodenoughlexiconaccuratewordsegmentationneededfortrainingcorpusserious“out-of-vocabulary(OOV)”probleminmanycasesallcharactersincludedas“mono-characterwords”Character-basedLanguageModelingavoidingthedifficultproblemofflexiblewordingstructureandundefinedwordboundariesrelativelyweakwithoutword-levelinformationhigherorderN-gramneededforgoodperformance,whichisrelativelydifficulttorealizeIntegrationofClass-based/Word-based/Character-basedModelsword-basedmodelsaremorepreciseforfrequentlyusedwordsback-offtoclass-basedmodelsforeventswithinadequatecountseachsinglewordisaclassiffrequentenoughcharacter-basedmodelsofferflexibilityforwordingstructure24SegmentPatternLexiconforChinese–AnExampleApproachSegmentPatternsReplacingtheWordsintheLexiconsegmentsofafewcharactersoftenappeartogether:oneorafewwordsregardlessoftheflexiblewordingstructureautomaticallyextractedfromthetrainingcorpus(ornetworkinformation)statisticallyincludingallimportantpatternsbyminimizingtheperplexityAdvantagesbypassingtheproblemthatthewordis
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年互联网保险市场分析与挑战报告
- 2026年洗鞋皮具护理市场品牌案例分析报告
- 2026年5G技术赋能智慧物流配送创新报告
- 2026年环保型增塑剂行业建设报告及市场投资分析
- 2026年驱油用磺酸盐类表面活性剂市场创新策略分析报告
- 国家开放大学工程流体力学核心内容精简版
- 2026年宠物智能基因检测行业创新报告
- 卫生专业技术资格初级(师)专业专业知识理化检验技术(211)考前速记清单
- 2026年国庆知识竞赛试题带答案
- 2026年中级会计职称考试经济法专项训练模拟试题及参考答案
- 张定宇课件教学课件
- 体育运动中的功能性训练
- 生产安全事故应急预案管理办法2025年修订
- 虫鼠害防治专项调查报告范本
- 统编版三年级语文上学期第六单元综合提优卷(B)(含答案)
- 教师如何有效运用信息技术
- 中国非金属矿产行业调查报告
- 2025防止光伏发电站火灾事故的重点要求
- 供销物流仓储管理制度
- 2025年烟花爆竹经营单位主要负责人模拟考试题及答案
- 《高龄脊柱融合术加速康复外科关键措施管理指南(2024版)》解读
评论
0/150
提交评论