2007年11月11日 星期日 19:24
Ôõô±È½ÏһЩ×Ö·û´®µÄÏàËƶÈÄØ£¿ ±ÈÈç: a = "example/a/001.htm" b = "example/a/002.htm" c = "anythingelse.htm" aºÍbµÄÏàËƶȾͺܸߣ¬ºÍcÏàËƶȾͺܵͣ¬ÔõôÄÜÇø·Ö³öÀ´ÄØ£¿ ¶àл -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071111/9d5086ea/attachment.html
2007年11月11日 星期日 19:41
ps: a = 'abc.html' b = 'cba.html' On Nov 11, 2007 7:24 PM, Xian Chen <hoganxian在gmail.com> wrote: > Ôõô±È½ÏһЩ×Ö·û´®µÄÏàËƶÈÄØ£¿ > > ±ÈÈç: > > a = "example/a/001.htm" > b = "example/a/002.htm" > c = "anythingelse.htm" > > aºÍbµÄÏàËƶȾͺܸߣ¬ºÍcÏàËƶȾͺܵͣ¬ÔõôÄÜÇø·Ö³öÀ´ÄØ£¿ > > ¶àл > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- ×îºÃµÄÍƹã±ãÊÇʵ¼ÊÓ¦Óà ×î½üÔÚѧϰweb.py, ¼á³Ö²ÅÄܽø²½ http://twitter.com/qichangxing Gtalk: iexper(at)gmail.com -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071111/7c7220a0/attachment.html
2007年11月11日 星期日 21:49
>>> a = "example/a/001.htm" >>> b = "example/a/002.htm" >>> c = "anythingelse.htm" >>> import difflib >>> len(filter(lambda i: i.startswith('+'), difflib.ndiff(a,b))) 1 >>> len(filter(lambda i: i.startswith('+'), difflib.ndiff(a,c))) 9 >>> 在 07-11-11,Xian Chen<hoganxian at gmail.com> 写道: > 怎么比较一些字符串的相似度呢? >
2007年11月11日 星期日 21:52
或 >>> len(filter(lambda i: i.startswith('+') or i.startswith('-'), difflib.ndiff(a,b))) 2 >>> len(filter(lambda i: i.startswith('+') or i.startswith('-'), difflib.ndiff(a,c))) 19 在 07-11-11,Jiahua Huang<jhuangjiahua at gmail.com> 写道: 用 difflib
2007年11月12日 星期一 09:37
ºÃµÄ£¬¶àл ÔÙÑо¿Ò»ÏÂdifflib On Nov 11, 2007 9:52 PM, Jiahua Huang <jhuangjiahua在gmail.com> wrote: > »ò > >>> len(filter(lambda i: i.startswith('+') or i.startswith('-'), > difflib.ndiff(a,b))) > 2 > >>> len(filter(lambda i: i.startswith('+') or i.startswith('-'), > difflib.ndiff(a,c))) > 19 > > > ÔÚ 07-11-11£¬Jiahua Huang<jhuangjiahua在gmail.com> дµÀ£º > Óà difflib > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071112/02ff4bfb/attachment.htm
2007年11月13日 星期二 17:14
动态规划算法,计算单词距离 http://zsp.javaeye.com/blog/137852 在 07-11-12,Xian Chen<hoganxian at gmail.com> 写道: > 好的,多谢 > > 再研究一下difflib > > > On Nov 11, 2007 9:52 PM, Jiahua Huang <jhuangjiahua at gmail.com> wrote: > > 或 > > >>> len(filter(lambda i: i.startswith('+') or i.startswith('-'), > > > > difflib.ndiff(a,b))) > > 2 > > >>> len(filter(lambda i: i.startswith('+') or i.startswith ('-'), > > difflib.ndiff(a,c))) > > 19 > > > > > > 在 07-11-11,Jiahua Huang<jhuangjiahua at gmail.com> 写道: > > 用 difflib > > > > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > -- 个人网站:http://zsp007.com.cn/ 双学位:生物医学工程+计算机科学与技术 技能:C++(STL,BOOST) Python(Django) HTML+CSS AJAX -- 张沈鹏
2007年11月14日 星期三 01:41
¶Ôѽ£¬ÊÇstring distance On 11/13/07, ÕÅÉòÅô(µç×Ó¿Æ´ó08Äê±¾¿ÆÓ¦½ì) <zsp007在gmail.com> wrote: > > ¶¯Ì¬¹æ»®Ëã·¨,¼ÆËãµ¥´Ê¾àÀë > http://zsp.javaeye.com/blog/137852 > > ÔÚ 07-11-12£¬Xian Chen<hoganxian在gmail.com> дµÀ£º > > ºÃµÄ£¬¶àл > > > > ÔÙÑо¿Ò»ÏÂdifflib > > > > > > On Nov 11, 2007 9:52 PM, Jiahua Huang <jhuangjiahua在gmail.com> wrote: > > > »ò > > > >>> len(filter(lambda i: i.startswith('+') or i.startswith('-'), > > > > > > difflib.ndiff(a,b))) > > > 2 > > > >>> len(filter(lambda i: i.startswith('+') or i.startswith ('-'), > > > difflib.ndiff(a,c))) > > > 19 > > > > > > > > > ÔÚ 07-11-11£¬Jiahua Huang<jhuangjiahua在gmail.com> дµÀ£º > > > Óà difflib > > > > > > > > > > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > > > -- > ¸öÈËÍøÕ¾:http://zsp007.com.cn/ > ˫ѧλ:ÉúÎïҽѧ¹¤³Ì+¼ÆËã»ú¿ÆѧÓë¼¼Êõ > ¼¼ÄÜ:C++(STL,BOOST) Python(Django) HTML+CSS AJAX > -- ÕÅÉòÅô > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -- Yours, fluke fluke在sfcube.net http://blog.ospattern.net -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071114/038435f3/attachment.html
2007年11月21日 星期三 10:44
Å£B,ÏñÊÇÈ˹¤ÖÇÄÜÒ»Ñù -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071121/afa1c4af/attachment.html
2007年11月21日 星期三 16:49
ÎÒ¾õµÃÊ×ÏÈÊǶ¨Òå±ê×¼£¬È»ºóÄãÔÙÓóÌÐòÈ¥Ö´ÐÐÕâ¸ö±ê×¼ a = "example/a/001.htm" b = "example/a/002.htm" c = "example/b/001.htm" Äã˵bºÍc¶ÔaµÄÏàËƶÈÄĸö¸ß£¿ Èç¹û±ê×¼ÊÇ´Ó×óµ½ÓÒ£¬Æ¥ÅäµÄ×Ö·ûÊýÔ½¶à£¬ÏàËƶÈÔ½¸ß£¬ÄÇôbµÄÏàËƶȸßÓÚc Èç¹û±ê×¼ÊÇËùÓÐ×Ö·û´®ÀÏàͬ´úÂëµÄÊýÁ¿Ô½¶à£¬ÏàËƶÈÔ½¸ß£¬ÄÇôcµÄÏàËƶȸßÓÚa ÎÊÌâ¾ÍÊÇÄãҪʵÏÖµ½Ê²Ã´³Ì¶È£¬Èç¹ûÄãÇå³þµÄ¶¨ÒåÁËÕâ¸ö±ê×¼£¬ÄǾÍÖªµÀÔõôдÁË ÔÚ07-11-11£¬Xian Chen <hoganxian在gmail.com> дµÀ£º > > Ôõô±È½ÏһЩ×Ö·û´®µÄÏàËƶÈÄØ£¿ > > ±ÈÈç: > > a = "example/a/001.htm" > b = "example/a/002.htm" > c = "anythingelse.htm" > > aºÍbµÄÏàËƶȾͺܸߣ¬ºÍcÏàËƶȾͺܵͣ¬ÔõôÄÜÇø·Ö³öÀ´ÄØ£¿ > > ¶àл > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071121/fdc55f4f/attachment.htm
2007年11月21日 星期三 16:55
ÎÒµÄÒâ˼ÊÇ´Ó×óµ½ÓÒÆ¥Åä×Ö·û£¬ÕâÑùÆ¥ÅäµÄÔ½¶àÔ½ºÃ¡£ On Nov 21, 2007 4:49 PM, ÑîÒæ <yangyi.cn.gz在gmail.com> wrote: > ÎÒ¾õµÃÊ×ÏÈÊǶ¨Òå±ê×¼£¬È»ºóÄãÔÙÓóÌÐòÈ¥Ö´ÐÐÕâ¸ö±ê×¼ > a = "example/a/001.htm" > > b = "example/a/002.htm" > c = "example/b/001.htm" > > Äã˵bºÍc¶ÔaµÄÏàËƶÈÄĸö¸ß£¿ > > Èç¹û±ê×¼ÊÇ´Ó×óµ½ÓÒ£¬Æ¥ÅäµÄ×Ö·ûÊýÔ½¶à£¬ÏàËƶÈÔ½¸ß£¬ÄÇôbµÄÏàËƶȸßÓÚc > Èç¹û±ê×¼ÊÇËùÓÐ×Ö·û´®ÀÏàͬ´úÂëµÄÊýÁ¿Ô½¶à£¬ÏàËƶÈÔ½¸ß£¬ÄÇôcµÄÏàËƶȸßÓÚa > > ÎÊÌâ¾ÍÊÇÄãҪʵÏÖµ½Ê²Ã´³Ì¶È£¬Èç¹ûÄãÇå³þµÄ¶¨ÒåÁËÕâ¸ö±ê×¼£¬ÄǾÍÖªµÀÔõôдÁË > > > ÔÚ07-11-11£¬Xian Chen <hoganxian在gmail.com> дµÀ£º > > > > Ôõô±È½ÏһЩ×Ö·û´®µÄÏàËƶÈÄØ£¿ > > > > ±ÈÈç: > > > > a = "example/a/001.htm" > > b = "example/a/002.htm" > > c = "anythingelse.htm" > > > > aºÍbµÄÏàËƶȾͺܸߣ¬ºÍcÏàËƶȾͺܵͣ¬ÔõôÄÜÇø·Ö³öÀ´ÄØ£¿ > > > > ¶àл > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071121/0c531067/attachment.html
Zeuux © 2025
京ICP备05028076号