🦀 ClawHub
NLP Text Analyzer
by @kaiyuelv
NLP文本分析器 - 支持分词、情感分析、关键词提取、文本分类等自然语言处理功能 | NLP Text Analyzer - Tokenization, sentiment analysis, keyword extraction, text classification
💡 Examples
from scripts.text_analyzer import TextAnalyzerInitialize 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)
TERMINAL
clawhub install nlp-text-analyzer