Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/text-mining-guide
Apply NLP and text mining techniques to research text data
Passed 18 of 24 test cases with the skill, and 18 of 24 without it.
0 fixed18 passed either way6 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
The instructions your model reads when the skill loads.
A skill for applying natural language processing (NLP) and text mining techniques to research data. Covers text preprocessing, feature extraction, topic modeling, sentiment analysis, and named entity recognition for analyzing surveys, abstracts, social media, and document corpora.
import re
from collections import Counter
def preprocess_text(text: str, lowercase: bool = True,
remove_numbers: bool = False,
min_word_length: int = 2) -> list[str]:
"""
Preprocess text for NLP analysis.
Args:
text: Raw input text
lowercase: Convert to lowercase
remove_numbers: Remove numeric tokens
min_word_length: Minimum token length to keep
"""
if lowercase:
text = text.lower()
# Remove URLs
text = re.sub(r"http\S+|www\.\S+", "", text)
# Remove HTML tags
text = re.sub(r"<[^>]+>", "", text)
# Remove special characters (keep apostrophes for contractions)
text = re.sub(r"[^a-zA-Z0-9\s']", " ", text)
# Tokenize
tokens = text.split()
test cases passed, vs 18 / 24 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.