Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/digital-humanities-guide
Computational methods for humanities research including text mining and netwo...
Passed 22 of 25 test cases with the skill, and 19 of 25 without it.
3 fixed19 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
I am analyzing a dataset of historical epistolary records where each record is a dictionary containing sender, recipient, date, and location fields. I'd like a Python script using NetworkX that converts this list of letters into a weighted graph structure representing the social connections, and calculates standard graph centrality metrics directly onto the network nodes to help identify key historical figures and bridges.
| Checked | Without skill | With skill |
|---|---|---|
| Instantiates an undirected graph using nx.Graph. | Missed | Passed |
| Stores degree centrality into node attribute dictionaries. | Passed | Passed |
| Stores betweenness centrality into node attribute dictionaries. | Passed | Passed |
The instructions your model reads when the skill loads.
A skill for applying computational and quantitative methods to humanities research. Covers text mining, network analysis, spatial humanities, and digital archival methods. Designed for researchers bridging traditional humanities with data-driven approaches.
import re
from collections import Counter
def prepare_corpus(texts: list[str], stopwords: set = None) -> list[list[str]]:
"""
Tokenize and clean a corpus of texts for analysis.
Args:
texts: List of raw text strings
stopwords: Set of words to remove
Returns:
List of tokenized, cleaned documents
"""
if stopwords is None:
stopwords = {'the', 'a', 'an', 'and', 'or', 'but', 'in', 'on',
'at', 'to', 'for', 'of', 'with', 'is', 'was', 'are'}
processed = []
for text in texts:
# Lowercase and remove punctuation
tokens = re.findall(r'\b[a-z]+\b', text.lower())
# Remove stopwords and short tokens
tokens = [t for t in tokens if t not in stopwords and len(t) > 2]
processed.append(tokens)
return processed
def compute_tfidf(corpus: list[list[str]]) -> dict:
"""Compute TF-IDF scores for term importance analysis."""
import math
n_docs = len(corpus)
# Document frequency
test cases passed, vs 19 / 25 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.