R tokenizers package for text tokenization. Use for fast, consistent tokenization of text.
Scanned 6/4/2026
Install via CLI
openskills install LeoLin990405/r-analytics-skill---
name: tokenizers
description: R tokenizers package for text tokenization. Use for fast, consistent tokenization of text.
---
# tokenizers
Fast, consistent tokenization of natural language text.
## Word Tokenization
```r
library(tokenizers)
# Tokenize into words
tokenize_words("This is a test sentence.")
# Multiple texts
texts <- c("First sentence.", "Second sentence.")
tokenize_words(texts)
```
## Options
```r
# Lowercase
tokenize_words(text, lowercase = TRUE)
# Keep punctuation
tokenize_words(text, strip_punct = FALSE)
# Keep numbers
tokenize_words(text, strip_numeric = FALSE)
# Stopwords
tokenize_words(text, stopwords = stopwords::stopwords("en"))
```
## Sentence Tokenization
```r
# Tokenize into sentences
tokenize_sentences("First sentence. Second sentence!")
# With abbreviations
tokenize_sentences(text, strip_punct = FALSE)
```
## Character Tokenization
```r
# Single characters
tokenize_characters("hello")
# Character shingles
tokenize_character_shingles("hello", n = 3)
```
## N-grams
```r
# Word n-grams
tokenize_ngrams("This is a test", n = 2)
# Range of n-grams
tokenize_ngrams("This is a test", n = 2, n_min = 1)
# Skip-grams
tokenize_skip_ngrams("This is a test", n = 2, k = 1)
```
## Paragraph Tokenization
```r
# Split by paragraphs
text <- "First paragraph.\n\nSecond paragraph."
tokenize_paragraphs(text)
```
## Line Tokenization
```r
# Split by lines
tokenize_lines("Line 1\nLine 2\nLine 3")
```
## Regex Tokenization
```r
# Custom pattern
tokenize_regex(text, pattern = "\\s+")
```
## Word Stems
```r
# Tokenize and stem
tokenize_word_stems("running cats jumping")
# With language
tokenize_word_stems(text, language = "english")
```
## PTB Tokenization
```r
# Penn Treebank style
tokenize_ptb("It's a test.")
```
## Tweet Tokenization
```r
# Twitter-aware tokenization
tokenize_tweets("Hello @user! Check out #rstats http://example.com")
```
## Count Tokens
```r
# Count words
count_words("This is a test sentence.")
# Count sentences
count_sentences("First. Second. Third.")
# Count characters
count_characters("hello")
```
No comments yet. Be the first to comment!
This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.
Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...
Get current weather and forecasts (no API key required).
Focused Signals scout for PostHog projects using revenue analytics. Watches the derived revenue product for upstream failures (Stripe sync stalls, capture regressions), config drift (missing subscription property, currency mix surprises, broken Stripe↔person joins, deferred-revenue gaps), and goal-miss escalations. Emits findings only when they clear the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet — no dependencies on ...
Focused Signals scout for finding observability gaps in PostHog itself — significant event volumes the team isn't tracking, custom events with no insight or dashboard coverage, insights pointing at events that have stopped firing, dashboards missing related context, critical events with no alerts. Watches the event-stream-vs-saved- inventory delta as the team's product evolves and emits findings recommending new insights, dashboard additions, or alerts when gaps clear the confidence bar. Self...