Install
openclaw skills install nlp-text-analyzerNLP文本分析器 - 支持分词、情感分析、关键词提取、文本分类等自然语言处理功能 | NLP Text Analyzer - Tokenization, sentiment analysis, keyword extraction, text classification
openclaw skills install nlp-text-analyzer强大的自然语言处理工具,支持中文和英文文本分析,包含分词、情感分析、关键词提取等功能。
本Skill提供完整的NLP文本分析能力:
nlp-text-analyzer/
├── SKILL.md # 本文件
├── README.md # 使用文档
├── requirements.txt # 依赖声明
├── scripts/
│ └── text_analyzer.py # 文本分析脚本
├── examples/
│ └── basic_usage.py # 使用示例
└── tests/
└── test_nlp.py # 单元测试
from scripts.text_analyzer import TextAnalyzer
# 初始化分析器
analyzer = TextAnalyzer()
# 中文分词
text = "自然语言处理是人工智能的重要分支"
tokens = analyzer.segment(text)
print(tokens)
# ['自然语言', '处理', '是', '人工智能', '的', '重要', '分支']
# 情感分析
sentiment = analyzer.analyze_sentiment("这个产品真的很棒!")
print(sentiment)
# {'polarity': 0.95, 'subjectivity': 0.8}
# 关键词提取
keywords = analyzer.extract_keywords(text, top_k=5)
print(keywords)
# [('人工智能', 1.5), ('自然语言', 1.2), ...]
MIT
Powerful NLP tool supporting Chinese and English text analysis, including tokenization, sentiment analysis, keyword extraction.
This Skill provides complete NLP text analysis capabilities:
nlp-text-analyzer/
├── SKILL.md # This file
├── README.md # Usage documentation
├── requirements.txt # Dependencies
├── scripts/
│ └── text_analyzer.py # Text analysis script
├── examples/
│ └── basic_usage.py # Usage examples
└── tests/
└── test_nlp.py # Unit tests
from scripts.text_analyzer import TextAnalyzer
# Initialize analyzer
analyzer = TextAnalyzer()
# Chinese tokenization
text = "Natural language processing is an important AI branch"
tokens = analyzer.segment(text)
print(tokens)
# Sentiment analysis
sentiment = analyzer.analyze_sentiment("This product is really amazing!")
print(sentiment)
# {'polarity': 0.95, 'subjectivity': 0.8}
# Keyword extraction
keywords = analyzer.extract_keywords(text, top_k=5)
print(keywords)
MIT