Posts archived in Linux

[Keywords for search engine: Ubuntu dell vostro 200 live cd can't boot harddisk]

Make sure add “irqpoll” as the kernel parameter, i.e. :

title           Ubuntu gutsy, kernel 2.6.22-12-generic (recovery mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.22-12-generic root=UUID=78dea514-8cc8-40a9-9e51-13c359bc681b ro  quite splash irqpoll

initrd          /boot/initrd.img-2.6.22-12-generic

These are cited from here.

When the PC boots up, you will see the Grub countdown, which is set to 3 seconds by default. Press “Esc” to intercept this countdown and go enter a Grub menu. Then

  • Press ‘e’ to start editing.
  • Scroll down to the “kernel…” line. The is the line that tells Grub which kernel to boot with and the parameters to be passed to the kernel when it boots are placed at the end of this line.
  • Press ‘e’ again to edit this line.
  • Move to the end of the line. You will see any existing parameters and can add other new parameters to the end. [Add your irqpoll here]
  • Parameters are separated by spaces and are mostly either a single word (e.g. nolapic), or an equation (e.g. acpi=off).
  • Once you have added the parameter to the end of the line, press Enter to accept the editing.
  • Then press ‘b’ to boot using that kernel and those parameters.

Then, go here to see how can you modify the parameter permanently.

Here is a quite funny picture I found today on digg. It is called the Best Phishing Email, Ever. Despite the funny nature of this hilarious letter, have someone really noticed that in this letter, we have G mail or Gma il instead of Gmail? (one extra blank in between the letter “G” and “m”, or “a” and “i”).

gmail_scam.jpg

Last year when I was interviewed in Google, I reported this bug to Gmail team, (Sadly to say, they didn’t take it very serious, as it’s still there now). Maybe they can argue that it’s a feature, but let me take five minutes to explain why is it. (I guess it’s fairly simple and straightforward).

Let’s start from a little background about HTML. We all know that when we send colorful texts like “Google” via gmail, the email format is actually HTML. Here is a quite important aspect about HTML: An HTML user agent should treat end of line in any of its variations as a word space in all contexts except preformatted text.(Page 20, RFC1866) That is to say, a cstring in HTML source file like “a\nb\nc” will have the redering output identical to “a b c”. Therefore, it’s really confusing that we have to use <br/> to make a newline within a paragraph in HTML text, and “\n” is equivalent to a white space in most of the cases.

Now let’s go back to Gmail. When I send myself a piece of email with a colorful string “Google” via Gmail, I got “Googl e“. Via viewing the source of the HTML, we can actually find that there is a “\n” in between those letters. For example, this is a piece of HTML(javascript) excerpted from Gmail source related to this colorful Google:

\u003cfont color\u003d\”#000099\”\>G\u003c/font\>\u003cfont color\u003d\”#ff0000\”\>o\u003c/font\>\u003cfont style\u003d\”background-color:#ffffff\” color\u003d\”#ffcc00\”\>o\u003c/font\>\u003cfont color\u003d\”#3333ff\”\>g\u003c/font\>\u003cfont color\u003d\”#33cc00\”\>l\u003c/font\>\u003cfont color\u003d\”#ff0000\”\>e\u003c/font\>\n \u003c/div\>\n\u003cdiv\> \u003c/div\>\n\u003cdiv\>

Here \u003c is “<”, \u003d is “=”, without the bold “\n” in this line, the result should be “Google“. So, why we have an extra “\n” here? Who did this trick? The answer is simple: “Gmail”. For some reason, Gmail breaks a long line in HTML source file into multiple lines and sends the email out (I haven’t figure out the rule that Google uses to break lines in HTML source file). By doing several trival experiments like sending mail from Gmail to Hotmail and vice versa, I am now pretty sure the problem is caused by Gmail automaitc line breaking strategy. That is to say, Gmail client automatically inserts a newline(“\n”) symbol in the HTML source file and causes this “visual bug”. Actually this bug is quite easy to fix, for instance, just break the line at the first blank after the label name, for example, like:

<span
style=”color: rgb(255, 0, 0)”>red</span><span
style=”color: rgb(0, 255, 0″>green</span>

instead of say

<span style=”color: rgb(255, 0, 0)”>red</span>
<span style=”color: rgb(0, 255, 0″>green</span>

or

<span style=”color: rgb(255, 0, 0)”>red</span><span style=”color: rgb(0, 255, 0″>
green</span>

The first generates “redgreen“, and last two give “red green

BTW, here is a nice tip for interviewees: love your prospective employer, love their products. Eventually, you would have a very nice understanding about their culture and products. All companies are willing to hire guys who actually love their culture and products (and can even find bugs :).

PS: in preparing this article, I found that Gmail team has secretly updated the text format system from using plain old <font> to fancy (and elegant) XHTML+CSS <span>.

PS2: http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/Default.aspx is a nice online tool for decoding the base64 format.

前几天就听说国内邮箱往国外发信出了点问题. 我今天也收到了第一封这样的邮件. 其实挺鄙视这些纸老虎的, 一点技术含量都没有.

上次看到一个”最牛B的共和国卫士“, 于是看到了所谓的HNC, (Hierarchical Network of Concepts), 懂自然语言处理的人一看就知道其实是POS+基于规则. 不知道新语丝有没有兴趣对大正公司的 这套工具打打假. 骗了国家多少血汗银子, 做出了一个极其 SB 的墙. (提示: Google 搜索该英文没有任何其他学术研究, 就是一圈人自娱自乐). 做墙就做墙, 得严肃点专业点, 得符合科学发展观. 搞个没技术含量的伪科学的墙, 简直破坏国家形象啊. 我都替胡主席着急, 毕竟也是关系国家安全, 十七大顺利召开和我党生死存亡的大事!

PS: 最近没什么时间捣鼓这些. 等有时间, 我得好好弄一篇充满对立立场但是就是不撞墙的文章, 来证明所谓的墙, 其实就是纸老虎.

谁比Google 懂中文?

一年前, 你要是问我这个问题. 我会小心翼翼的说: 在某些关键词上, 百度质量稍微好一点. 但是Google 抓的双语网页和英文网页多, 在其他关键词上Google质量好, 两家各有仲伯, 不能说谁更加懂中文. 为此我还专门写了一篇文章帮大家评判什么是懂中文.

可是现在, 你要是问我这个问题. 我会毫不犹豫的告诉你: 比Google 更懂中文的公司诞生了. 其名字是两个字: 不是雅虎, 不是中搜, 不是搜狗, 不是有道, 不是天网, 不是百度, 不是汤姆, 答案是: “!!!谷歌!!!” (嘹亮的山谷之歌响起)

不信? “《财经》杂志封面报道:谷歌重来”一文中, 有段对谷歌技术总监王劲的采访, 原文如下:

“美 国工程师不懂中文,无法准确分词,常常造成可笑的问题。”谷歌中国技术总监王劲说。比如,用户输入“电脑”两个字,正常的情况是,页面左侧应出现电脑的搜 索结果,右边应该出现电脑产品广告,但美国工程师不懂中文,可能会把“电脑”分成“电”和“脑”两个字,出现的结果和广告是关于“电”和“脑” 的,令人啼笑皆非。

虽然我无法确定百度和Google 之间谁牛, 但是瞧瞧人家谷歌, 把多差的一个Google”汉字”搜索引擎变成一个多好的谷歌 “汉词” 搜索引擎啊 (Tinyfool 对此句亦有贡献). 谷歌青出于蓝, 十八个月以来终于让 “电脑” 不是 “电”+”脑” 了, 多么大的成就啊! 谷歌的确比Google懂中文, 这下大家相信了吧?

或许在中国把 Google.com 转到 谷歌 是有道理的, 人家比Google 更懂中文, 你们咋不用呢. 咋不知道体会人家的良苦用心呢? 下次谁再说 Google 懂中文, 请自费到中关村谷歌大楼外面壁.

相关文章:[伟大的谷歌]谷歌技术人员成功将google汉字搜索引擎进化为汉词搜索引擎


// 我有时间了得写个英文版, 让全世界人民, 包括Google总部的所有人, 看到我们 谷歌 在中文搜索上做出的杰出的贡献.

Update:

对于中文分词我是只听过, 没做过的门外汉, 不过我发现了一个测试Baidu 和 Google 搜索引擎分词结果的简单实用的方法, 对于想测试他们分词性能的人可以尝试一下, 不知道这个是不是我先发现的:)

对于百度, 最近百度出现了快照, 只要把鼠标停到网页快照的链接上,浏览器状态栏就会出现一个链接。这个链接中你会发现关键词被用分号隔开了, 而这个就是分词结果。 比如说,我搜索: “百度不懂中文分词算法”这个关键字,百度切分成了 “百度;不;懂;中文;分词;算法” 而且从最后快照上面的提示看, 百度把“分词”这个词和前后都重新组成了一个新词.

百度 中文分词 分词算法

对于Google 要相对麻烦一点, 同样还是用快照(可能大陆不能用), 点快照进去后, 不同的颜色就是分开的词, 比如说:”谷歌不懂中文分词算法” 被分成了这个”谷; 歌; 不; 懂; 中文; 分; 词; 算法”:

中文 算法

就这个例子看, 谷歌的工程师可能不光把“电+脑”组合成”电脑” 就结束了, 起码要把 “谷+歌” 变成完整的 “谷歌”, 把”分+词” 变成完整的 “分词” 吧. 或许这个例子的象征意义远大于它的实际意义. 谷歌在本地化的路上不是比美国工程师多解决了一个”电脑”就行的, 还要解决”谷歌”和”分词”

我只是抛砖引玉,各位研究分词的高手可以评判他们的优劣.

0 comments

说说Spam

我有5个电子邮件地址,工作上用wustl.edu的,私人用gmail的,当然最后都是用Gmail收取. 以前没啥保护意识,乱公布邮箱,现在每天至少90封垃圾邮件. 因为我的用户名中间有个”.”, 而且都不是英语单词组成, 有些字典攻击的Spam根本就打不到我, 所以相比较而言还不是Spam最严重的目标.

用了好久Gmail, 其垃圾邮件过滤的确是非常好的. 我印象中只有一次False Positive (把正常邮件Spam了),这还是因为那封邮件只有一个hello 和一个图片造成的。按照我的经验, Gmail 识别成False Negative(垃圾邮件识别成正常的) 有以下几种,

1. 像模像样的中文(非英文)邮件 (至少遇到十次):

> 贵公司(厂)财务负责人:
>
> 您好!
>
> 本公司是一家专业为国内外企业提供专项经营服务的股份制企业,可为各类企业代开各种发票,(主要包括:广东省及国内各省统一商品发票、增值税、机械、建筑、广告、运输、服务、税务代开类等发票),公司的客户遍布全国各地,本公司一贯以”诚信、高效、务实”的经营理念和”稳妥、快捷”的经营作风,不断地锐意进取、与时俱进,竭诚为全国各地有需要的客户提供更加全面、更加到位的服务。热忱欢迎您的垂询!!
>
> 顺颂商祺!!!

本来Gmail对中文支持就不好,更不说垃圾邮件识别了。况且这些邮件实在太不像垃圾邮件了。当然这种垃圾邮件有个致命问题,就是有些关键字,只要设置一个 “发票” “财务负责人”, 基本上就可以过掉。(初期我搜”发票”不能定位到这个邮件,也难怪Gmail识别不出来)

2. Gmail 初期, 改换的关键词, 比如把Software 写成 S0ftware (现在基本上没有了)

Need S0ftware?
OEM software – throw packing case, leave CD, use electronic manuals.
Pay for software only and save 75-90%!

Discounts! Special offers! Software for home and office!
TOP 1O ITEMS.

$79 Microsoft Windows Vista Ultimate
$79 MS Office Enterprise 2007

3. 啥文字都没有,含有几个外部图片链接
这些邮件的图片链接是动态内容,也就是说,如果你向那些地址请求图片,spammer 就会知道这个邮箱是有效的,然后,垃圾邮件就会更多。又一次我为了”让垃圾来的更猛烈些吧”,特地把那些图片链接都一一分析了一下, 结果可以想象是垃圾果然更猛烈了……

这段时间大部分的没识别出来的垃圾邮件都是这样的形式,Gmail 基于文本过滤的系统目前没法过滤出来,大约50%的这些邮件往往都在我收件箱。如果都用外部图片的话,虽然Gmail可以不显示图片,但却还是不能识别这些垃圾邮件。至于具体怎么弄,各位读者有没有什么好办法?

如果大家对Spam过滤的研究感兴趣,可以读著名的Essays 系列 (Google:Essays 第一条结果) :

http://www.paulgraham.com/antispam.html

Spam过滤是本质上是Turing Test 问题 (区分人和机器), 因此不要过高期望Spam能够100%被挡掉。但是简单的往往是最好的,基于文本的Bayesian分类器已经非常之强大了, 如果你想到了OCR方法, 我还是劝你暂时先放弃这个吧. 说不定等Google能在图片旁边放AdSense的时候,你再来研究这个 :)

Spam有时候也能变成黑客搞笑的东西,比如说

Google Blogoscoped 就写过一个 十大对付Gmail Spam的办法 , 包括火烧,送Bill Gates 等等。可谓Spam十大酷刑。
当然也有现代派的人把 Spam的标题串成诗的 .读起来比梨花体好多了. http://www.spam-poetry.com/
GNU也有经典的Spam Joke: http://www.gnu.org/fun/humor.html#TOCSpam

PS:
我倒是想,要是我和各位读者说,如果你要给我发邮件,请在邮件中包含一行这样的字符:
5^&&(&*@29bd8067ab0c822cc@)$*@)!$*)@56f485fbd675544ba69d5ec($*#&$@&#@(!
或者我自己从dev/random 拿个串来过一次sha1sum, 把这个串做成我Gtalk/MSN/Email 签名档让大家都能看到。然后我用Gmail Filter, 不含这个的通通Spam, 我就不信Spam 就这么强大,哼哼!

当然,此建议因为强烈不切实际而没啥操作性~~

1 comments

什么叫做懂中文

读前提示:作者并不是搜索引擎和语言处理方面的专家,对自然语言和搜索引擎的理解仅限于读过的十几本书和五六篇论文,对于该领域的理解水平相当于普通计算机专业研究生。作者的观点可能带有主观看法。另外,本文不试图评价哪个更懂中文,只想告诉大家什么才是计算机领域所说的懂中文,免得简单的因为名字起得不好或者打错了字就说不懂中文,或者第一页是广告就说不懂中文,那样就有点好笑了。

先说几个标题, 都是关于懂中文的。 谷歌不太懂中文 百度真的比Google更懂中文么?, Google真的不懂中文? 雅虎比百度更懂中文 还有 百度,你只懂中文 ;作为普通的用户,不知道看到这些眼花缭乱的宣传会不会头晕。而且这些Blog文章,往往就是标题党,拿着一两个小点就开始发挥,而实际上有些并不是懂不懂中文的问题。因此,我在此写一个简要的介绍,告诉大家什么叫懂中文,免得以后看到类似的标题也高不清楚谁对谁错。

首先,人是评价技术的主观标准,如果一个中文搜索引擎给你的感觉是结果不好,无论是广告多了,排名靠后, 结果不相关,还是分词不对,它就是不太懂中文,这个标准是肯定的。但是,这个标准并不是全面的客观的。

我想解释一下,对于搜索引擎,什么叫懂中文,我们用什么样的客观标准去评价”懂中文”.

要强调的是:搜索引擎定义的懂中文和自然语言处理定义的懂中文是不一样的

我们知道,中国人都懂中文(当然少数民族不说汉语的咱不讨论)。懂也就是说能理解中文的意思,不管是不是文盲。我们说某老外懂中文,是说他能理解中文的意思。同理,计算机懂不懂中文,关键是计算机能不能理解中文的意思。计算机自然语言处理的本质,是对句子或文章进行词法分析(哪几个汉字是一个词),句法分析(好比说 主谓宾),语义分析(句子是什么意思),最后把汉语变成一种中间语言,或者一种叫语义网络的东西。 人可以验证计算机生成的语义和我们想表达的语义是否一样,从而验证计算机是否懂中文。

而搜索引擎定义的懂中文,不是理解中文的意思,而是决定能否由中文关键字得到想要的结果。 搜索引擎通过抓取网页或其他资源,编制索引,而用户输入关键字,则可以取出匹配的结果。因此,搜索引擎的懂中文可以理解成这几个方面:

1. 能否正确抓取中文网页
这一点的是评价搜索引擎中文质量的一个标准,但是并不是评价懂不懂中文的好标准。
首先,如果是蜘蛛抓取的面不够广,我们可以说这个引擎最终质量不一定会高。但是不代表这个引擎不懂中文。比如一个人收藏了很多书签,每次从书签中返回一个结果给我。他就是一个智能但是搜索面很窄的引擎。当然,如果一个蜘蛛蠢到不能应对多种汉字编码,那么,的确可以说不懂中文。

2. 能否正确编制索引
这一点牵涉到两个方面,一个是分词,一个是索引,其中分词是评价一个搜索引擎懂不懂中文的很好标准。
什么叫分词呢,我们知道,英语单词与单词之间是有空格的,因此字母是字母,词是词。但是中文很不一样,有个笑话说:老师让小明用 如果造句,小明说,汽水不如果珍味道好。如果搜索引擎把这个句子断成这样,其结果的质量可想而知。这个例子当然和极端,但实际上搜索引擎不会分词的现象普遍存在,比如 live 搜索共和国家,第一条结果就把”
“分成一个词了。 yahoo第一条也不对。再看看Google 的第三条也不对。相比之下, baidu 分词完全正确,分成两个词。当然具体的结果相关性在这里我们先不讨论。分词,有时候也可以理解为 能否正确辨认用户输入关键字,在搜索网页时候结果可能受排名影响而不容易看出优劣,但在小结果集合中效果明显。比如 地图分词, 邮件搜索分词,站内搜索分词,这些结果如人饮水,冷暖自知,大家可以客观的评价。至于百度的广告: 我知道你不知道我知道你不知道我知道你不知道我知道你不知道,只是表示他有中文分词/句能力,并不一定表示百度真的能把这句话理解。(我认为这句话存在不可判决路径,连人也可以分出几种意思,计算机又怎么可能分对?)

第二是索引,现在的搜索引擎,在链接下面往往会有一些小的片断帮助你筛选信息。实际上,这些小片断的选择很重要。 Microsoft Research 就曾经做过一个研究, 根据这些小片断做聚类。 小片断的好坏实际上表现了搜索引擎对这个关键字的理解。我们 可以用八荣八耻做测试,看看哪个能在小片断中体现相关信息。但是讽刺的是,恰恰是 live 的小片断的质量最差,有些片断和八荣八耻无法关联。Google, baidu 和 yahoo 小片断质量类似,其他关键字我未尝试,此处仅为一例,不作为论据。

3 . 能否正确输出匹配结果
Baidu 饱受诟病的一个原因就是竞价排名影响结果。其实这也是一种商业模式。但是这个模式不可避免的影响了结果。相当多的人在此批评百度不懂中文。客观的说,懂不懂中文和这个关系不大。不过减去广告后的比较的确很有价值,也的确能说明问题。有些文章写的很客观,有些纯粹拿着一个点发挥。

4. 扩展一:能否自动对大规模相似文本聚类
这个主要用在新闻上, baidu 的新闻质量和 Google 的新闻质量都很高,这方面尚未有任何比较,如果下面再有文章关于这个,相信大家有自己的眼光了。附带说一个,sogou的作者风格评实在是很好的点子很糟糕的技术,可能和样本太少也有关系,聚类结果差强人意。顺着这个,就牵涉到上下文相关广告和垃圾邮件处理,当然现在 英文领先的还是 Google, 中文也没有相关的比较出来。这是懂中文的一个非常重要的标准。

扩展二:能否进行高质量机器翻译
这一点是自然语言处理的本质,不敢做这个或者做不好这个都是不懂中文,或者在理解中文上有问题。这方面也是 Goolge 世界领先,(没办法,这个拼的就是语料库和计算能力,这个是我认为的”懂中文”的一个核心)

扩展三:拼音识别和相近词识别
有人说这个拼音识别 和近义词有什么难的?不就是输入法+词典么。对的,说的很对,就是输入法加词典(当然也有复杂的技术我就不讲了)。可是如果这都做不好,谈什么懂中文呢 。

结语:判断”懂中文” 有客观标准,大约是 机器翻译 50%, 分词20%, 聚类+搜索质量30%。
其他主观标准,我尊重你的判断,但是请不要用不懂中文这样的标题吓人,大家都是中国人,都懂你不懂什么叫不懂中文,都知道你不知道我知道你不知道我知道。附带说一句,从语义分析角度来说,新华字典懂汉字,不懂中文。

Can gmail be an automation?

Gmail has a very useful function called filter. I guess every gmail user has used it more or less. In fact fliter provides us these essential options: FROM, TO, HAS WORD, NOTHASWORD, FORWARD and some auxiliary functionality like STAR IT, TAG IT. Note that we have use logical expression in all of the above filed like has word “XX” OR “YY”.

Now my idea is, if we have a bunch of gmail account, namely START, STATEi and HALT, can we bulid an automation using this system? Since Fliter can be used as the state-transformation function, for instance, FROM denotes the last state, content of the mail denotes the input, and of course FORWOAD is to the next state. Now the question is: can we use filter to build an automation and after sending something to the START, can we finally anticipate an result in the HALT state? If so, we can get the result as somehow like the result of a certain calculation. For instance, my START state will always check if the letter has the word “I” and then forward to STATE1, STATE1 will check if it is from START and contains “LOVE” or not, and forward the NOT to STATE2. STATE2 will always check if it is from STATE1 and has the word “YOU” then forward to HALT. Finally, if we get a mail in the HALT email box, we may say that the string putted to the START state is exactly not a LOVE LETTER:)

But the problem is, this formal system is oblivious. For instance, although it has checked some substrings in the previous states, now we want the current state to check the consequent letters instead of the whole string, which is according to the definition of automation. However, as gmail now doesn’t provide any mechanism like “READ POSITION” or “WRITE BACK” (You know, if so, theoretically, I can use Gmail filter system to build a Turing Machine). Now a question arises: can we build an equivalent Finite State Machine or even the Turing Machine based on a memory-less and read-only system? (Note that this system provides you the powerful string matching functions with the return value of true and false, but you can not write on the tape or remember the current position of the type).

Would someone has any ideas about it? Please feel free to leave me your comments.

BTW, you can easily setup a jabber server, and use a lot of python clients to build the Turing machine, as now you can “write” on the tape. You will have a serious clients called START, STATEi and HALT, it is in fact a kind of cool, I am planing to do it.

Wait a minute, are you stupid or something, can’t you build an automation using Yacc easily. Yes, I know, now my goal is to study the “distributed computer” Can you believe that one day we have a distributed Turing Machine like this :)

———–中文翻译—–Chinese Translation—–
Gmail可以做成有限状态自动机么?

Gmail 有一个很好用的功能叫做Filter, 想必大家都用过。 Fliter核心的功能包括过滤发件人 收件人 含有什么词和不含有什么词。还有一些辅助的 比如加星,加标签等等。 如果我们把每个Gmail邮箱想像成一个状态,fliter就是一个状态转移方程,输入一个先前的状态(From)和一个输入字符串(信件内容), 转移到下一个状态(Forward). 于是,自然我们要问一个问题,采用Gmail能不能搭建一个有限状态机甚至一个图灵机。 好比说我们把状态转移方程,也就是Filter设置好,把一封邮件(初始纸带)发给开始状态叫START, 邮件经过乱七八糟状态转移后或者发送到HALT状态,或者在Gmail网络中循环一辈子,于是,从HALT状态就可以读到结果。

然而我想的未免太好了,其实Filter 仅仅是个只读头,图灵机需要写头和状态存储器,以及当前读写头位置 ,这个都是Gmail目前不能实现的。Gmail形式系统是一个只读无记忆的状态转移机,当然,还有一个支持逻辑表达式查询的强大字符串匹配器。好,现在的问题是,有没有人能发明一套系统或者一种方法,让Gmail形式系统可以至少和有限状态机一样强大(也就是描述出上下文无关文法)

任何的想法,给我写信,这个研究很有趣,对计算能力和有限状态机的理解必定更加深刻。
对了,不知道有没有人把Filter设置成死循环,比如A把B的Forward给C, C for给B, B for 给A. 理论上说Gmail无法避免这样的死循环。任何能解决分布式相互调用系统的死循环避免的人,应该能很自信的把简历往任何大公司投了,这个可不是一个简单的问题。

PS: 1. 我觉得既然目前Gmail没有读写记忆功能,自己写的邮件客户端,或者jabber客户端总是可以修改成完全读写和有记忆功能的。在自己服务器上架一个 jabber, 若干用户叫start, halt 云云,给一个字符串发给START, 在HALT那边看能不能收到结果,很cool (干脆你还可以写概率转移的Markov :)
2. 有人说你笨呀,要自动机你用yacc写一下不就行了。 呵呵,咱这不是研究”分布式” 计算么:)

Blog开张一个月以来,得到好多人的支持。有很多好朋友留下了非常好的评论,有些评论展开的话也是非常好的文章。从今天开始,不定期邀请朋友在我的Blog上发表文章或者我主动转载发表在他们Blog的优秀文章。同时我也会加入自己对这位朋友的介绍和对他文章的一些评论,这样大家也可以互相认识。

今天第一篇,转载的是我的朋友Forrest Sheng Bao 的 Blog 中专门为中国大陆用户所写怎样使用Tor穿越GFW. 原文针对Linux用户,关于Windows的配置可以参见这里

作者介绍:Forrest Sheng Bao 是Texas Tech University 研究生, 也是一个Linux的狂热爱好者。我们通过百合认识并在其后熟悉。他的研究领域包括生物信息学,计算机科学,信号处理和图像科学。你可以通过forrest.bao AT gmail.com 联系他,也可以访问他的个人主页.

———This Original Post —————————————————————————

How to install/configure Tor and Privoxy on Linux

This document is licensed under GNU Free Document License. Permission is granted to obtain, modify, translate and re-distribute it under any circumstance and in any form. The purpose of this document is to help people who are suffering under injustice network censorship policies of some extreme f**king governments.

Question 1: What is Tor?
Tor is a connection-based low-latency anonymous communication system which
addresses many flaws in the original onion routing design. In brief, Onion Routing is a connection-oriented anonymizing communication service.

The latest information can be found at http://tor.eff.org/, or on the mailing lists, archived at http://archives.seul.org/or/talk/ or http://archives.seul.org/or/announce/.

Question 2: What is Privoxy?
Privoxy is a web proxy with advanced filtering capabilities for protecting privacy, filtering web page content, managing cookies, controlling access, and removing ads, banners, pop-ups and other obnoxious Internet junk. Privoxy has a very flexible configuration and can be customized to suit individual needs and tastes.

Question 3: Can Tor and Privoxy help those people in Communism countries?
Yes.

Question 4: How to install Tor and Privoxy?
Linux Users:
* I can here only provide the solution to install them on Debian or Debian-based Linux distributions, such as Ubuntu, Xandros, MEPIS. I will use Ubuntu as the example.
* For Fedora/Red Hat Linux users, maybe you can find the RPM package on their supporting websites or using YUM to install.
* For SuSE Linux users, please use YaST2 to install them.
* Other Linux distribution users, please search on the Internet or consulting BBS, Mail list, etc.

FreeBSD Users:
Tor and Privoxy can work on FreeBSD, you can use port to install or you can download the source to compile by yourself.

Mac OS X Users:
I know Tor and Privoxy can work on Mac OS X. But I haven’t tried.

Windows Users:
Please ask your locate help.

To install Tor and Privoxy on Ubuntu Linux, just run following command
sudo apt-get install tor privoxy

Question 5: What to do after the installation?
1. Install the Firefox TorButton plug-in.
Go to this URL:
https://addons.mozilla.org/firefox/2275/
Click the “Install Now” button to install it. A windows for installation will popup. After the installation, restart Firefox. You will see a button at the right bottom of Firefox.

2. Configure the Privoxy.
Open Privoxy’s “config” file (look in /etc/privoxy/ or /usr/local/etc/) and add the line
forward-socks4a / localhost:9050 .
to the top of the config file. Don’t forget to add the dot at the end.

Privoxy keeps a log file of everything passed through it. In order to stop this you will need to comment out three lines by inserting a # before the line. The three lines are:
logfile logfile
and the line
jarfile jarfile
and (on some systems) the line
debug 1 # show each GET/POST/CONNECT request

You’ll need to restart Privoxy(if you are a newbie of Linux, just reboot the computer) for the changes to take effect.

—————Post—Ends————————————————————————————————