패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.0.5

sentiment_dart

Sentiment Dart는 AFINN-165 어휘 목록을 사용하여 임의의 텍스트 블록에 대한 감성 분석을 수행하는 dart 모듈입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.5천
좋아요
19
Pub 점수
150

패키지 설치

flutter pub add sentiment_dart

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Sentiment Dart는 AFINN-165 단어 목록을 사용하여 텍스트의 감정 분석을 수행하는 가벼운 Dart 패키지입니다. 단어에 대한 감정 극성에 따라 수치 점수를 부여합니다. 개발자들이 플러터 애플리케이션에서 여러 플랫폼에서 사용자 입력, 리뷰, 소셜 미디어 콘텐츠의 감정을 빠르게 평가할 수 있도록 도와줍니다. 외부 API 없이도 기초적인 감정 탐지에 적합하며, 간편하게 통합할 수 있습니다. Android, iOS, Web, macOS, Windows, Linux를 지원하여 크로스플랫폼 사용에 유용합니다.

사용 사례

  • 사용자 리뷰 분석
  • 소셜 미디어 감성 모니터링
  • 고객 피드백 평가
  • 채팅 메시지 내 감정 탐지
  • 콘텐츠 모니터링

주요 기능

  • AFINN-165 어휘 목록 사용
  • 가볍고 빠름
  • 크로스 플랫폼 지원
  • 간단한 API 통합
  • 외부 종속성 없음

적합한 대상

  • 기본 감성 분석
  • 텍스트 입력이 있는 Flutter 앱
  • 실시간 피드백 시스템
  • 교육 프로젝트
  • 저지연 감성 검사

고려 사항

  • 사전 정의된 단어 점수로 제한됨
  • 딥러닝 또는 맥락 인식 없음
  • 비유나 복잡한 언어의 뉘앙스를 처리하지 못할 수 있습니다
  • 고정밀 기업용 사용 사례에 적합하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Sentiment Dart

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

Usage

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]]}
Other language

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]]}
Custom language

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: []}

How it works ?

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.

source

Languages and code

language code
English en
Italian it
french fr
german de

Contribution 🤓

Happy 😍 to recieve or provide contributions related to this package.

Features and bugs 🐛

Please file feature requests and bugs at the issue tracker.

Contact 📧

if you have any questions , feel free to wite us on

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.