finvader


Namefinvader JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/PetrKorab/FinVADER
SummaryVADER sentiment classifier updated with financial lexicons
upload_time2023-07-09 23:54:26
maintainer
docs_urlNone
authorPetr Koráb
requires_python>=3.8
licenseOSI Approved :: Apache Software License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FinVADER
**VADER sentiment classifier updated with financial lexicons**


**VADER** *(Valence Aware Dictionary and sEntiment Reasoner)* is a mainstream model for sentiment analysis using a 
general-language human-curated lexicon, including linguistic features expressed on social media. As such, the model works
worse on texts that use domain-specific language, such as finance or economics.

**FinVADER** improves VADER's classification accuracy, including two finance lexicons: [SentiBignomics](https://github.com/consose/SentiBigNomics),
and [Henry's word list](https://journals.sagepub.com/doi/10.1177/0021943608319388). *SentiBigNomics* is a detailed financial lexicon for aspect-based sentiment analysis with 
approximately 7300 terms containing a polarity score ranging in [-1,1] for each item. *Henry's lexicon* covers 189 words 
appearing in the company earnings press releases. 

FinVADER outperforms VADER on Financial PhraseBank data: 

![finvader_accuracy](https://github.com/PetrKorab/FinVADER/assets/62357254/6f464bb2-1d9c-4cb7-ba63-f535c6a1fda6)
![vader_accuracy](https://github.com/PetrKorab/FinVADER/assets/62357254/6bc4080b-ce1a-499f-9dbd-de8cf8f1ecdc)

The code for this benchmark test is [here](https://github.com/PetrKorab/FinVADER/blob/main/finvader_benchmark.ipynb)

**** 


## Installation

FinVADER requires [Python 3.8 - 3.11](https://www.python.org/downloads/), and [NLTK](http://www.nltk.org). 

To install using pip, use:

`pip install finvader`


## Usage

* **Import the library**:


``` python
from finvader import finvader
```

* **Select lexicons:**


``` python
def finvader(text = 'str',                    # Text
             indicator = 'str',               # VADER' indicator: 'pos'/'neg'/'neu'/'compound' 
             use_sentibignomics: bool= False, # Use SentiBignomics lexicon
             use_henry: bool= False):         # Use Henry's lexicon
) 
```

* **Use the classifier:**

``` python
text = "The period's sales dropped to EUR 30.6 m from EUR 38.3 m, according to the interim report, released today."

scores = finvader(text, 
                  use_sentibignomics = True, 
                  use_henry = True, 
                  indicator = 'compound' )
```

## Documentation, examples and tutorials

For examples of coding, read these  tutorials:

**FinVADER: Sentiment Analysis for Financial Applications** [here](https://medium.com/python-in-plain-english/finvader-sentiment-analysis-for-financial-applications-6ab3c08840b4)

**Fine-tuning VADER Classifier with Domain-specific Lexicons** [here](https://medium.com/mlearning-ai/fine-tuning-vader-classifier-with-domain-specific-lexicons-1b23f6882f2)

---

Please visit [here](https://github.com/PetrKorab/finvader/issues) for any questions, issues, bugs, and suggestions.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PetrKorab/FinVADER",
    "name": "finvader",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Petr Kor\u00e1b",
    "author_email": "Petr Korab <xpetrkorab@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1d/d0/e9c839210a6e8db1b0ec34d01116b1382f809228849a0b294eba260d4d89/finvader-1.0.2.tar.gz",
    "platform": null,
    "description": "# FinVADER\r\n**VADER sentiment classifier updated with financial lexicons**\r\n\r\n\r\n**VADER** *(Valence Aware Dictionary and sEntiment Reasoner)* is a mainstream model for sentiment analysis using a \r\ngeneral-language human-curated lexicon, including linguistic features expressed on social media. As such, the model works\r\nworse on texts that use domain-specific language, such as finance or economics.\r\n\r\n**FinVADER** improves VADER's classification accuracy, including two finance lexicons: [SentiBignomics](https://github.com/consose/SentiBigNomics),\r\nand [Henry's word list](https://journals.sagepub.com/doi/10.1177/0021943608319388). *SentiBigNomics* is a detailed financial lexicon for aspect-based sentiment analysis with \r\napproximately 7300 terms containing a polarity score ranging in [-1,1] for each item. *Henry's lexicon* covers 189 words \r\nappearing in the company earnings press releases. \r\n\r\nFinVADER outperforms VADER on Financial PhraseBank data: \r\n\r\n![finvader_accuracy](https://github.com/PetrKorab/FinVADER/assets/62357254/6f464bb2-1d9c-4cb7-ba63-f535c6a1fda6)\r\n![vader_accuracy](https://github.com/PetrKorab/FinVADER/assets/62357254/6bc4080b-ce1a-499f-9dbd-de8cf8f1ecdc)\r\n\r\nThe code for this benchmark test is [here](https://github.com/PetrKorab/FinVADER/blob/main/finvader_benchmark.ipynb)\r\n\r\n**** \r\n\r\n\r\n## Installation\r\n\r\nFinVADER requires [Python 3.8 - 3.11](https://www.python.org/downloads/), and [NLTK](http://www.nltk.org). \r\n\r\nTo install using pip, use:\r\n\r\n`pip install finvader`\r\n\r\n\r\n## Usage\r\n\r\n* **Import the library**:\r\n\r\n\r\n``` python\r\nfrom finvader import finvader\r\n```\r\n\r\n* **Select lexicons:**\r\n\r\n\r\n``` python\r\ndef finvader(text = 'str',                    # Text\r\n             indicator = 'str',               # VADER' indicator: 'pos'/'neg'/'neu'/'compound' \r\n             use_sentibignomics: bool= False, # Use SentiBignomics lexicon\r\n             use_henry: bool= False):         # Use Henry's lexicon\r\n) \r\n```\r\n\r\n* **Use the classifier:**\r\n\r\n``` python\r\ntext = \"The period's sales dropped to EUR 30.6 m from EUR 38.3 m, according to the interim report, released today.\"\r\n\r\nscores = finvader(text, \r\n                  use_sentibignomics = True, \r\n                  use_henry = True, \r\n                  indicator = 'compound' )\r\n```\r\n\r\n## Documentation, examples and tutorials\r\n\r\nFor examples of coding, read these  tutorials:\r\n\r\n**FinVADER: Sentiment Analysis for Financial Applications** [here](https://medium.com/python-in-plain-english/finvader-sentiment-analysis-for-financial-applications-6ab3c08840b4)\r\n\r\n**Fine-tuning VADER Classifier with Domain-specific Lexicons** [here](https://medium.com/mlearning-ai/fine-tuning-vader-classifier-with-domain-specific-lexicons-1b23f6882f2)\r\n\r\n---\r\n\r\nPlease visit [here](https://github.com/PetrKorab/finvader/issues) for any questions, issues, bugs, and suggestions.\r\n",
    "bugtrack_url": null,
    "license": "OSI Approved :: Apache Software License",
    "summary": "VADER sentiment classifier updated with financial lexicons",
    "version": "1.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/PetrKorab/FinVADER/issues",
        "Homepage": "https://github.com/PetrKorab/FinVADER"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "944f7f5c7e0e7d8e55410e8a560898803940ee4ac55745f82df3f240d57cacee",
                "md5": "848617b27fa41c6c77c3778f227a99c2",
                "sha256": "1a3fc7d3ea23f1bc56968c1c25a10b854dbbbbf52c091c1d5ea5f02a131c98ad"
            },
            "downloads": -1,
            "filename": "finvader-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "848617b27fa41c6c77c3778f227a99c2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 44853,
            "upload_time": "2023-07-09T23:54:24",
            "upload_time_iso_8601": "2023-07-09T23:54:24.579447Z",
            "url": "https://files.pythonhosted.org/packages/94/4f/7f5c7e0e7d8e55410e8a560898803940ee4ac55745f82df3f240d57cacee/finvader-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1dd0e9c839210a6e8db1b0ec34d01116b1382f809228849a0b294eba260d4d89",
                "md5": "b7562748668a3ec853eb454aa0941781",
                "sha256": "74d6c241ea92a6b545a952f2c154044897671ba413340dbb06c75b46ecf8adf1"
            },
            "downloads": -1,
            "filename": "finvader-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b7562748668a3ec853eb454aa0941781",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 45256,
            "upload_time": "2023-07-09T23:54:26",
            "upload_time_iso_8601": "2023-07-09T23:54:26.103359Z",
            "url": "https://files.pythonhosted.org/packages/1d/d0/e9c839210a6e8db1b0ec34d01116b1382f809228849a0b294eba260d4d89/finvader-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-09 23:54:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PetrKorab",
    "github_project": "FinVADER",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "finvader"
}
        
Elapsed time: 0.10875s