科研 Skill
数字人文计算方法
alterlab-digital-humanities
Surveys computational DH methods: text mining, NLP, corpus linguistics, archive standards, GIS, network analysis, and OCR. Use for an overview of available DH tools.
SKILL.md
Digital Humanities Methods and Tools
Overview
Digital humanities (DH) applies computational methods to the study of human culture, history, language, and society. It is not the replacement of humanistic inquiry with algorithms but the augmentation of interpretive scholarship with tools that can reveal patterns invisible to unaided reading, connect dispersed archives, visualize historical processes, and make cultural heritage accessible to broader audiences.
This skill covers the major computational methods used in humanities research: text mining and natural language processing (topic modeling with LDA and BERTopic, sentiment analysis, named entity recognition), corpus linguistics (concordance, collocation, frequency analysis, keyness), digital archiving and metadata standards (Dublin Core, TEI XML), geographic information systems (GIS) for historical research, network analysis of historical figures and literary characters, stylometry and computational authorship attribution, optical character recognition (OCR) workflows for digitizing historical texts, digital scholarly editions, data visualization for humanities data, distant reading as theorized by Franco Moretti, cultural analytics as developed by Lev Manovich, and the Python ecosystem for humanities computing (spaCy, NLTK, Voyant Tools, AntConc).
The skill is designed for humanities scholars who want to integrate computational methods into their research -- whether they are analyzing Victorian novels, mapping colonial trade networks, studying the evolution of political rhetoric, or building digital archives of endangered languages. No prior programming experience is assumed, though some methods require basic Python or R skills. For each method, the skill describes the intellectual rationale, practical implementation, available tools (from no-code to full programming), and critical perspectives on the method's limitations.
When to Use This Skill
Use this skill when you need to:
- Apply topic modeling (LDA, BERTopic) to a large text corpus to discover thematic patterns
- Perform sentiment analysis on historical texts, literary works, or political discourse
- Extract named entities (people, places, organizations, dates) from unstructured text
- Conduct corpus linguistics analysis: concordance, collocation, frequency, keyness
- Create or work with digital archives using Dublin Core or TEI XML metadata standards
- Use GIS to map historical events, trade routes, migration patterns, or spatial narratives
- Build and analyze networks of historical figures, literary characters, or intellectual influence
- Attribute authorship of disputed texts using stylometry and computational methods
- Digitize historical documents using OCR (Tesseract, Kraken, Transkribus)
- Create digital scholarly editions with critical apparatus
- Visualize humanities data using Palladio, Gephi, or custom tools
- Apply distant reading methods to analyze literary trends across large corpora
- Conduct cultural analytics on visual media, social media, or digital culture
- Work with Python NLP tools (spaCy, NLTK) for humanities text analysis
Does NOT Trigger
| Scenario | Use Instead |
|---|---|
| Text as social-science measurement (validated topic/dictionary/classifier pipelines on survey or media data) | alterlab-text-as-data |
| Discourse analysis, conversation analysis, or quantitative content analysis designs | alterlab-social-science-methods |
| Programmatic vector GIS on modern data — spatial joins, buffers, reprojection | alterlab-geopandas |
| Converting modern PDFs/Office files to text rather than OCR of historical scans | alterlab-markitdown |
| Graph algorithms at scale with no humanities source criticism (centrality, communities) | alterlab-networkx |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-text-as-data) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
Core Capabilities
Each capability below gives the WHAT/WHEN and the tools to reach for. Worked examples, code, parameter tables, and tool-comparison matrices live in the references (see the index at the end).
Text Mining and NLP
NLP analyzes text at scales impossible for human readers — not a replacement for close reading but a complement that identifies patterns across thousands of texts and guides which passages to read closely.
- Topic modeling — discover latent themes. LDA (bag-of-words, specify k) for classic distant reading; BERTopic (transformer embeddings + HDBSCAN, auto k) for short/modern text and semantic coherence.
- Sentiment analysis — emotional valence over a text (e.g. a novel's emotional arc). Lexicon (VADER/NRC) → ML → transformer, in increasing accuracy and cost. Validate against human annotation; modern models misclassify historical prose.
- Named entity recognition (NER) — extract people, places, organizations, dates. spaCy is the best general-purpose tool; fine-tune on annotated historical text for archaic spelling and unfamiliar entities.
→ references/methods-and-examples.md (LDA workflow + example, BERTopic code, sentiment-arc code, NER tools + fine-tuning code).
Corpus Linguistics
Empirical analysis of large, structured text collections.
- Concordance (KWIC) — every occurrence of a term in context; reveals usage patterns and collocates.
- Collocation — statistically significant co-occurring words (MI, t-score, log-likelihood, Log Dice).
- Frequency and keyness — keyness compares two corpora to surface what is distinctive about one.
- Tools: AntConc and Voyant (no-code), Sketch Engine / CQPweb (web), NLTK / quanteda (programmable).
→ references/methods-and-examples.md (KWIC/keyness examples, measure-comparison and software tables) and references/dh-tools-guide.md (AntConc and Voyant panel references, statistical measures).
Digital Archives and Metadata
- Dublin Core — 15-element universal metadata vocabulary for describing digital resources.
- TEI XML — the standard for encoding literary/historical texts and building digital scholarly editions (
<persName>,<placeName>,<app>/<rdg>apparatus,<del>/<add>,<unclear>,<gap>,<choice>).
→ references/methods-and-examples.md (Dublin Core element table, full TEI document example, key-element table) and references/dh-tools-guide.md (essential TEI elements).
GIS for Historical Research
Spatial analysis of historical data — georeferencing old maps, event/trade-route mapping, literary geography, urban and environmental history. QGIS (free, full-featured) or ArcGIS; Palladio for humanities-friendly map+network views.
→ references/methods-and-examples.md (tool table, georeferencing workflow) and references/dh-tools-guide.md (detailed QGIS georeferencing).
Network Analysis for Historical Figures
Reveals connection, influence, and community structure among historical actors (correspondence, co-occurrence, citation, kinship, trade, organizational networks). Build an edge list, then analyze in Gephi, NetworkX, or igraph (centrality, community detection, temporal filtering).
→ references/methods-and-examples.md (network-type table, source-to-edge-list workflow).
Stylometry and Authorship Attribution
Statistical analysis of writing style — especially function-word frequencies — to attribute disputed texts. Burrows Delta (z-scores of most-frequent words) is the dominant method; run via the stylo R package, PyDelta, or JGAAP. Needs 2,000-5,000+ words per sample and genre-matched comparisons.
→ references/methods-and-examples.md (feature/tool tables, Delta algorithm, stylo R example) and references/dh-tools-guide.md (complete stylo guide).
OCR Workflows
Convert images of text to machine-readable text; OCR quality is critical for all downstream analysis. Tesseract (general), Kraken (historical/non-Latin scripts), Transkribus (handwriting/HTR). Always report Character Error Rate (target CER < 5%, ideally < 2%).
→ references/methods-and-examples.md (engine table, prep→process→post→QA workflow, Tesseract commands) and references/dh-tools-guide.md (Tesseract/Kraken/Transkribus configuration).
Digital Scholarly Editions
Primary texts with critical apparatus, annotation, facsimiles, search, and stable identifiers — beyond digitized facsimiles. Platforms: EVT, Versioning Machine, TextGrid, FromThePage, Scripto, IIIF.
→ references/methods-and-examples.md (components list, platform table).
Data Visualization for Humanities
Visualization serves both analysis and argument. Palladio (maps/networks/timelines), Gephi (networks), Voyant (text), StoryMapJS/TimelineJS (narrative), D3.js (custom). Treat uncertainty as data, integrate visuals into argument, use accessible palettes, document for reproducibility.
→ references/methods-and-examples.md (tool table, visualization principles).
Distant Reading and Cultural Analytics
- Distant reading (Moretti) — quantitative analysis of large literary corpora: genre trends, title analysis, plot/sentiment trajectories, character networks, stylistic change over literary history.
- Cultural analytics (Manovich) — extends distant reading to images, video, social media, and interface design using OpenCV, Pillow, scikit-image, and related tools.
→ references/methods-and-examples.md (methods, Moretti's arguments, cultural-analytics Python tools).
Python Tools for Humanities Computing
spaCy (industrial NLP: NER, POS, dependency parsing, lemmatization), NLTK (educational corpora, frequency, concordance, collocations), plus no-code Voyant and desktop AntConc.
→ references/methods-and-examples.md (spaCy and NLTK code, Voyant/AntConc capability summaries).
Best Practices and Pitfalls
- Start with a humanistic question; choose the simplest tool that works; learn iteratively; document every corpus, preprocessing, and parameter decision; validate computational patterns with close reading.
- Corpus construction is an argument — justify inclusion/exclusion. Report OCR error rates and preprocessing choices. Preserve raw originals separately.
- Interpretation is required — topic models and visualizations do not speak for themselves; acknowledge each method's blind spots and situate findings in disciplinary scholarship.
- Common pitfalls: black-box NLP use; anachronistic sentiment models on historical text; overclaiming from topics; small corpus with big claims; false geographic precision; stylometry with too little text or genre contamination.
→ references/methods-and-examples.md (full Best Practices and Pitfalls checklists) and references/dh-tools-guide.md (recommended project workflows by scale).
Reference Index
references/methods-and-examples.md— worked examples, code (LDA/BERTopic/sentiment/NER/spaCy/NLTK/stylo/Tesseract), parameter and tool-comparison tables, the full TEI document example, and complete Best-Practices/Pitfalls/References sections.references/dh-tools-guide.md— tool comparison matrix, topic-modeling parameter tuning, AntConc/Voyant panel references, OCR engine configuration (Tesseract/Kraken/Transkribus), essential TEI elements, QGIS georeferencing, the completestyloR guide, recommended project workflows by scale, and further reading.
References (selected)
- Moretti, F. (2005). Graphs, Maps, Trees. Verso. — (2013). Distant Reading. Verso.
- Manovich, L. (2020). Cultural Analytics. MIT Press.
- Blei, D. M., Ng, A. Y., & Jordan, M. I. (2003). Latent Dirichlet Allocation. JMLR, 3, 993-1022.
- Grootendorst, M. (2022). BERTopic. arXiv:2203.05794.
- Burrows, J. (2002). Delta. Literary and Linguistic Computing, 17(3), 267-287.
- Burnard, L., & Bauman, S. (Eds.). (2023). TEI P5 Guidelines. TEI Consortium.
Full bibliography in references/methods-and-examples.md.
Part of the AlterLab Academic Skills suite.
示例提示词
我想对这批历史文本做主题建模和命名实体识别来分析话语变化。
所属插件
安装该插件会一并获得同领域的 62 个 Skill / MCP。
同插件的其他科研 Skill
- 学术文献获取下载Auto-downloads open-access PDFs for graded sources and writes a manual worklist for paywalled items. Use after literature-review, before ingest-source.
- 单篇文献入库管理Adds one verified PDF to a shared bibliography library, computing its citation key and keywords. Use to register a single document outside the full workflow.
- 考古地理信息系统分析Runs archaeological GIS analysis with GeoPandas: catchment analysis, viewshed, kernel density, spatial statistics. Use for mapping archaeological site locations.
- 论证结构提取可视化Extracts and visualizes argument structure: Toulmin reconstruction, support/attack graphs, circularity detection. Use to diagram an argument’s logical structure.
- 考古遗物类型学分析Performs artifact analysis: typological classification, ceramic attribute coding, lithic reduction analysis. Use when classifying excavated artifacts statistically.
- 引文与出处核查Checks citations, quotations, page numbers, and bibliography entries for accuracy and source fit. Use before submission to verify source-supported claims.
- 研究选题构思设计Explores research intent, field state, methodology, and ethics, then writes an approved design doc. Use before starting a new research question or chapter.
- 术语译名一致性检查Audits a manuscript for terms, translations, abbreviations, and names whose forms must stay stable. Use when terminology drift could undermine an argument.
- 计算语用学分析Runs computational pragmatics: speech act classification, implicature detection, discourse coherence, politeness analysis. Use for language-use-and-meaning studies.
- 文献综述学术对话构建Turns verified sources into a structured scholarly conversation among positions, not a chronological summary. Use when synthesizing literature into a debate narrative.
- 语料库语言学分析Performs corpus analysis with NLTK/spaCy: collocation, keyword analysis, KWIC concordance, word2vec, diachronic trends. Use for quantitative text-corpus research.
- 数字档案馆资源检索Queries digital archive REST APIs: Europeana, Chronicling America, Internet Archive, HathiTrust, DPLA, OAI-PMH. Use when searching or harvesting heritage metadata.
- 学术手稿章节撰写Drafts a chapter or article section by section from synthesized wiki content, agreeing each section’s argument first. Use to turn stable research synthesis into prose.
- 研究项目漂移状态检测Checks a shared source library and registered projects for drift: un-indexed PDFs, unmerged keywords, bibkey collisions. Use to audit a multi-project research setup.
- EMI课堂语料转写分析Segments and annotates classroom transcripts, coding language choice and discourse function with anonymised output. Use to quantify classroom talk or translanguaging.
- 人工智能伦理分析Analyzes AI ethics: algorithmic fairness metrics, bias auditing, value alignment, moral philosophy reasoning. Use to evaluate an AI system’s ethical dimensions.
- 研究计划任务执行Executes a ready research plan task by task, gating acquisition before ingest and dispatching analysis. Use after writing-research-plan to run the planned work.
- 研究项目结项清单Runs the final completion checklist: rendering, bibliography, wiki, data, reproducibility, archiving. Use when a manuscript is finalized and ready to publish.
- 形式逻辑自动推理Applies formal logic tools: Z3 SMT solver, modal logic S5, SAT encoding, Lean4 proof verification. Use to formalize or mechanically check a logical argument.
- 研究问题凝练构建Turns a broad topic or intuition into a precise, contestable, researchable question. Use at the start of a project when no defensible question yet exists.
- 历史地理信息系统分析Performs historical GIS work: georeferencing old maps, digitizing boundaries, temporal territory overlays, population interpolation. Use for historical spatial analysis.
- 历史语言学比较分析Analyzes historical linguistics in Python: sound correspondences, cognate detection, phylogenetic trees, Swadesh lists. Use when reconstructing language relationships.
- 历史社会网络分析Builds historical network analyses: correspondence networks, prosopography, temporal community detection, Gephi export. Use to map relationships among historical actors.
- 历史文献OCR识别Transcribes printed and handwritten historical documents with Tesseract/Kraken OCR, confidence filtering, spell correction. Use for digitizing scanned historical text.
常见问题
数字人文计算方法能做什么?
Surveys computational DH methods: text mining, NLP, corpus linguistics, archive standards, GIS, network analysis, and OCR. Use for an overview of available DH tools。
如何安装数字人文计算方法?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「数字人文计算方法」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
数字人文计算方法需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
数字人文计算方法经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。