语言与文风2018blog.jonlu.ca
用 K-Means 聚类做《联邦党人文集》的作者归属分析
The Federalist Papers: Author Identification Through K-Means Clustering
导读
本文用 K-Means 聚类(一种无监督机器学习方法)分析《联邦党人》文集的语言特征,判断哪些文章出自汉密尔顿、麦迪逊等不同作者之手。对写作者来说,这是一次"用统计方法识别文风"的示范,也提醒我们:遣词造句的习惯会留下可被量化的个人指纹。
可以直接用的写作要点
- 01
文风是可量化的:虚词频率、句长等看似无意义的小习惯,往往比内容更能暴露作者身份。
- 02
想模仿或区分某位作者,可以从高频功能词和句式入手,而不是只盯着主题和观点。
- 03
写作前先弄清哪些文章的作者归属有定论、哪些有争议;把"已知"当作检验自己判断力的标尺。
- 04
无监督方法(先聚类再看结果)比先入为主的分类更能发现意料之外的文风分组。
HN 评论精选
经典统计学早有类似研究,且无监督方法泛化能力更强。
1963年 Mosteller 和 Wallace 在 JASA 发表《作者身份问题中的推断》,用贝叶斯词分布模型分析有争议的联邦党人文章。有趣的是,除12篇外其余文章都有公认的作者归属,所以监督学习同样可行。我常觉得,只要无监督方法错误率够低,就比监督方法更可取,因为它更容易泛化。
jaimie查看英文原文
This is a fun exercise. Back in 1963, Fred Mosteller and David L. Wallace wrote a piece in the Journal of the American Statistical Association titled "Inference in an Authorship Problem: A comparative study of discrimination methods applied to the authorship of the disputed Federalist papers" [0]. It describes another technique for analyzing the authorship using a Bayesian model of word distributions. One interesting thing about this is the claim that there is a ground truth for all but 12 of the papers, meaning that supervised learning could also be used. For discussion, I often think that unsupervised methods are preferred to supervised methods, given a reasonably low error rate by the unsupervised method, as it will be able to generalize more readily. [0] https://www.jstor.org/stable/2283270
作者自陈是新手,主动邀请方法上的批评。
这是我在无监督 NLP 上的第一个项目,如果文章或方法有明显问题,欢迎指出。
jonluca查看英文原文
This is my first project in unsupervised NLP, so let me know if there's anything obviously wrong with the article or methodology.
玩笑:同一方法可套用到任何文本,结论未必可信。
我做过类似的练习,然后把它套用到 Titor 的帖子。结果发现 Alexander Hamilton 就是 John Titor。
swalsh查看英文原文
I did a similar exercise, and then applied it to the Titor posts. Turns out Alexander Hamilton is John Titor.
作者归属分析可迁移到匿名作者的著名悬案。
不妨用比特币论坛帖子和密码学论文来试试中本聪是谁。
shiado查看英文原文
Now try Satoshi Nakamoto with bitcointalk posts and papers in cryptography.
同类还值得读
像说话一样写作
Write like you talk
这篇短文主张写作应像说话一样自然、清晰,避免装腔作势的书面腔。
语言与文风2015 · 647 分 · 272 评4 条写作要点编辑精选法律语言难懂源于写作不佳,而非专业概念
Poor writing, not specialized concepts, drives difficulty with legal language
这是一项认知科学研究:法律文本难懂,主要不是因为充斥专业术语,而是因为写作者把句子写得又长又绕、修饰语层层嵌套、回指距离过远。
语言与文风2022 · 559 分 · 322 评5 条写作要点编辑精选写得简单
Write Simply
保罗·格拉汉姆在这篇短文里主张:好文章应该写得简单——用日常词汇、短句、直白的结构,不为显得聪明而堆砌复杂表达。
语言与文风2021 · 484 分 · 330 评4 条写作要点编辑精选Tortured phrases:科学写作中出现的一种可疑文风
Tortured phrases: A dubious writing style emerging in science
《自然》新闻报道了一种在科学论文中蔓延的怪现象:原本标准的术语被同义替换软件改写成了古怪说法,比如把 "cloud computing" 写成 "haze figuring"。
语言与文风2021 · 329 分 · 256 评4 条写作要点编辑精选乔治·奥威尔 1940 年对《我的奋斗》的书评
George Orwell's review of Mein Kampf (1940)
这是奥威尔1940年对《我的奋斗》的书评。
语言与文风2014 · 305 分 · 240 评4 条写作要点编辑精选