TableOfContents

Include(ZPyUGnav)

大数据集:频繁测试成员关系

题面儿

Roy Liu <[email protected]>
reply-to        [email protected]
to      [email protected]
date    Mon, Mar 9, 2009 at 19:28
subject [CPyUG:80888] 大数据集,频繁测试成员关系,各位有何建议

需要编写一个针对技术文档翻译后的校对工作的小程序,不知各位能否给点建议。

for term in textPair:
         for sentence in transPair:
                if term in sentence:
                       do something

但是,我发现这样做的效率很低,自己又没什么更好的方法,因此来这里看看,希望有高手能共同探讨一下。

ZSP

张沈鹏 <[email protected]>
reply-to        [email protected]
to      [email protected]
date    Mon, Mar 9, 2009 at 19:53

囧 英文的 很好办

   1 for sentence in transPair:
   2   result=[]
   3   for term in sentence.split(' '):
   4        if term in textPair:
   5           result.append("xxxxxxxxxxxxx")
   6        else:
   7            result.appned(term)
   8    print " ".join(result)

多模式匹配

张沈鹏 <[email protected]>
reply-to        [email protected]
to      [email protected]
date    Tue, Mar 10, 2009 at 07:33

算了 我还是扔出牛逼无比的多模式匹配吧

感谢伟大的redsea前辈,因为代码是他抠出来的:)

建议
  • 单个单词用我原来给的方法
  • 多个单词用多模式匹配
  • 这样效率最高

见附件: attachment:zspy.7z


反馈

创建 by -- ZoomQuiet [DateTime(2009-03-10T03:02:14Z)]

PageComment2

[:/PageCommentData:PageCommentData]