{"id":15296458,"url":"https://github.com/ghostjat/news","last_synced_at":"2025-03-25T05:43:49.767Z","repository":{"id":65278912,"uuid":"588913116","full_name":"ghostjat/News","owner":"ghostjat","description":"News Sentiment Analysis ","archived":false,"fork":false,"pushed_at":"2023-01-15T14:40:54.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T05:43:45.273Z","etag":null,"topics":["api","library","news","news-api","newsapi","php","php8","sentiment-analysis","vader-sentiment-analysis"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/ghostjat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-14T13:09:00.000Z","updated_at":"2023-01-15T14:34:04.000Z","dependencies_parsed_at":"2023-01-16T05:15:28.615Z","dependency_job_id":null,"html_url":"https://github.com/ghostjat/News","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2FNews","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2FNews/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2FNews/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostjat%2FNews/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostjat","download_url":"https://codeload.github.com/ghostjat/News/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407755,"owners_count":20610232,"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","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":["api","library","news","news-api","newsapi","php","php8","sentiment-analysis","vader-sentiment-analysis"],"created_at":"2024-09-30T18:10:34.623Z","updated_at":"2025-03-25T05:43:49.748Z","avatar_url":"https://github.com/ghostjat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# News Sentiment Analysis\n\nVADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is used in social media.\n\n## Example code\n\n```php\nrequire 'vendor/autoload.php';\n\nuse Core\\News;\nuse Core\\Sentiments\\Analyzer;\n\n$table = new Console_Table();\n$sentiment = new Analyzer();\n$news = new News();\n$data = $news-\u003egetTopHeadLines(country: 'in');\n$analyisData = [];\nforeach ($data-\u003earticles as $key =\u003e $value) {\n    $res = $sentiment-\u003egetSentiment($value-\u003etitle);\n    if($res['res'] \u003e 0.55 ) {\n        $analyisData[] = [\n            $news-\u003edate($value-\u003epublishedAt),\n            $table-\u003egreen($news-\u003elimitedString($value-\u003etitle)),\n            $table-\u003egreen($table-\u003ebold($news-\u003eicon('up'))),\n            $table-\u003egreen($res['res'])\n        ];\n    }\n    \n    if($res['res'] \u003e 0 \u0026\u0026 $res['res'] \u003c 0.55 ) {\n        $analyisData[] = [\n            $news-\u003edate($value-\u003epublishedAt),\n            $table-\u003eblue($news-\u003elimitedString($value-\u003etitle)),\n            $table-\u003eblue($table-\u003ebold($news-\u003eicon('nu'))),\n            $table-\u003eblue($res['res'])\n        ];\n    }\n    \n    if($res['res'] \u003c 0 ) {\n       $analyisData[] = [\n            $news-\u003edate($value-\u003epublishedAt),\n            $table-\u003ered($news-\u003elimitedString($value-\u003etitle)),\n            $table-\u003ered($table-\u003ebold($news-\u003eicon('dw'))),\n            $table-\u003ered($res['res'])\n        ];\n    }\n}\necho $table-\u003efromArray(['Date','Title','View','Score'], $analyisData);\n```\n## Output of example code\n```\n+------------------+-------------------------------------------------------------------------------------------------------+------+---------+\n| Date             | Title                                                                                                 | View | Score   |\n+------------------+-------------------------------------------------------------------------------------------------------+------+---------+\n| 14-01-2023 06:30 | Mahindra launches new range of Thar in Kashmir - Greater Kashmir                                      |   ⇔  | 0.3612  |\n| 14-01-2023 04:26 | Global Auto Giant Japan praises Indian Auto Fair - ANI News                                           |   Δ  | 0.6908  |\n| 14-01-2023 01:40 | Highlights: HDFC Bank, Avenue Supermarts-owned DMart release Q3FY23 earnings - check profit, revenue  |   ⇔  | 0.4404  |\n| 14-01-2023 11:20 | YouTube might soon start streaming TV channels for free - GSMArena.com news - GSMArena.com            |   ⇔  | 0.5106  |\n| 14-01-2023 11:11 | ‘People crying in office’: Amazon India employee describes scene amid layoffs - Moneycontrol          |   ∇  | -0.34   |\n| 14-01-2023 09:38 | Top 10 SUVs Sold In 2022 - Nexon, Creta, Brezza, Punch, Venue, Seltos - GaadiWaadi.com                |   ⇔  | 0.2023  |\n| 14-01-2023 08:50 | The Budget push that can make India's tourism sector one of the world's best - Economic Times         |   Δ  | 0.6369  |\n| 14-01-2023 08:45 | Twitter India is emptying out its offices - Moneycontrol                                              |   ∇  | -0.1531 |\n| 14-01-2023 08:35 | 27 smallcaps gain 10-34%as market bounces back; midcap index flat - Moneycontrol                      |   ⇔  | 0.5267  |\n| 14-01-2023 07:16 | CNG powered Range Rover is actually a New Maruti Brezza in disguise [Video] - CarToq.com              |   ∇  | -0.25   |\n| 14-01-2023 05:52 | Flying from Mangaluru? Get ready to shell out more from April - Moneycontrol                          |   ⇔  | 0.3612  |\n| 14-01-2023 05:39 | Employee Working Remotely Sues Company But Ordered To Pay $2,600 For Time Theft - NDTV                |   ∇  | -0.1027 |\n| 14-01-2023 05:03 | KIA Police Car At Auto Expo 2023 - Rediff.com                                                         |   ∇  | -0.7125 |\n| 14-01-2023 03:54 | Paytm down 75%from IPO price. Is this a good entry point for new investors? - Moneycontrol            |   ∇  | -0.296  |\n| 14-01-2023 03:44 | Hero Moto Corp starts trial production of flex-fuel motorcycles, as other OEMs showcase vehicles goin |   Δ  | 0.5574  |\n| 14-01-2023 03:28 | 8 ‘ChatGPT apps’ on Google Play Store that are ‘fake’ - Gadgets Now                                   |   ⇔  | 0.34    |\n| 14-01-2023 12:06 | Traders bid stocks, gold, and Silver higher, but is the optimism warranted? - Kitco NEWS              |   Δ  | 0.6956  |\n| 13-01-2023 06:59 | Wipro Limited (WIT) Q3 2023 Earnings Call Transcript - Seeking Alpha                                  |   ∇  | -0.2263 |\n| 13-01-2023 06:01 | Google Says Antitrust Penalty A Strike Blow At Digital Adoption In India - NDTV                       |   ∇  | -0.5423 |\n| 13-01-2023 05:32 | S\u0026P 500, Nasdaq pare losses as inflation expectations ease By Reuters - Investing.com                 |   ∇  | -0.0516 |\n| 13-01-2023 05:18 | Goldman Sachs lost $1.2 billion in 2022 mostly because of Apple Card - AppleInsider                   |   ∇  | -0.3182 |\n| 13-01-2023 04:32 | Adidas Loses Stripe Trademark Battle To Luxury Designer Thom Browne - NDTV                            |   ∇  | -0.5994 |\n| 13-01-2023 02:19 | NDTV says president, other senior execs resign - The Indian Express                                   |   ∇  | -0.34   |\n| 13-01-2023 02:06 | Meet Ravi Kumar, Cognizant's new CEO whose salary is 4 times Mukesh Ambani's 2020 pay; his joining bo |   ⇔  | 0.4767  |\n| 13-01-2023 01:00 | China's Oil Demand Is Set To Hit A Record High In 2023 - OilPrice.com                                 |   ∇  | -0.128  |\n| 13-01-2023 12:18 | Tech View: Doji candle on Nifty weekly charts shows tug-of-war. What traders should do next week - Ec |   ⇔  | 0.4019  |\n| 13-01-2023 12:08 | Tesla cuts EV prices in US amid poor sales - Greatandhra                                              |   ∇  | -0.6486 |\n| 13-01-2023 11:59 | Troubles Galore for Vodafone Idea as Indus Towers Threat Resurface - TelecomTalk                      |   ∇  | -0.7506 |\n| 13-01-2023 11:02 | Royal Enfield Super Meteor 650 India launch: What to expect? - BikeWale                               |   Δ  | 0.5994  |\n| 13-01-2023 10:05 | Kia Carens announced as the Winner of Indian Car of the Year award 2023 - CarToq.com                  |   ⇔  | 0.4767  |\n| 13-01-2023 10:03 | Fixed deposits offering up to 9%interest rates — Is it the time to book FDs or wait for more hikes    |   Δ  | 0.6249  |\n| 13-01-2023 09:49 | Young founder allegedly sells startup with fake users to JPMorgan for around Rs 1450 crore, now sued  |   ∇  | -0.4767 |\n| 13-01-2023 09:36 | Auto Expo 2023: Joy Mihos high-speed e-scooter launched at Rs 1.49 lakh - BikeWale                    |   Δ  | 0.6486  |\n| 13-01-2023 09:13 | Amazon Republic Day sale: Dates, how to get best deals and more - Gadgets Now                         |   Δ  | 0.7096  |\n| 13-01-2023 08:57 | Apple CEO Tim Cook takes a $35 million pay cut in 2023 - GSMArena.com news - GSMArena.com             |   ∇  | -0.3612 |\n| 13-01-2023 07:50 | Govt raids Mukesh Ambanis Hamleys and Archies, seizes 18,000 toys - Free Press Journal                |   ⇔  | 0.5106  |\n| 13-01-2023 07:11 | NCLT gives Jalan-Kalrock consortium 6 more months to pay \u0026 take control of Jet Airways - Economic Tim |   ∇  | -0.1761 |\n| 13-01-2023 07:05 | Zerodha’s Nithin Kamath: It has been a painful bull market for active traders - Moneycontrol          |   ∇  | -0.0516 |\n| 13-01-2023 06:59 | Centrum's business heads asked to quit due to 'loss of confidence' - Economic Times                   |   ⇔  | 0.25    |\n| 13-01-2023 01:02 | HCCB revives plans to sell Coca-Cola's bottling business - The Economic Times                         |   ⇔  | 0.3818  |\n+------------------+-------------------------------------------------------------------------------------------------------+------+---------+\n\n\n```\n\n## Copyright and license\n\nThe original source code is copyright © 2013 C.J. Hutto\n\nWhere applicable, the ported source code is copyright © 2016 Andrew Busby. All rights reserved. The ported code is made available under the MIT license. A copy of the license can be found in the LICENSE.txt file.\n\n## Acknowledgments\n\nThis is a php port of the vader sentiment analysis tool orginally written in python and found https://github.com/cjhutto/vaderSentiment\n\n## This README file describes the dataset of the paper:\n\nVADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text \n(by C.J. Hutto and Eric Gilbert) \nEighth International Conference on Weblogs and Social Media (ICWSM-14). Ann Arbor, MI, June 2014. \n\n## Citation Information\n\nIf you use either the dataset or any of the VADER sentiment analysis tools (VADER sentiment lexicon or Python code for rule-based sentiment analysis engine) in your research, please cite the above paper. For example: \n\nHutto, C.J. \u0026 Gilbert, E.E. (2014). VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. Eighth International Conference on Weblogs and Social Media (ICWSM-14). Ann Arbor, MI, June 2014. \n\n## Fork Maintainer\n\nThis repository is maintained by [ghostjat](https://github.com/ghostjat)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostjat%2Fnews","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostjat%2Fnews","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostjat%2Fnews/lists"}