Open in TheBrain

NLP Natural Language Thrun Norvig Course

<p>Dec 25, 2011 09:46 PM

&#160;

Peter Norvig lectures...

&#160;

use language sets us apart from all other animals and machines and

want to talk to our computers...

&#160;

want our computers to be smarter... &#160;need to read text and make sense of it...

&#160;

Language Models...

&#160;

1) &#160;sequences of letters &#160;(scrabble letters) &#160;&#160;CAB... probabilistic and word-based

learned from data

&#160;

2) trees &#160;like &#160;Sentence = &#160;noun phrase + verb phrase

noun phrase = name = Sam and &#160;&#160;VP = verb = slept &#160;&#160;SAM SLEPT

this is logical; trees and categories... &#160;deep structure

these are hand-coded... linguists write them down

&#160;

but model 1 is probabilistic and learned...

&#160;

but u cud &#160;go back and forth and have probab trees etc.

&#160;

Honk if you love the bag of words model.... gets idea across &#160;&#160;bumpersticker....

&#160;

every word is independent &#160;(first stab at problem)

&#160;

P = prob model &#160;eg &#160;P(w1 w2 w3 &#160;wn) &#160;&#160;P(w1:n) &#160;prob of the sequence of w1 &#160;etc.

&#160;

conditional probability = &#160;PRODUCT of all the sub probs of &#160;w (i-1) &#160;etc.

&#160;

cud make Markov assumption.... &#160;depdns only on previous...

&#160;

stationarity... &#160;does not depend on 1st sentence or whether its the Kth sentence &#160;(but does depend

on context of the word)

&#160;

smoothing eg laplace ...

&#160;

saw this in spam filtering model...

&#160;

may want to recover hiddden variables like parts of speech

&#160;

or consider &#160;New York City &#160;as a single phrase...

&#160;

use language for learning....

&#160;

he typed in full moon and ice cream &#160;to Google trends...

&#160;

ice cream... popular in the summer... not so much in the winter... &#160;can get solar year from this...

&#160;

google &#160;icream sandwich... gener a blip ...

&#160;

moon phase... just see users use full moon once a month...

&#160;

N gram models of language... &#160;what r we giving up and what r we getting..

&#160;

unigram.... &#160;&#160;no adjacency...

&#160;

bigram .... prob of a word given the previous word...

&#160;

hark ye; &#160;if thou; &#160;liberl opposition...

&#160;

trigram &#160;models...

I will never yield; &#160;I woud learn of noble edwward's sons...

&#160;

n=4 &#160;&#160;four grams....

&#160;

betwixt their two estates...

even to the frozen ridges f the alps... &#160;I know my duty...

capturing some coherency... but not everything....

&#160;

probabilistic letter models:

scrabble letter &#160;&#160;XJVY &#160;&#160;&#160;good for dealing with unique words...

&#160;

Hello, World &#160;or Guten Tag, Welt

Salam Dunya

&#160;

can get 99% accuracy of language id just by looking at letter probs...

&#160;

&#160;

Peope: &#160;Steve &#160;or Bill are common as people

Places &#160;San is common, New is common

Drugs &#160;ending in x is common... starting with z is common &#160;Zyrtec

&#160;

Gzip command: &#160;for classification

&#160;

gzip is a compression algorithm...

eg is_ &#160;can be represented as only one byte to compress it

English will have an entry for compresison for is_ ...

&#160;

Segmentation.... &#160;how to break it upinto words...

does the first word in chinese correspond to one word or what...

&#160;

choosespain.com &#160;&#160;segmentation problem

&#160;

s* = best segmentation = &#160;maxP(w1:n)

can use naive bayes (each word is independent...

&#160;

nowisthetime &#160;eg.... 11 spaces in btwn characters &#160;can either occur or not there,

so answer is &#160;&#160;2(n-1)...

&#160;

&#160;

&#160;

&#160;

&#160;

&#160;

&#160;

&#160;</p>