{"id":13426331,"url":"https://github.com/winkjs/wink-sentiment","last_synced_at":"2025-10-09T21:05:58.891Z","repository":{"id":47969164,"uuid":"109225807","full_name":"winkjs/wink-sentiment","owner":"winkjs","description":"Accurate and fast sentiment scoring of phrases with #hashtags, emoticons :) \u0026 emojis 🎉","archived":false,"fork":false,"pushed_at":"2023-02-27T17:26:32.000Z","size":1698,"stargazers_count":62,"open_issues_count":6,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-07T18:54:11.036Z","etag":null,"topics":["emoji","emoticons","hashtag","nlp","sentiment","sentiment-analysis","sentiment-classification","sentiment-scores","wink"],"latest_commit_sha":null,"homepage":"http://winkjs.org/wink-sentiment","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winkjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-11-02T06:23:50.000Z","updated_at":"2024-10-10T20:05:53.000Z","dependencies_parsed_at":"2024-01-19T19:13:55.856Z","dependency_job_id":null,"html_url":"https://github.com/winkjs/wink-sentiment","commit_stats":{"total_commits":65,"total_committers":4,"mean_commits":16.25,"dds":"0.41538461538461535","last_synced_commit":"3e0b0a6c1720fa46e18a781696d8c9b4a2263899"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/winkjs/wink-sentiment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-sentiment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-sentiment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-sentiment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-sentiment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winkjs","download_url":"https://codeload.github.com/winkjs/wink-sentiment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winkjs%2Fwink-sentiment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276271859,"owners_count":25614135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emoji","emoticons","hashtag","nlp","sentiment","sentiment-analysis","sentiment-classification","sentiment-scores","wink"],"created_at":"2024-07-31T00:01:32.075Z","updated_at":"2025-09-21T16:33:59.992Z","avatar_url":"https://github.com/winkjs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# wink-sentiment\n\nAccurate \u0026 fast sentiment scoring of phrases with #hashtags, emoticons:) \u0026 emojis🎉\n\n### [![Build Status](https://api.travis-ci.org/winkjs/wink-sentiment.svg?branch=master)](https://travis-ci.org/winkjs/wink-sentiment) [![Coverage Status](https://coveralls.io/repos/github/winkjs/wink-sentiment/badge.svg?branch=master)](https://coveralls.io/github/winkjs/wink-sentiment?branch=master) [![dependencies Status](https://david-dm.org/winkjs/wink-sentiment/status.svg)](https://david-dm.org/winkjs/wink-sentiment) [![devDependencies Status](https://david-dm.org/winkjs/wink-sentiment/dev-status.svg)](https://david-dm.org/winkjs/wink-sentiment?type=dev) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/winkjs/Lobby)\n\n[\u003cimg align=\"right\" src=\"https://decisively.github.io/wink-logos/logo-title.png\" width=\"100px\" \u003e](http://winkjs.org/)\n\nAnalyze sentiment of tweets, product reviews, social media content or any text using **`wink-sentiment`**. It is based on [AFINN](https://arxiv.org/abs/1103.2903) and [Emoji Sentiment Ranking](http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144296); it's features include:\n\n1. Intelligent negation handling; for example, phrase \"good product\" will get a positive score whereas \"not a good product\" gets a negative score.\n2. Automatic detection and scoring of two-word phrases in a text; for example, \"cool stuff\", \"well done\", and \"short sighted\".\n3. Processes each emoji, emoticon and/or hashtag separately while scoring.\n4. Embeds a powerful [tokenizer](https://www.npmjs.com/package/wink-tokenizer) that returns the tokenized phrase.\n5. Returns the sentiment score and tokens. Each token contains a set of properties defining its sentiment, if any.\n6. Achieves accuracy of 77%, when validated using Amazon Product Review [Sentiment Labelled Sentences Data Set](https://archive.ics.uci.edu/ml/machine-learning-databases/00331/) at [UCI Machine Learning Repository](https://archive.ics.uci.edu/ml/index.php).\n\n\n### Installation\n\nUse [npm](https://www.npmjs.com/package/wink-sentiment) to install:\n\n    npm install wink-sentiment --save\n\n### Getting Started\n```javascript\n// Load wink-sentiment package.\nvar sentiment = require( 'wink-sentiment' );\n// Just give any phrase and checkout the sentiment score. A positive score\n// means a positive sentiment, whereas a negative score indicates a negative\n// sentiment. Neutral sentiment is signalled by a near zero score.\n\n// Positive sentiment text.\nsentiment( 'Excited to be part of the @imascientist team:-)!' );\n// -\u003e { score: 5,\n//      normalizedScore: 2.5,\n//      tokenizedPhrase: [\n//        { value: 'Excited', tag: 'word', score: 3 },\n//        { value: 'to', tag: 'word' },\n//        { value: 'be', tag: 'word' },\n//        { value: 'part', tag: 'word' },\n//        { value: 'of', tag: 'word' },\n//        { value: 'the', tag: 'word' },\n//        { value: '@imascientist', tag: 'mention' },\n//        { value: 'team', tag: 'word' },\n//        { value: ':-)', tag: 'emoticon', score: 2 },\n//        { value: '!', tag: 'punctuation' }\n//      ]\n//    }\n\n// Negative sentiment text.\nconsole.log( sentiment( 'Not a good product :(' ) );\n// -\u003e { score: -5,\n//      normalizedScore: -2.5,\n//      tokenizedPhrase: [\n//        { value: 'Not', tag: 'word' },\n//        { value: 'a', tag: 'word', negation: true },\n//        { value: 'good', tag: 'word', negation: true, score: -3 },\n//        { value: 'product', tag: 'word' },\n//        { value: ':(', tag: 'emoticon', score: -2 }\n//      ]\n//    }\n\n// Neutral sentiment text.\nconsole.log( sentiment( 'I will meet you tomorrow.' ) );\n// -\u003e { score: 0,\n//      normalizedScore: 0,\n//      tokenizedPhrase: [\n//        { value: 'I', tag: 'word' },\n//        { value: 'will', tag: 'word' },\n//        { value: 'meet', tag: 'word' },\n//        { value: 'you', tag: 'word' },\n//        { value: 'tomorrow', tag: 'word' },\n//        { value: '.', tag: 'punctuation' }\n//      ]\n//    }\n```\nTry [experimenting with this example and more on Runkit](https://npm.runkit.com/wink-sentiment) in the browser.\n\n### Documentation\nCheck out the [wink sentiment API](http://winkjs.org/wink-sentiment/) documentation to learn more.\n\n### Need Help?\n\nIf you spot a bug and the same has not yet been reported, raise a new [issue](https://github.com/winkjs/wink-sentiment/issues) or consider fixing it and sending a pull request.\n\n### About wink\n[Wink](http://winkjs.org/) is a family of open source packages for **Statistical Analysis**, **Natural Language Processing** and **Machine Learning** in NodeJS. The code is **thoroughly documented** for easy human comprehension and has a **test coverage of ~100%** for reliability to build production grade solutions.\n\n### Copyright \u0026 License\n\n**wink-sentiment** is copyright 2017-18 [GRAYPE Systems Private Limited](http://graype.in/).\n\nIt is licensed under the terms of the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinkjs%2Fwink-sentiment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinkjs%2Fwink-sentiment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinkjs%2Fwink-sentiment/lists"}