牛B的Mathematica:寻找开头和结尾都是字母y的形容词

    只有想不到,没有做不到。还是在这里,我惊奇地发现Mathematica居然有DictionaryLookup和WordData这样的函数(我的6.0里就有,不知道5.x有没有)。于是,一连串牛B的Mathematica用法出现了:

 
包含ijk三个连续字母的单词:
In[1]:= DictionaryLookup["*" ~~ "ijk" ~~ "*"]
Out[1]= {"Dijkstra"}

 
连续三次出现重复字母的单词:
In[2]:= DictionaryLookup[RegularExpression[".*(.)1(.)2(.)3.*"]]
Out[2]= {"bookkeeper", "bookkeepers", "bookkeeping"}

 
首尾三个(及以上)的字母完全相同的单词:
In[3]:= DictionaryLookup[RegularExpression["([a-z]{3,})[a-z]*1"]]
Out[3]= {"abracadabra", "anticoagulant", "antidepressant",
"antioxidant", "antiperspirant", "bedaubed", "beriberi", "bonbon",
"cancan", "chichi", "couscous", "dumdum", "entailment",
"entanglement", "entertainment", "enthrallment", "enthronement",
"enticement", "entitlement", "entombment", "entrainment",
"entrancement", "entrapment", "entrenchment", "froufrou", "hotshot",
"hotshots", "ingesting", "ingoing", "ingraining", "ingratiating",
"ingrowing", "ionization", "mesdames", "microcosmic", "murmur",
"muumuu", "outshout", "outshouts", "physiography", "pompom",
"redelivered", "rediscovered", "respires", "restores",
"restructures", "tartar", "tessellates", "testates", "testes",
"tormentor", "tsetse", "underfund", "underground"}

Read more…

新发现的一些有趣的anagram

Wolfram Blog最近提到了一些新发现的anagram (?),比起那些经典的anagram毫不逊色。它们是:

Centenarian == Near ancient.   (Dan Fortier)
Heel claims == me, Achilles.   (Paul Pan)
Remains hot == in a Thermos.   (Adrian Hickford)
True friends == endure rifts.   (Joe Fathallah)
Homo sapiens == Ape’s son, IMHO.   (Noam D. Elkies)
Internet spam == It’s permanent.   (Tom Myers)
Rats and mice == in cat’s dream.   (Joe Fathallah)
Metamorphosis == Promises a moth.   (Andrew Brehaut)
A marble statue == Mute alabaster.   (Rosie Perera)
Borderline case == Reconsiderable.   (David Bourke)
Slices of bread == describes loaf.   (Dean Mayer)
I’d do anything! == Had no dignity.   (Tony Crafter)
Valentine amulets == Sentimental value.   (Allan Morley)
Designated driver == Danger is diverted.   (Mick Tully)
American education == An academic routine.   (Jesse Frankovich)
Gone with the Wind? == Then weigh it down!   (Toby Gottfried)
One thousand kilos == Oh, sounds like a ton!   (Hans-Peter Reich)
Classified document == Found access limited.   (Adrian Hickford)
A domestic housecat == Does it catch a mouse?   (David Bourke)
An appointment diary == Pop in at any darn time.   (Larry Brash)
Spaghetti & meatballs == Best light pasta meal.   (Toby Gottfried)

Read more…

关于北大中文系应用语言学(上):更多有趣的汉语语法现象

    今年年初就有写这篇文章的打算,但迟迟未动键盘。我一直想给大家介绍一下北大中文系的应用语言学专业,与大家分享一下自己的亲身经历和切身体会,让更多理科生关注这个新兴专业,顺便也骗一些理科小loli到我们专业来(我喜欢的类型)。现在离高考越来越近了,再不写就不行了。其它一些废话我就不多说了,关于北大中文系应用语言学专业到底是咋回事,包括它的定位和出路,网上到处都有介绍。你可以在这里看到一些比较正式的专业介绍,以及一份详细的课程表。其它一些如志愿填报、学习生活之类的比较杂的问题我也不谈了,王婵娟师姐的文章已经写的很详细了。这里主要侃一下我目前所学到的几门课程。

    考虑到这篇文章可能会被到处转载,首先告诉大家,我的Blog是matrix67.com。你可以从这个Blog的内容里看到,我的思维是非常纯的理科思维,除了科幻小说和文字游戏以外,对语言文字提不起任何兴趣。因此,这里你可以看一看,一个对传统文学甚至有些抵触心理的应用语言学学生是如何看这个专业的。
    大一的专业课主要是现代汉语、古代汉语、现代文学史、计算概论和高等数学(C)。计算概论说穿了就是学C语言,高等数学说穿了就是微积分。这两个我都不说了。这里主要说一下前面三个和中文相关的专业课程。

现代汉语

    现代汉语是所有中文的专业课中最科学的课程之一,说穿了就是现代汉语语言学。我是相当喜欢这门课程的,希望你读到下面这段文字后也会对这门课产生一些兴趣。之前写了这篇日志,讲了汉语中某些词类的个别词语的特殊语法现象,想不到真的有人感兴趣,并期待我更新更多类似的东西。我们继续那篇日志,再选一些现代汉语课上学到的有趣的东西说说,希望大家能喜欢。

Read more…

另类思维训练:你能想出这样的词吗?

    我承认我确实N久没更新了,整天写那个该死的现文史论文。昨天终于写完了,休息一下,今天又来更新~~
    中文系里的课程也有比较科学的,我觉得现代汉语是所有中文系必修课程中最科学的课。上学期讲完语音后,这学期进入了语法部分。我一直想写一点与语言学相关的东西,骗些理科小MM来这个专业玩。这里先说一些最近几次课上比较有趣的东西,一些比较系统的汉语语言学小知识留着以后再说吧。下次课我们可能还会学到一些类似的东西,到时候我接着在这儿更新。
    下面是一些有趣的题目,它们可以从另一个角度来考验你的思维能力。先不忙着看答案,看你能想出多少来。

1. 找一个动词,它前面不能加“不”
2. 找一个动词,它前面不能加“没”
3. 找一个动词,它前面既不能加“不”,也不能加“没”
4. 找一个动词,它后面不能加助词“着”、“了”、“过”
5. 找一个动词,它前面可以直接加“很”来修饰
6. 找一个形容词,它前面不能加“不”
7. 找一个形容词,它前面不能加“很”
8. 找一个形容词,它不能直接用作定语
9. 找一个形容词,它不能重叠使用(如“高高的”、“高高兴兴的”)
10. 找一个名词,它前面不能加数量词来修饰
11. 找一个名词,它不能用作主语
12. 找一个名词,它不能用作宾语
13. 找一个名词,它后面可以加上“地”用作状语
14. 找一个名词,它可以直接用作状语(不加“地”)
Read more…

文字游戏之Buffalo buffalo Buffalo buffalo buffalo…

    上学期的英语课里学到的一个最牛B的东西就是“a moving moving moving van”。你知道短语里每个“moving”各是什么意思吗?答案如下:

A truck which carries everything you own is a moving van, and it's easy to visualize a moving moving van. Can you imagine, though, being moved to tears about moving your possessions and thus seeing it as a moving moving moving van?

    当然,这还不算牛B。另一个经典的牛B句子包含了五个连续的“and”:

The landlord of a pub called The Pig And Whistle asked a signwriter to make a new sign. When he saw it he thought that the words were too close together so he said to the signwriter "I want more space between Pig and And and And and Whistle".

    另外,那个关于had had had的句子也很有趣。你能给下面这句话加上合适的标点吗?

John where Peter had had had had had had had had had had had the most marks in the exam

    加上合适的标点后,这句话的内容是完全合理的。这句话可能会出现在语法课上,可以理解如下:

John, where Peter had had 'had', had had 'had had'; 'Had had' had had the most marks in the exam.

    这句话的另一个常见的版本是:

James while John had had had had had had had had had had had a better effect on the teacher

    之所以写这些东西,是因为刚才在digg上看到了一个类似的牛B东东。你相信吗,下面这句话在语法上是完全合理的,整句话里不再需要引号之类的其它标点:

Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.

    试图理解这句话之前,你可以先查一查单词buffalo有哪些意思。buffalo可以当水牛讲,而Buffalo也是美国纽约的一个城市。buffalo还可以用作动词,是恐吓、威胁的意思。因此,这句话可以这样理解:

[Those] (Buffalo buffalo) [whom] (Buffalo buffalo buffalo) buffalo (Buffalo buffalo).

    意思是,Buffalo市里有这样一些水牛,该市的其它水牛都威吓着它们,而它们反过来也恐吓着这个城市里的其它水牛。