nlp-basics
Process and analyze text using modern NLP techniques - preprocessing, embeddings, and transformers
npx skills add majiayu000/claude-skill-registry --skill nlp-basics --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# NLP Basics Skill > Transform unstructured text into structured insights. ## Quick Start ```python from transformers import AutoTokenizer, AutoModel import torch # Load model and tokenizer tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased') model = AutoModel.from_pretrained('bert-base-uncased') # Tokenize text = "Machine learning is transforming industries." inputs = tokenizer(text, return_tensors='pt', padding=True, truncation=True) # Get embeddings with torch.no_grad(): outputs = model(**inputs) embeddings = outputs.last_hidden_state.mean(dim=1) # [CLS] pooling print(f"Embedding shape: {embeddings.shape}") ``` ## Key Topics ### 1. Text Preprocessing ```python import re from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer class TextPreprocessor: def __init__(self): self.lemmatizer = WordNetLemmatizer() self.stop_words = set(stopwords.words('english')) def clean(self, text): # Lowercase text = text.lower() # Remove URLs text = re.sub(r'http\S+', '', text) # Remove special chars text = re.sub(r'[^\w\s]', '', text) # Tokenize and filter tokens = word_tokenize(text) tokens = [self.lemmatizer.lemmatize(t) for t in
- Quick Start
- Key Topics
- 1. Text Preprocessing
- 2. Word Embeddings
- 3. Text Classification
- 4. Named Entity Recognition
- 5. Semantic Search
- Best Practices
- DO
- DON'T
- Exercises
- Exercise 1: Sentiment Analysis
- Exercise 2: Semantic Search
- Unit Test Template
What does the nlp-basics skill do?
Process and analyze text using modern NLP techniques - preprocessing, embeddings, and transformers
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill nlp-basics --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
