




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、NLP and WordEmbeddingsWord representationdeeplearning.aiWord representationV = a, aaron, , zulu, 1-hot representationWoman (9853)Apple (456)Orange (6257)Man (5391)King (4914)Queen (7157)I want a glass of orange.I want a glass of apple .000010000000100001000000001000000100100000Andrew NgFeaturized re
2、presentation: word embeddingMan (5391)Woman (9853)King (4914)Queen (7157)Apple (456)Orange (6257)0.97-0.950.000.010.950.93-0.010.000.70.690.03-0.020.020.010.950.97I want a glass of orange .I want a glass of apple .Andrew NgVisualizing word embeddingsAndrew Ngvan der Maaten and Hinton., 2008. Visuali
3、zing data using t-SNEmanwomandogkingcatqueenfishgrap applethree foureoneorangetwoNLP and WordEmbeddingsUsing wordembeddingsdeeplearning.aiNamed entity recognition example101000SallyJohnsonisanorangefarmerRobertLinisanapplefarmerAndrew NgTransfer learning and word embeddings1.Learn word embeddings fr
4、om large text corpus. (1-100B words)(Or download pre-trained embedding online.)2.Transfer embedding to new task with smaller training set. (say, 100k words)3.Optional: Continue to finetune the word embeddings with new data.Andrew NgRelation to faceencoding$(&)f($(&)*$()f($()Taigman et. al., 2014. De
5、epFace: Closing the gap to human level performanceAndrew NgNLP and WordEmbeddingsProperties of wordembeddingsdeeplearning.aiAnalogiesMan (5391)Woman (9853)King (4914)Queen (7157)Apple (456)Orange (6257)Gender Royal AgeFood10.010.030.090.970.950.690.0110.020.020.01-0.950.930.700.020.00-0.010.030.950.
6、010.00-0.020.97Mikolov et. al., 2013, Linguistic regularities in continuous space word representationsAndrew NgAnalogies using word vectors()*+ (,-)*+ (/0+1 (?Andrew Ngmandogkingwomancatqueenfishthreefourgrapeapple onetwoorangeCosine similarity345(, (/0+1 ()*+ (,-)*+)Man:Woman as Boy:Girl Ottawa:Can
7、ada as Nairobi:Kenya Big:Bigger as Tall:TallerYen:Japan as Ruble:RussiaAndrew NgNLP and WordEmbeddingsEmbedding matrixdeeplearning.aiEmbedding matrixIn practice, use specialized function to look up an embedding.Andrew NgNLP and WordEmbeddingsLearning wordembeddingsdeeplearning.aiNeural language mode
8、lI4343want9665aglassoforange.1385261636257Iwant aglass oforange*+,+,45+,+,*-./*05-./5044*,1/245,1/25.0.,4*.0.,*.2/35.2/34Bengio et. al., 2003, A neural probabilistic language modelAndrew NgOther context/target pairsI want a glass of orange juice to go along with my cereal.Context: Last 4 words.4 wor
9、ds on left & rightLast 1 wordNearby 1 wordAndrew NgNLP and WordEmbeddingsWord2Vecdeeplearning.aiSkip-gramsI want a glass of orange juice to go along with my cereal.Mikolov et. al., 2013. Efficient estimation of word representations in vector space.Andrew NgModelVocab size = 10,000kAndrew NgProblems
10、with softmax classification(&)%*!#=&()-.,.01-*%,How to sample the context #?Andrew NgNLP and WordEmbeddingsNegative samplingdeeplearning.aiDefining a new learning problemI want a glass of orange juice to go along with my cereal.Mikolov et. al., 2013. Distributed representation of words and phrases a
11、nd their compositionalityAndrew NgModelSoftmax:(&)%*! #=context orange orange orange orange orange(wordjuicetarget?10000-.,. %&, )*01-king book the ofAndrew NgSelecting negative examplescontext orange orange orange orange orangewordjuice king book the oftarget?10000Andrew NgNLP and WordEmbeddingsGlo
12、Ve word vectorsdeeplearning.aiGloVe (globalvectors forword representation)I want a glass of orange juice to go along with my cereal.Pennington et. al., 2014. GloVe: Global vectors for word representationAndrew NgModelAndrew NgA note on the featurization view of word embeddingsMan (5391)Woman (9853)K
13、ing (4914)Queen (7157)Gender Royal AgeFood10.010.030.090.970.950.690.0110.020.020.01-0.950.930.700.026minimize 78,888 78,888 (,-.+ 0 02 log )*+*+*+*:7+:7Andrew NgNLP and WordEmbeddingsSentimentclassificationdeeplearning.aiSentiment classificationproblem!The dessert is excellent.Service was quite slo
14、w.Good for a quick meal, but nothing special.Completely lacking in good taste, good service, and good ambience.Andrew NgSimple sentiment classification modelThe8928dessert2468is4694excellent3180The#$%&$,-$%&$desert#&($,-&($is#(%,-(%excellent#)*$+,-)*$+“Completely lacking in good taste, good service,
15、 and good ambience.”Andrew NgRNN for sentiment classification8:;+-*$6&-%(-&7-)$&-)+,Completelylackingingood.ambienceAndrew Ng:;*+:;:;):;&:;*softmaxNLP and WordEmbeddingsDebiasing wordembeddingsdeeplearning.aiThe problem of bias in word embeddingsMan:Woman as King:QueenMan:Computer_Programmer as Woma
16、n: HomemakerFather:Doctor as Mother:NurseWord embeddings can reflect gender, ethnicity, age, sexual orientation, and other biases of the text used to train the model.Bolukbasi et. al., 2016. Man is to computer programmer as woman is to homemaker? Debiasing word embeddingsAndrew NgAddressing bias in word e
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 销售税务常识培训课件
- 健康饮食产业园项目质量管理方案(参考)
- 2025年双门轿跑车合作协议书
- 2025年汽车尾气自动测定仪合作协议书
- 乡城流动中的中国男性婚姻挤压绪论
- 2025年临床前CRO项目发展计划
- 物业服务委托合同 (二)
- 2025年无机电子材料合作协议书
- 2025年黑龙江省中考生物试卷(含答案)
- 2025年闲置物品调剂回收项目合作计划书
- 杭州转贷基金管理办法
- 老北京胡同文化课件
- 公司安全隐患排查记录表
- 粮食的形态与化学组成第二节粮食的主要化学成分下64课件
- 儿科护士考试试题及答案
- 创新社区管乐团活动方案
- 中国农田水利行业发展前景及发展策略与投资风险研究报告2025-2028版
- 金氏五行升降中医方集
- 前列腺癌根治术护理查房课件
- 2021-2022学年人教版数学六年级上册第一单元测试卷【含答案】
- 《别墅设计任务书》word版
评论
0/150
提交评论