




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter5
NaturalLanguageProcessing
Naturallanguageprocessing(NLP)isoneofthemostimportanttechnologiesoftheinformationage,andacrucialpartofartificialintelligence.ApplicationsofNLPareeverywherebecausepeoplecommunicatealmosteverythinginlanguage:websearch,advertising,emails,customerservice,languagetranslation,medicalreports,etc.Inrecentyears,DeepLearningapproacheshaveobtainedveryhighperformanceacrossmanydifferentNLPtasks,usingsingleend-to-endneuralmodelsthatdonotrequiretraditional,task-specificfeatureengineering.TextA自然语言处理是信息时代最重要的技术之一,是人工智能的重要组成部分。自然语言处理的应用无处不在,因为人们几乎用语言交流一切:网络搜索、广告、电子邮件、客户服务、语言翻译、医学报告等。近年来,深度学习方法在许多不同的自然语言处理任务中都获得了非常高的性能,通过使用单一的端到端神经模型,不需要传统的、特定于任务的工程特性。WhatisNaturalLanguageProcessing?NLPisawayforcomputerstoanalyze,understand,andderivemeaningfromhumanlanguageinasmartandusefulway.ByutilizingNLP,developerscanorganizeandstructureknowledgetoperformtaskssuchasautomaticsummarization,translation,namedentityrecognition,relationshipextraction,sentimentanalysis,speechrecognition,andtopicsegmentation.什么是自然语言处理?自然语言处理是计算机从人类语言中分析、理解和获得意义的一种聪明而有用的方法。利用自然语言处理,开发人员可以组织和结构化知识来执行自动摘要、翻译、命名实体识别、关系提取、情感分析、语音识别和主题分割等任务。“Apartfromcommonwordprocessoroperationsthattreattextlikeameresequenceofsymbols,NLPconsidersthehierarchicalstructureoflanguage:severalwordsmakeaphrase,severalphrasesmakeasentenceand,ultimately,sentencesconveyideas,”JohnRehling,anNLPexpertatMeltwaterGroup,saidinHowNaturalLanguageProcessingHelpsUncoverSocialMediaSentiment.“Byanalyzinglanguageforitsmeaning,NLPsystemshavelongfilledusefulroles,suchascorrectinggrammar,convertingspeechtotextandautomaticallytranslatingbetweenlanguages.”“除了常见的字处理程序操作,把文字视为符号序列,自然语言处理还考虑语言的层次结构:一些单词短语,几个短语造一个句子,最终,句子表达想法。”
JohnRehling,Meltwater小组的自然语言处理专家,在自然语言处理如何帮助揭示社交媒体表示情绪。“通过分析语言的意义,自然语言处理系统长期以来一直扮演着重要的角色,如纠正语法、将语音转换为文本以及在语言之间自动翻译。”NLPisusedtoanalyzetext,allowingmachinestounderstandhowhuman’sspeak.Thishuman-computerinteractionenablesreal-worldapplicationslikeautomatictextsummarization,sentimentanalysis,topicextraction,namedentityrecognition,parts-of-speechtagging,relationshipextraction,stemming,andmore.NLPiscommonlyusedfortextmining1,machinetranslation,andautomatedquestionanswering.自然语言处理用于分析文本,使机器能够理解人类的语言。这种人机交互支持实际应用程序,如自动文本摘要、情感分析、主题提取、命名实体识别、词性标注、关系提取、词干提取等。自然语言处理通常用于文本挖掘、机器翻译和自动回答问题。NLPischaracterizedasahardproblemincomputerscience.Humanlanguageisrarelyprecise,orplainlyspoken.Tounderstandhumanlanguageistounderstandnotonlythewords,buttheconceptsandhowthey’relinkedtogethertocreatemeaning.Despitelanguagebeingoneoftheeasiestthingsforhumanstolearn,theambiguityoflanguageiswhatmakesnaturallanguageprocessingadifficultproblemforcomputerstomaster.自然语言处理是计算机科学中的一个难题。人类的语言很少是精确的,或者说清楚的。要理解人类语言,不仅要理解单词,还要理解概念以及它们是如何联系在一起来创造意义的。尽管语言是人类最容易学习的东西之一,但语言的模糊性使自然语言处理成为计算机难以掌握的难题。WhatCanDevelopersUseNLPAlgorithmsFor?NLPalgorithmsaretypicallybasedonmachinelearningalgorithms.Insteadofhand-codinglargesetsofrules,NLPcanrelyonmachinelearningtoautomaticallylearntheserulesbyanalyzingasetofexamples(i.e.alargecorpus,likeabook,downtoacollectionofsentences),andmakingastaticalinference.Ingeneral,themoredataanalyzed,themoreaccuratethemodelwillbe.开发人员可以使用自然语言处理算法做什么?自然语言处理算法通常基于机器学习算法。自然语言处理不需要手工编码大量的规则,它可以依靠机器学习,通过分析一组例子(例如,一个大的语料库,像一本书,归结为一组句子),进行静态推理,自动学习这些规则。一般来说,分析的数据越多,模型就越准确。SummarizeblocksoftextusingSummarizertoextractthemostimportantandcentralideaswhileignoringirrelevantinformation.CreateachatbotusingParseyMcParseface,alanguageparsingdeeplearningmodelmadebyGooglethatusesPoint-of-Speechtagging.使用摘要器总结文本块,以提取最重要和中心的思想,同时忽略无关的信息。使用ParseyMcParseface创建聊天机器人,ParseyMcParseface是一种由谷歌制作的语言分析深度学习模型,它使用了言语点标记。AutomaticallygeneratekeywordtagsfromcontentusingAutoTag,whichleveragesLDA2,atechniquethatdiscoverstopicscontainedwithinabodyoftext.Identifythetypeofentityextracted,suchasitbeingaperson,place,ororganizationusingNamedEntityRecognition.使用自动标签从内容自动生成关键字标记,自动标签利用文档主题生成模型,这种技术可以发现文本正文中包含的主题。识别提取的实体的类型,例如使用命名实体识别的人、地点或组织。UseSentimentAnalysistoidentifythesentimentofastringoftext,fromverynegativetoneutraltoverypositive.Reducewordstotheirroot,orstem,usingPorterStemmer3,orbreakuptextintotokensusingtokenizer.用情绪分析来识别一串文字的情绪,从非常消极到中性再到非常积极。使用英文分词算法将单词减少到词根或词干,或者使用记号赋予器将文本分解为记号。ExampleNaturalLanguageProcessingUseCasesSocialmediaanalysisisagreatexampleofNLPuse.Brandstrackconversationsonlinetounderstandwhatcustomersaresaying,andgleaninsightintouserbehavior.“OneofthemostcompellingwaysNLPoffersvaluableintelligenceisbytrackingsentiment—thetoneofawrittenmessage(tweet,Facebookupdate,etc.)—andtagthattextaspositive,negativeorneutral,”Rehlingsaid.自然语言处理应用案例社交媒体分析是自然语言处理使用的一个很好的例子。品牌跟踪在线对话,以了解客户在说什么,并收集对用户行为的洞察。Rehling说:“通过追踪情绪,自然语言处理可以提供有价值的信息——书面信息(推特、Facebook更新等)的语气——并将其标记为积极的、消极的或中性的。”BuildyourownsocialmediamonitoringtoolStartbyusingthealgorithmRetrieveTweetsWithKeywordtocaptureallmentionsofyourbrandnameonTwitter.Inourcase,wesearchformentionsofAlgorithmia.Then,pipetheresultsintotheSentimentAnalysisalgorithm,whichwillassignasentimentratingfrom0-4foreachstring(Tweet).建立自己的社交媒体监控工具首先,使用这个算法检索带有关键字的tweet,以在Twitter上捕捉所有提到您品牌的信息。在我们的例子中,我们寻找提到的算法。然后,将结果导入情绪分析算法,该算法将为每个字符串(Tweet)分配0~4的情绪评级。Similarly,FacebookusesNLPtotracktrendingtopicsandpopularhashtags.“Hashtagsandtopicsaretwodifferentwaysofgroupingandparticipatinginconversations,”ChrisStruhar,asoftwareengineeronNewsFeed,saidinHowFacebookBuiltTrendingTopicswithNaturalLanguageProcessing.“Sodon’tthinkFacebookwon’trecognizeastringasatopicwithoutahashtaginfrontofit.Rather,it’sallaboutNLP:naturallanguageprocessing.Ain’tnothingnaturalaboutahashtag,soFacebookinsteadparsesstringsandfiguresoutwhichstringsarereferringtonodes—objectsinthenetwork.”类似地,Facebook
使用自然语言处理来跟踪热门话题和流行话题标签。“标签和话题是两种不同的分组和参与对话的方式。”信息流的软件工程师克里斯·斯特鲁哈尔(ChrisStruhar)在《Facebook
如何用自然语言处理来构建热门话题》一书中说。所以,不要以为Facebook不会把一个字符串识别成一个没有标签的主题。而是关于NLP:自然语言处理。标签不是自然的东西,所以Facebook会解析字符串并找出哪些字符串引用了网络中的节点——对象。”It’snotjustsocialmediathatcanuseNLPtoit’sbenefit.PublishersarehopingtouseNLPtoimprovethequalityoftheironlinecommunitiesbyleveragingtechnologyto“auto-filtertheoffensivecommentsonnewssitestosavemoderatorsfromwhatcanbean‘exhaustingprocess’,”FrancisTsengsaidinPrototypewinnerusing“naturallanguageprocessing”tosolvejournalism’scommentingproblem.OtherpracticalusesofNLPincludemonitoringformaliciousdigitalattacks,suchasphishing,ordetectingwhensomebodyislying.不仅仅是社交媒体可以利用自然语言处理为自己谋利。出版商希望利用自然语言处理技术,“自动过滤新闻网站上的攻击性评论,使版主免于‘累人的过程’,从而提高其在线社区的质量。”FrancisTseng说。自然语言处理的其他实际用途包括监视恶意数字攻击,如钓鱼或检测某人何时说谎。UsingNaturalLanguageProcessingtoIdentifyMaliciousDomainsCybercriminalsapparentlyhaveatendencytousethesame(oratleastsimilar)lexicalstyleswhenestablishingdomainsforphishingandadvancedpersistentthreat(APT)attacks,makingitpossibleforsecurityresearcherstoidentifysitesusingnaturallanguageprocessing(NLP)techniques.TextB使用自然语言处理来识别恶意域网络犯罪分子在建立网络钓鱼和高级持久威胁(APT)攻击域时,显然倾向于使用相同(或至少类似)的词汇风格,这使得安全研究人员有可能使用自然语言处理技术来识别站点。That’saccordingtoOpenDNSSecurityLabs,whichisprototypingatooldubbedNLPRanktoseeifitcanidentifypotentiallymaliciouswebsitesandphishingdomainsmorequickly.Basedontestssofar,thenaturallanguageprocessingtoolcouldprovetobea“robust”methodfordefendingagainstAPTs,claimedOpenDNSsecurityresearcherJeremiahO’Connorinablogpost.OpenDNS安全实验室正在开发一种名为NLPRank的工具,看看它能否更快地识别出潜在的恶意网站和钓鱼域名。OpenDNS安全研究人员JeremiahO’Connor在一篇博客文章中称,根据迄今为止的测试,自然语言处理工具可能被证明是一种抵御APTs的“健壮”方法。SecurityresearchersatOpenDNSrecentlyanalyzedDNSdataassociatedwithattackscarriedoutbythecybercrimegroupbehindtheCarbanakmalware,whichisbelievedtohavestolenhundredsofmillionsofdollarsfrombanksaroundtheworldinasophisticated,multiyearAPTcampaign.OpenDNS的安全研究人员最近分析了DNS数据,这些数据与卡班纳克(Carbanak)恶意软件背后的网络犯罪集团实施的攻击有关。据信,该恶意软件在一场复杂的、持续多年的APT攻击中,从世界各地的银行窃取了数亿美元。APTCampaignsTopenetratebanksandvariousotherfinancialinstitutions,thesecybercriminalswouldtypicallytargetemployeesthroughphishingemailslacedwithmalware,which,wheninstalledonasystem,wouldallowthemtotakecompletecontrolofthecompromisedcomputer.Atthatpoint,theywouldmovelaterallyacrossthenetworktoothermorecriticalsystems,gainaccesstoadministrativeaccounts,controlATMsandsiphonouthugesumsofmoney.APT活动为了渗透银行和其他各种金融机构,这些网络犯罪分子通常会通过带有恶意软件的网络钓鱼电子邮件攻击员工。恶意软件安装在系统上后,就能让他们完全控制受损的电脑。到那时,他们将通过网络横向转移到其他更关键的系统,获得管理账户的访问权限,控制自动取款机,并吸走巨额资金。WhencomparingthemaliciousdomainsandspoofingtechniquesusedintheCarbanakcampaignwiththoseusedinotherAPTsliketheDarkhotelcyberespionagecampaign,OpenDNSobservedtheywereconstructedinasimilarlexicalfashion.“Oneofthespoofingtechniquesoftenleveragedistheimpersonationofalegitimatesoftwareortechcompanyinanemailclaimingarequiredsoftwareupdate,”O’Connorsaid.在比较卡班纳克战役中使用的恶意域和欺骗技术与暗黑酒店网络间谍活动等其他APTs中使用的恶意域和欺骗技术时,OpenDNS注意到它们是用类似的词汇方式构建的。O’Connor说:“欺骗技术的一个常用手段是在一封声称需要软件更新的电子邮件中冒充合法软件或技术公司。”DomainsusedintheDarkhotelcampaign,forexample,included,,adoberegister.and.Meanwhile,theCarbanakAPTuseddomainssuchasand.Otherinstancesofdomainnamessharingasimilarlexicalstructureincluded,and.例如,“暗黑酒店”活动中使用的域名包括、、和。同时,卡班纳克APT使用了update-和等域。其他共享类似词汇结构的域名实例包括、和。LexicalSimilaritiesInreviewingtheattackdata,OpenDNSdiscoveredmultiplecasesofsuspiciouswebsitesadvertisingfakeJavaupdates,sharingthesameinfrastructureandexhibitingsimilarattackpatterns,O’Connorsaid.ResearchersdiscoveredthatAPTgroupshaveatendencytospooflegitimatedomainsandusespearphishingtacticstoobfuscatetheircriminalcampaigns.词汇的相似之处O’Connor说,在审查攻击数据时,OpenDNS发现了多起可疑网站发布虚假Java更新、共享相同基础设施和显示类似攻击模式的案例。研究人员发现,APT群体有一种欺骗合法域名的倾向,他们使用鱼叉式网络钓鱼策略来混淆他们的犯罪活动。Becauseofthelexicalsimilaritiesamongthedomainsusedinthesecriminalcampaigns,itispossibletouseNLPtechniquestoidentifypotentiallymalicioustypo-squattingandtargetedphishingdomains,O’Connorsaid.NLPisbasicallyatechniqueforextractingmeaningfromwrittenwordsusingspecializedsoftware.Itstoolsareusedwidelytoreadandinterpretfreetextdocumentsinavarietyofapplicationsandfields.O’Connor接着说,由于这些犯罪活动中使用的域名在词汇上有相似之处,因此有可能使用自然语言处理技术来识别潜在的恶意排印和有针对性的钓鱼域名。自然语言处理基本上是一种使用专门的软件从书面文字中提取意思的技术。它的工具被广泛用于阅读和解释各种应用程序和领域中的免费文本文档。NaturalLanguageProcessingviaMinimum-EditDistanceAccordingtoO’Connor,OpenDNS’NLPRanksystemusesNLP,HTMLtaganalysisandamethodknownasminimum-editdistancetoseeifitcandistinguishbetweenlegitimateandmaliciousdomainsontheInternet.通过最小编辑距离进行自然语言处理据O’Connor介绍,OpenDNS的NLPRank系统使用自然语言处理、HTML标签分析和一种被称为“最小编辑距离”的方法来区分互联网上的合法和恶意域名。Theminimum-editdistancemethodchecksforthedistancebetweenwordsinlegitimate
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年系统分析师高效学习试题及答案
- 专科特色护理服务项目
- 个人职业发展汇报
- 统计课程大纲与试题
- 低纳患者护理查房
- 职业培训相关知识课件
- 翡翠挖掘知识培训课件
- 毕业答辩演示方案
- 多媒体设计中的数字曲线运用试题及答案
- 网络安全知识培训教学课件
- 音乐疗愈课件
- 《冗余度机器人》课件
- 《民航服务与沟通学》课件-第25讲 值机处旅客的沟通技巧
- 《鹿角和鹿腿》第二课时公开课一等奖创新教学设计
- 八项规定解读
- 催收团队管理经验分享
- 2024中国慢性阻塞性肺疾病基层诊疗与管理指南解读
- 重难点31 阿基米德三角形(举一反三)(新高考专用)(学生版) 2025年高考数学一轮复习专练(新高考专用)
- 药店开展药品购进渠道检查自查报告
- 职业培训师理论知识考试题及答案
- 生猪屠宰兽医卫生检验人员理论考试题库及答案
评论
0/150
提交评论