一段没有空格的英文怎么分词,自动给单词间插入空格。。

比如下面的一段英文。这个是在IEEE上面下载的文摘,那个pdf文档的英文中间都没有空格,复制下来单词都连在了一起,人工操作来增添很麻烦吧~~~希望大侠们给个高招哦!最好的是给出个代码或者可以用的软件吧。。。
Startingfromamemberofanimagedatabasedesignatedthe“queryimage,”traditionalimageretrievaltechniques,forexample,searchbyvisualsimilarity,allowonetolocateadditionalinstancesofatargetcategoryresidinginthedatabase.However,inmanycases,thequeryimageor,moregenerally,thetargetcategory,residesonlyinthemindoftheuserasasetofsubjectivevisualpatterns,psychologicalimpressions,or“mentalpictures.”Consequently,sinceimagedatabasesavailabletodayareoftenunstructuredandlackreliablesemanticannotations,itisoftennotobvioushowtoinitiateasearchsession;thisisthe“pagezeroproblem.”Weproposeanewstatisticalframeworkbasedonrelevancefeedbacktolocateaninstanceofasemanticcategoryinanunstructuredimagedatabasewithnosemanticannotation.Asearchsessionisinitiatedfromarandomsampleofimages.Ateachretrievalround,theuserisaskedtoselectoneimagefromamongasetofdisplayedimagestheonethatisclosestinhisopiniontothetargetclass.Thematchingisthen“mental.”Performanceismeasurdbythenumberofiterationsnecessarytodisplayanimagewhichsatisfiestheuser,atwhichpointstandardtechniquescanbeemployedtodisplayotherinstances.OurcorecontributionisaBayesianformulationwhichscalestolargedatabases.Thetwokeycomponentsarearesponsemodelwhichaccountsfortheuser’ssubjectiveperceptionofsimilarityandadisplayalgorithmwhichseekstomaximizetheflowofinformation.Experimentswithrealusersandtwodatabasesof20,000and60,000imagesdemonstratetheefficiencyofthesearchprocess.
三楼的辛苦了!不过我要知道的是用电脑怎么来完成…个人估计直接用单词匹配的方法准确率还可以…

这是一条穿越时间的回复,如今的AI已经可以轻松做到处理自然语言文本了。向GPT4提交一份没有空格、逗号、句号的英文文本,它就可以将原来的文本还原出来。

举例:
I'mconcernedthatasweseeincreasesinproductivityitmayleadtojoblossesfurtherwideningthegapbetweentherichandthepoorAsthisgapgrowssocietalunrestandviolencemayalsoincreaseWhiletechnologyhastremendouspotentialtodogoodandbringaboutpositivechangesIfearthatinourcurrentpoliticalsystemsitmightbeleveragedtobenefittheaffluentattheexpenseofthelessfortunateIt'sdishearteningtoseetechnologybeingdevelopedinasocietythatdoesn'tseemfullypreparedtouseitforthebenefitofeveryone

AI可以轻松将其还原

I'm concerned that as we see increases in productivity, it may lead to
job losses, further widening the gap between the rich and the poor. As
this gap grows, societal unrest and violence may also increase. While
technology has tremendous potential to do good and bring about positive
changes, I fear that in our current political systems, it might be
leveraged to benefit the affluent at the expense of the less fortunate.
It's disheartening to see technology being developed in a society that
doesn't seem fully prepared to use it for the benefit of everyone.

不放心可以让AI自己比较一下,为了避免干扰我重新开了一个对话。

温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-09-21
这个问题,可以十分完美地解决(除非如果有单词误写)。

但要有个条件:你有个这样的数字化的英文字典,该字典是一个数组形式保存的,每个数组元素就是单词本身(文件形式的字典,只要可以方便地读入到数组中就够)。

算法是这样的:

首先,处理字典。把把字典数组中所有单词转小写,然后把字典数组排序,长单词在前,相同长度的话,顺序随便。

其次,搜词。按前面排序后的字典,在你的文本数据里搜索所有字典里的单词,从字典头的最长单词开始,按顺序逐个单词搜,每个单词要把所有出现的位置都搜到。

搜到的单词对象,以及在原文中的位置,都按位置排序加入一个“已知单词链表”,而且每搜到一个单词位置,都要先在前面搜到的“已知单词链表”中逐项用各已知单词的对象方法和位置检验一下是否已经包含被已知单词包含了——包含了当然不算新搜到的单词,继续搜,不包含才加入“已知单词链表”。

最后,合成新文本。按“已知单词链表”,已知单词存在的,在新文本中替换为单词文本+空格,两已知单词之间若有空隙(已知单词都有位置和长度,这很好判别),则新文本相应部分应从原文中对应空隙的位置复制(以字母或数字开头的,要与前面已知单词间加一空格,否则不加空格),原文结尾和开头若仍有“零头”,也这样处置。

前面没考虑大小写问题,大小写问题的改进处理是这样的:搜索用的“原文本”使用事先转为小写的“搜索用文本”,由于“已知单词链表”中有位置信息,最后合成时按位置信息依次从原文本复制各段字符串就行(包括已知单词也从原文中复制)。

上面的算法已经考虑到了运行效率和内存占用,全部在内存中操作实现对现在的机器根本不可能出问题,运行时间也不会太长。

算法是这样,你能不能实现,看你自己的功夫了,这就别问我了,我不打算去实现这个(抱歉啦)。
第2个回答  2010-09-18
很遗憾目前没有找到这样的软件呢。。。
不过我觉得可以弄个词库,在词库中的单词与这个句子里面的内容进行匹配,每次取出一个字符,不能形成一个单词则再增加一个字符连接在末尾,然后再去匹配,匹配成功的话就插入空格并且输出。然后开始新的匹配。。。。
貌似这样也有很大的麻烦,一是词库你怎么弄到,这个一般难找。另外词库词量大了之后检索匹配就会耗费很大量的时间,不知道谷歌词霸是怎么弄的呢。最后的话呢有很大可能这个是拆分错了,这时候一般就没法来自动判别该怎么拆分了。。。复杂啊~~~
这个问题可以用全句匹配来实现,就是整个句子一定要形成一个一个地单词,这里可以限定一个单词的长度为20左右吧,一般超过这个还没有匹配到,就说明前面的拆分有错误。。前面的某个词可能被拆分成了几段呢,这个怎么修改过来又要花费很大的功夫了吧,就是把前面的单词又要一个一个地重新拆分试试吧,看起来很复杂,不过好像以前做过类似的事情,就是给N个员工分配N项工作的题目里面,有全序遍历的递归,把所有可以拆分的情况都罗列出来。。。
我要说的就这么多了,自己可以试试做做吧。。。不然就手动操作或者像一楼说的,用word的自动纠错功能,貌似可以解决问题。。。本回答被提问者采纳
第3个回答  2010-09-17
Starting from a member of an image data base designated the“query image,”traditional image retrieval techniques,for example,search by visual similarity,allow one tolocate additional instance so fatarget category residing in the data base.How ever,inmany cases,the query imageor,more generally,the targetcategory,resides only in the mind of the use rasa set of subjective visual patterns,psychological impressions,or“mentalpictures.”Consequently,since image data base savail able today are ofte nunstructured and lack reliable semanticannotations,it is often notobvious how to initiatea search session;this is the“page zero problem.”We propose a new statistical frame work based on relevance feed back to locatean instance of a semantic category in a nunstructured image data base with nosemanti can not ation.Asearch session isinitiated from a random sample of images.A teachretrieval round,the user is asked to selecton a image from a mongaset of displayed images the one that is closest in hisopinion to the targetclass.Them atchingisthen“mental.”Perform anceis measurd by the number of iteration snecessary to display an image which satisfies the user,at which point standard techniques can be employed to display other instances.Our corecontribution is a Bayesian formulation which scales to larged data bases.The two key component sarea response model which accounts for the user’s subjective perception of similarity and a display algorithm which seek stomaximize the flow of information.Experiments with realusers and two data bases of 20,000and60,000 imagesdem on strate the efficiency of the search process.
第4个回答  2010-09-21
不仅需要词的对比,还需要句法,语法分析。
例如:
Starting from a member of an image database designated..
这里 database 是一个词(从文章意思看出),如果不进行内容分析,
也许会拆成 data base. (4楼)
这里 instances of a target category
也许会拆成 instance so fatarget category。(4楼)

目前还没有这种软件。

文章不长,手工分起来其实很快。
相似回答