视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
core-nlp-workflows【文档与办公】Use TextBlob document-level NLP workflows for tokenization, sentence splitting, POS tags, noun phrases, sentiment, parsing, counts, and Blobber routing.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task starts from raw text and needs TextBlob's
high-level document or sentence APIs: TextBlob, Sentence, Blobber, words,
tokens, sentences, POS tags, noun phrases, sentiment, parsing, n-grams, counts,
JSON serialization, or built-in model overrides.
Route elsewhere when the request is mostly about:
WordList batch transforms: ../word-and-lexical-tools/SKILL.md.TextBlob(..., classifier=...): ../classifiers-and-data-formats/SKILL.md.Blobber
factories with custom components: ../custom-models-and-extensions/SKILL.md.Blobber.python scripts/core_nlp_smoke.py --help.TextBlob(text) for ordinary raw text. The
constructor validates tokenizer, POS tagger, NP extractor, analyzer, and
parser objects when custom ones are supplied..sentences for Sentence objects and sentence-level processing..words for word tokens without punctuation..tokens or .tokenize(tokenizer) when punctuation or a custom
tokenizer contract matters..tags/.pos_tags for flattened POS tags across sentences..noun_phrases for normalized lowercase noun phrase strings..sentiment, .polarity, .subjectivity, or
.sentiment_assessments for built-in sentiment workflows..parse() for the pattern-style parse string..word_counts, .np_counts, and .ngrams(n) for simple counts and
phrase windows.Blobber when models should be shared. Blobber(...) creates
TextBlob instances that reuse the same tokenizer, tagger, extractor,
analyzer, parser, and classifier objects. This is useful for expensive or
configured models; route to the custom-model sub-skill when implementing the
components themselves.--skip-corpus-heavy only when POS, sentences, and noun phrases are not part
of the task.from textblob import Blobber, TextBlob
from textblob.sentiments import NaiveBayesAnalyzer
from textblob.tokenizers import WordTokenizer
blob = TextBlob("TextBlob is amazingly simple. Great fun!")
[str(s) for s in blob.sentences]
[(str(word), tag) for word, tag in blob.tags]
blob.noun_phrases
blob.sentiment.polarity
blob.ngrams(2)
# Discrete sentiment analyzer trained from movie_reviews corpus.
TextBlob("I love this library", analyzer=NaiveBayesAnalyzer()).sentiment
# Shared model factory.
tb = Blobber(tokenizer=WordTokenizer())
first = tb("one text")
second = tb("another text")
assert first.tokenizer is second.tokenizer
If .tags, .sentences, or .noun_phrases raises MissingCorpusError, do not
silently switch algorithms. Use references/troubleshooting.md
to identify the missing corpus and run the explicit setup command in the target
environment.