sentiment_dart
Sentiment Dart는 AFINN-165 어휘 목록을 사용하여 임의의 텍스트 블록에 대한 감성 분석을 수행하는 dart 모듈입니다.
Sentiment Dart는 AFINN-165 단어 목록과 이모지 감성 순위를 사용하여 임의의 입력 텍스트에 대한 감성 분석을 수행하는 Dart 모듈입니다. Sentiment Dart는 JavaScript 패키지 sentiment에 크게 영향을 받았습니다.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Sentiment Dart is a dart module that uses the AFINN-165 wordlist and Emoji Sentiment Ranking to perform sentiment analysis on arbitrary blocks of input text. Sentiment Dart heavily inspired by the Javascript package sentiment
import 'package:sentiment_dart/sentiment_dart.dart';
main() {
void main() {
print(Sentiment.analysis('i hate you piece of shit 💩'));
print(Sentiment.analysis('i hate you piece of shit 💩',emoji: true));
}
}
output
{score: -7, comparative: -1.1666666666666667, words: [i, hate, you, piece, of, shit], good words: [], badword: [[hate, -3], [shit, -4]]}
{score: -8, comparative: -1.1428571428571428, words: [i, hate, you, piece, of, shit, 💩], good words: [], badword: [[hate, -3], [shit, -4], [💩, -1]]}
example
import 'package:sentiment_dart/sentiment_dart.dart';
main() {
void main() {
print(Sentiment.analysis('ti odio un pezzo di merda 💩',languageCode: 'it'));
print(Sentiment.analysis('ti odio un pezzo di merda 💩',emoji: true,languageCode: 'it'));
}
}
output
{score: -7, comparative: -1.1666666666666667, words: [ti, odio, un, pezzo, di, merda], good words: [], badword: [[odio, -3], [merda, -4]]}
{score: -8, comparative: -1.1428571428571428, words: [ti, odio, un, pezzo, di, merda, 💩], good words: [], badword: [[odio, -3], [merda, -4], [💩, -1]]}
example
import 'package:sentiment_dart/sentiment_dart.dart';
main() {
void main() {
var customLang = {'i': 1, 'love': 1, 'dart': 5,'car':2};
print(Sentiment.analysis('i love dart',customLang: customLang));
}
}
output
{score: 7, comparative: 2.3333333333333335, words: [i, love, dart], good words: [[i, 1], [love, 1], [dart, 5]], badword: []}
AFINN is a list of words rated for valence with an integer between minus five (negative) and plus five (positive). Sentiment analysis is performed by cross-checking the string tokens (words, emojis) with the AFINN list and getting their respective scores.
| language | code |
|---|---|
| English | en |
| Italian | it |
| french | fr |
| german | de |
Happy 😍 to recieve or provide contributions related to this package.
Please file feature requests and bugs at the issue tracker.
if you have any questions , feel free to wite us on
의존성 목록 3 개
^0.0.6^1.8.0^1.6.0사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗