डार्ट सेंटिमेंट एक डार्ट मॉड्यूल है जो एफिन-165 शब्द सूची और इमोजी सेंटिमेंट रैंकिंग का उपयोग करके आर्बिट्रेट इनपुट टेक्स्ट ब्लॉक पर सेंटिमेंट विश्लेषण करता है।
सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Dart Sentiment एक हल्का Dart पैकेज है जो AFINN-165 शब्द सूची और इमोजी संवेदना रैंकिंग का उपयोग करके पाठ पर संवेदना विश्लेषण करता है। यह इनपुट पाठ के लिए संवेदना स्कोर निर्धारित करता है, जिससे डेवलपर्स को उपयोगकर्ता-उत्पादित सामग्री में भावनात्मक टोन का आकलन करने में सक्षम बनाता है। यह पैकेज Android, iOS, Web, macOS, Windows और Linux जैसे कई प्लेटफॉर्म का समर्थन करता है, जिससे यह वास्तविक समय में संवेदना मूल्यांकन की आवश्यकता वाले क्रॉस-प्लेटफॉर्म एप्लिकेशन के लिए आदर्श है। यह सरलता और दक्षता के लिए डिज़ाइन किया गया है, और केवल मूल Dart लाइब्रेरी के अलावा कोई बाहरी निर्भरता नहीं है।
उपयोग
उपयोगकर्ता समीक्षाओं का विश्लेषण करना
सोशल मीडिया सेंटिमेंट की निगरानी
ग्राहक प्रतिक्रिया का मूल्यांकन करना
चैटबॉट प्रतिक्रियाओं को बढ़ावा देना
ब्रांड अपरिचय का ट्रैकिंग
मुख्य विशेषताएँ
AFINN-165 और इमोजी सेंटिमेंट डेटा का उपयोग करता है
प्लेटफॉर्म के अनुकूलता
सरल API एकीकरण
रियल-टाइम भावना स्कोरिंग
कोई बाहरी निर्भरता नहीं
इनके लिए उपयुक्त
मोबाइल और वेब ऐप्स
ग्राहक अनुभव उपकरण
भावना-आधारित विश्लेषण
सोशल मीडिया मॉनिटरिंग
फीडबैक प्रणालियाँ
विचार योग्य बातें
पूर्वनिर्धारित शब्दकोशों तक सीमित
कस्टम सेंटिमेंट शब्दकोश समर्थित नहीं है
संदर्भ या उपहास को पकड़ने में संभवतः असमर्थ
सटीकता इनपुट पाठ शैली पर निर्भर करती है
बहुभाषी भावना विश्लेषण के लिए उपयुक्त नहीं
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Provide Language support for English, Italian, French and German.
Provide support for various emojis.
Based on analysis of text, provide an integer value in the range -n to +n (see details below)
Installation
add following dependency to your pubspec.yaml
dependencies:dart_sentiment:<latest-version>
Example
import'package:dart_sentiment/dart_sentiment.dart';
voidmain() {
final sentiment = Sentiment();
print(sentiment.analysis("The cake she made was terrible 😐"));
print(sentiment.analysis("The cake she made was terrible 😐", emoji: true));
print(sentiment.analysis("I love cats, but I am allergic to them.",));
print(sentiment.analysis("J'adore les chats, mais j'y suis allergique.",
languageCode: LanguageCode.french));
print(sentiment.analysis("Le gâteau qu'elle a fait était horrible 😐",
emoji: true, languageCode: LanguageCode.french));
}
Function defination
Param
Description
String text
Input phrase to analyze
bool emoji = false
Input emoji is present in the phrase to analyze
LanguageCode languageCode = LanguageCode.english
Language to use for sentiment analysis. LanguageCode { english, italian, french, german }
How it works
AFINN
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. The comparative score is
simply: sum of each token / number of tokens. So for example let's take the following:
Score: Score calculated by adding the sentiment values of recognized words.
Comparative: Comparative score of the input string.
Token: All the tokens like words or emojis found in the input string.
Words: List of words from input string that were found in AFINN list.
Positive: List of positive words in input string that were found in AFINN list.
Negative: List of negative words in input string that were found in AFINN list.
In this case, love has a value of 3, allergic has a value of -2, and the remaining tokens are
neutral with a value of 0. Because the string has 9 tokens the resulting comparative score looks
like: (3 + -2) / 9 = 0.111111111
This approach leaves you with a mid-point of 0 and the upper and lower bounds are constrained to
positive and negative 5 respectively. For example, let's imagine an incredibly "positive" string
with 200 tokens and where each token has an AFINN score of 5. Our resulting comparative score would
look like this:
(max positive score * number of tokens) / number of tokens (5 * 200) / 200 = 5
Contribute
If you have any suggestions, improvements or issues, feel free to contribute to this project. You
can either submit a new issue or propose a pull request. Direct your pull requests into the dev
branch.