algorithms for nlptbergkir/11711fa17/fa17 11-711 lecture 5...improving on n-grams? n-grams don’t...

71
Speech Signals Taylor Berg-Kirkpatrick – CMU Slides: Dan Klein – UC Berkeley Algorithms for NLP

Upload: phamkhuong

Post on 19-May-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SpeechSignalsTaylorBerg-Kirkpatrick– CMU

Slides:DanKlein– UCBerkeley

AlgorithmsforNLP

Page 2: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

MaximumEntropyModels

Page 3: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

ImprovingonN-Grams?§ N-gramsdon’tcombinemultiplesourcesofevidencewell

§ Here:§ “the”givessyntacticconstraint§ “demolition”givessemanticconstraint§ Unlikelytheinteractionbetweenthesetwohasbeendensely

observedinthisspecificn-gram

§ We’dlikeamodelthatcanbemorestatisticallyefficient

P(construction|Afterthedemolitionwascompleted,the)

Page 4: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SomeDefinitions

INPUTS

CANDIDATES

FEATURE VECTORS

closethe____

CANDIDATE SET

yoccursinx

“close”inx Ù y=“door”x-1=“the”Ù y=“door”

TRUE OUTPUTS

{door,table,…}

table

door

x-1=“the”Ù y=“table”

Page 5: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

MoreFeatures,LessInteraction

§ N-Grams

§ Skips

§ Lemmas

§ Caching

x=closingthe____,y=doors

x-1=“the”Ù y=“doors”

x-2=“closing”Ù y=“doors”

x-2=“close”Ù y=“door”

yoccursinx

Page 6: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Data: FeatureImpact

Features TrainPerplexity TestPerplexity

3 gram indicators 241 350

1-3grams 126 172

1-3grams+skips 101 164

Page 7: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Exponential Form§ Weights Features

§ Linearscore

§ Unnormalized probability

§ Probability

Page 8: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

LikelihoodObjective§ Modelform:

§ Log-likelihoodoftrainingdata

P (y|x,w) = exp(w

>f(x, y))P

y0 exp(w>f(x, y

0))

=

X

i

0

@w

>f(xi, y

⇤i )� log

X

y0

exp(w

>f(xi, y

0))

1

A

L(w) = log

Y

i

P (y

⇤i |xi, w) =

X

i

log

exp(w

>f(xi, y

⇤i ))P

y0 exp(w>f(xi, y

0))

!

Page 9: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Training

Page 10: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

HistoryofTraining

§ 1990’s:Specializedmethods(e.g.iterativescaling)

§ 2000’s:General-purposemethods(e.g.conjugategradient)

§ 2010’s:Onlinemethods(e.g.stochasticgradient)

Page 11: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

WhatDoesLLLookLike?§ Example

§ Data:xxxy§ Twooutcomes,xandy§ Oneindicatorforeach§ Likelihood

Page 12: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

ConvexOptimization§ Themaxent objectiveisanunconstrainedconvexproblem

§ Oneoptimalvalue*,gradientspointtheway

Page 13: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Gradients

Countoffeaturesundertargetlabels

Expectedcountoffeaturesundermodelpredictedlabeldistribution

Page 14: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

GradientAscent§ Themaxent objectiveisanunconstrainedoptimization

problem

§ GradientAscent§ Basicidea:moveuphillfromcurrentguess§ Gradientascent/descentfollowsthegradientincrementally§ Atlocaloptimum,derivativevectoriszero§ Willconvergeifstepsizesaresmallenough,butnotefficient§ Allweneedistobeabletoevaluatethefunctionanditsderivative

Page 15: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

(Quasi)-Newton Methods§ 2nd-Ordermethods:repeatedlycreateaquadratic

approximationandsolveit

§ E.g.LBFGS,whichtracksderivativetoapproximate(inverse)Hessian

Page 16: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Regularization

Page 17: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Regularization Methods

§ Earlystopping

§ L2:L(w)-|w|22

§ L1:L(w)-|w|

Page 18: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

RegularizationEffects

§ Earlystopping:don’tdothis

§ L2:weightsstaysmallbutnon-zero

§ L1:manyweightsdriventozero§ Goodforsparsity§ UsuallybadforaccuracyforNLP

Page 19: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Scaling

Page 20: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Whyis ScalingHard?

§ Bignormalizationterms

§ Lotsofdatapoints

Page 21: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

HierarchicalPrediction§ Hierarchicalprediction /softmax [Mikolov etal2013]

§ Noise-ContrastiveEstimation[Mnih,2013]

§ Self-Normalization[Devlin,2014]

Image:ayende.com

Page 22: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

StochasticGradient§ Viewthegradientasanaverageoverdatapoints

§ Stochasticgradient:takeastepeachexample(ormini-batch)

§ Substantialimprovementsexist,e.g.AdaGrad (Duchi,11)

Page 23: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Log-linearParameterization§ Modelform:

§ LearnbyfollowinggradientoftrainingLL:

@L(w)

@w

=X

i

f(xi

, y

⇤i

)�X

i

⇣EP (y|xi;w) [f(xi

, y)]⌘

P (y|x;w) = exp(w

>f(x, y))P

y0 exp(w>f(x, y

0))

Page 24: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Mixed Interpolation§ Butcan’twejustinterpolate:

§ P(w|most recentwords)§ P(w|skip contexts)§ P(w|caching)§ …

§ Yes,andpeopledo(well,did)§ Butadditivecombinationtendstoflattendistributions,notzerooutcandidates

Page 25: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

NeuralLMs

Page 26: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Neural LMs

Image:(Bengio etal,03)

Page 27: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Neural vsMaxent§ Maxent LM

§ SimpleNeuralLM

� nonlinear,e.g.tanh

P (y|x;w) / exp(w

>f(x, y))

P (y|x;A,B,C) / exp

⇣A

>y

�B

>C

x

�⌘

Page 28: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Neural LM Example

x-1= thex-2= closing

Cclosing Cthe1.27.4… –3.31.1…

0.1

Aman Adoor Adoors …

2.3 1.5 …

-0.99 …h = ��B>C

x

P (y|x) / e

(A>h)P (y|x) / e

(A>h)

Page 29: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Neural LMs

Image:(Bengio etal,03)

Page 30: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Decision Trees/Forests

§ Decisiontrees?§ Goodfornon-lineardecisionproblems§ Randomforestscanimprovefurther[XuandJelinek,2004]§ Pathstoleavesbasicallylearnconjunctions§ GeneralcontrastbetweenDTsandlinearmodels

Prev Word?

…lastverb?

Page 31: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SpeechSignals

Page 32: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

n Frequencygivespitch;amplitudegivesvolume

n Frequenciesateachtimesliceprocessedintoobservationvectors

s p ee ch l a b

ampl

itude

SpeechinaSlide

……………………………………………..x12x13x12x14x14………..

Page 33: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Articulation

Page 34: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

TextfromOhala,Sept2001,fromSharonRoseslide

Sagittal sectionofthevocaltract(Techmer 1880)

Nasalcavity

Pharynx

Vocalfolds(inthelarynx)

Trachea

Lungs

ArticulatorySystem

Oralcavity

Page 35: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SpaceofPhonemes

§ Standardinternationalphoneticalphabet(IPA)chartofconsonants

Page 36: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Place

Page 37: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

PlacesofArticulation

labial

dentalalveolar post-alveolar/palatal

velaruvular

pharyngeal

laryngeal/glottal

FigurethankstoJenniferVenditti

Page 38: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Labialplace

bilabial

labiodental

FigurethankstoJenniferVenditti

Bilabial:p,b,m

Labiodental:f,v

Page 39: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Coronalplace

dentalalveolar post-alveolar/palatal

FigurethankstoJenniferVenditti

Dental:th/dh

Alveolar:t/d/s/z/l/n

Post:sh/zh/y

Page 40: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

DorsalPlace

velaruvular

pharyngeal

FigurethankstoJenniferVenditti

Velar:k/g/ng

Page 41: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SpaceofPhonemes

§ Standardinternationalphoneticalphabet(IPA)chartofconsonants

Page 42: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Manner

Page 43: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

MannerofArticulation§ Inadditiontovaryingbyplace,soundsvaryby

manner

§ Stop:completeclosureofarticulators,noairescapesviamouth§ Oralstop:palateisraised(p,t,k,b,d,g)§ Nasalstop:oralclosure,butpalateislowered(m,

n,ng)

§ Fricatives:substantialclosure,turbulent:(f,v,s,z)

§ Approximants:slightclosure,sonorant:(l,r,w)

§ Vowels:noclosure,sonorant:(i,e,a)

Page 44: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SpaceofPhonemes

§ Standardinternationalphoneticalphabet(IPA)chartofconsonants

Page 45: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Vowels

Page 46: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

VowelSpace

Page 47: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Acoustics

Page 48: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

“Shejusthadababy”

§ Whatcanwelearnfromawavefile?§ Nogapsbetweenwords(!)§ Vowelsarevoiced,long,loud§ Lengthintime=lengthinspaceinwaveformpicture§ Voicing:regularpeaksinamplitude§ Whenstopsclosed:nopeaks,silence§ Peaks=voicing:.46to.58(vowel[iy],fromsecond.65to.74(vowel[ax])andsoon

§ Silenceofstopclosure(1.06to1.08forfirst[b],or1.26to1.28forsecond[b])

§ Fricativeslike[sh]:intenseirregularpattern;see.33to.46

Page 49: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Time-DomainInformation

bad

pad

spat

pat

ExamplefromLadefoged

Page 50: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SimplePeriodicWavesofSound

Time (s)0 0.02

œ0.99

0.99

0

• Yaxis:Amplitude=amountofairpressureatthatpointintime• Zeroisnormalairpressure,negativeisrarefaction

• Xaxis:Time.• Frequency=numberofcyclespersecond.• 20cyclesin.02seconds=1000cycles/second=1000Hz

Page 51: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

ComplexWaves:100Hz+1000Hz

Time (s)0 0.05

œ0.9654

0.99

0

Page 52: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Spectrum

100 1000FrequencyinHz

Amplitu

de

Frequencycomponents(100and1000Hz)onx-axis

Page 53: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Partof[ae]waveformfrom“had”

§ Notecomplexwaverepeatingninetimesinfigure§ Plussmallerwaveswhichrepeats4timesforeverylarge

pattern§ Largewavehasfrequencyof250Hz(9timesin.036seconds)§ Smallwaveroughly4timesthis,orroughly1000Hz§ Twolittletinywavesontopofpeakof1000Hzwaves

Page 54: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SpectrumofanActualSoundwave

Frequency (Hz)0 5000

0

20

40

Page 55: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

BacktoSpectra§ Spectrumrepresentsthesefreqcomponents§ ComputedbyFouriertransform,algorithmwhichseparates

outeachfrequencycomponentofwave.

§ x-axisshowsfrequency,y-axisshowsmagnitude(indecibels,alogmeasureofamplitude)

§ Peaksat930Hz,1860Hz,and3020Hz.

Page 56: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Source/Channel

Page 57: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

WhythesePeaks?

§ Articulationprocess:§ Thevocalcordvibrations

createharmonics§ Themouthisanamplifier§ Dependingonshapeof

mouth,someharmonicsareamplifiedmorethanothers

Page 58: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

FiguresfromRatree Wayland

A3

A4

A2

C4 (middle C)

C3

F#3

F#2

Vowel[i]atincreasingpitches

Page 59: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

ResonancesoftheVocalTract

§ Thehumanvocaltractasanopentube:

§ Airinatubeofagivenlengthwilltendtovibrateatresonancefrequencyoftube.

§ Constraint:Pressuredifferentialshouldbemaximalat(closed)glottalendandminimalat(open)lipend.

Closedend Openend

Length17.5cm.

FigurefromW.Barry

Page 60: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

FromSundberg

Page 61: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Computingthe3FormantsofSchwa

§ LetthelengthofthetubebeL§ F1 =c/l1 =c/(4L)=35,000/4*17.5=500Hz§ F2 =c/l2 =c/(4/3L)=3c/4L=3*35,000/4*17.5=1500Hz§ F3 =c/l3 =c/(4/5L)=5c/4L=5*35,000/4*17.5=2500Hz

§ Soweexpectaneutralvoweltohave3resonancesat500,1500,and2500Hz

§ Thesevowelresonancesarecalledformants

Page 62: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

FromMarkLiberman

Page 63: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

SeeingFormants:theSpectrogram

Page 64: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

VowelSpace

Page 65: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

Spectrograms

Page 66: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

HowtoReadSpectrograms

§ [bab]:closureoflipslowersallformants:sorapidincreaseinallformantsatbeginningof"bab”

§ [dad]:firstformantincreases,butF2andF3slightfall§ [gag]:F2andF3cometogether:thisisacharacteristicof

velars.Formanttransitionstakelongerinvelarsthaninalveolars orlabials

FromLadefoged “ACourseinPhonetics”

Page 67: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

“Shecamebackandstartedagain”

1.lotsofhigh-freqenergy3.closurefork4.burstofaspirationfork5.ey vowel;faint1100Hzformantisnasalization6.bilabialnasal7.shortbclosure,voicingbarelyvisible.8.ae;noteupwardtransitionsafterbilabialstopatbeginning9.noteF2andF3comingtogetherfor"k"

FromLadefoged “ACourseinPhonetics”

Page 68: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint
Page 69: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

DerivingSchwa

§ Reminderofbasicfactsaboutsoundwaves§ f=c/l§ c=speedofsound(approx35,000cm/sec)§ Asoundwithl=10meters:f=35Hz(35,000/1000)§ Asoundwithl=2centimeters:f=17,500Hz(35,000/2)

Page 70: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

AmericanEnglishVowelSpace

FRONT BACK

HIGH

LOW

iy

ih

eh

ae aa

ao

uw

uh

ahax

ix ux

FiguresfromJenniferVenditti,H.T.Bunnell

Page 71: Algorithms for NLPtbergkir/11711fa17/FA17 11-711 lecture 5...Improving on N-Grams? N-grams don’t combine multiple sources of evidence well Here: “the” gives syntactic constraint

DialectIssues

§ Speechvariesfromdialecttodialect(examplesareAmericanvs.BritishEnglish)§ Syntactic(“Icould”vs.“Icould

do”)§ Lexical(“elevator”vs.“lift”)§ Phonological§ Phonetic

§ Mismatchbetweentrainingandtestingdialectscancausealargeincreaseinerrorrate

American British

all

old