corpus-linguistics

Extract tokens, frequencies, collocations, keywords, and KWIC concordances from raw text.

33|6|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill corpus-linguistics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: corpus-linguistics
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/12-linguistics/corpus-linguistics
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill corpus-linguistics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you turn raw text corpora into measurable linguistic insights, like frequencies, key keywords, collocations, and concordance lines, so you can analyze language use quantitatively instead of manually.

Core Features & Use Cases

  • Corpus preprocessing with NLTK + spaCy: tokenization, optional lemmatization, POS tagging support, and named-entity extraction using spaCy pipelines.
  • Descriptive frequency analysis: unigram/bigram/trigram counts, type-token ratio, hapax legomena, and vocabulary statistics.
  • Key word and association discovery: log-likelihood keyword analysis against a reference corpus plus collocation scoring (PMI / log-likelihood / t-score) to surface meaningful word pairings.
  • KWIC concordance (Key Word In Context): produce context windows around a chosen keyword to inspect usage patterns.
  • Distributional semantics (word2vec): train word2vec models and compute cosine similarity to compare semantic neighborhoods.
  • Diachronic-ready workflows: structure outputs (per year/decade/partition) to track how lexical patterns and associations change over time.

Quick Start

Use the corpus-linguistics skill to preprocess your texts, then compute keywords and KWIC for a target term you care about against a reference corpus.

Frequently Asked Questions about corpus-linguistics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract and analyze word frequency profiles from raw text corpora?

You can extract word frequency profiles from raw text corpora by using this Skill to preprocess text with NLTK and spaCy, then compute unigram and bigram counts, type-token ratios, and vocabulary statistics for quantitative analysis.

How do I generate KWIC concordance lines to inspect word usage contexts?

To generate KWIC concordance lines, this Skill creates context windows around your chosen keyword, allowing you to qualitatively inspect usage patterns and surrounding linguistic units within the target text.

Can I calculate log-likelihood keyness statistics to compare terminology across domains?

Yes, you can calculate log-likelihood keyness statistics against a reference corpus to discover keywords and compare terminology across domains using Dunning-style log-likelihood scoring.

Does this Skill support collocation mining using PMI and t-scores?

This Skill supports collocation mining by computing Pointwise Mutual Information (PMI), log-likelihood, and t-scores to surface statistically meaningful word pairings and associations from your text.

What is the best way to track diachronic lexical change over time?

To track diachronic lexical change, this Skill structures outputs by year, decade, or partition, allowing you to monitor how lexical patterns and word associations shift across different time periods.

Can I train word2vec models with gensim for distributional semantics?

Yes, you can optionally train word2vec models with gensim to compute cosine similarity, compare semantic neighborhoods, and perform distributional semantics analysis on your corpus.