Metadata-Version: 2.1
Name: pysentiment2
Version: 0.1.1
Summary: Sentiment Analysis in Python using a Dictionary Approach
Home-page: https://github.com/nickderobertis/pysentiment
Author: Nick DeRobertis
Author-email: whoopnip@gmail.com
License: MIT
Project-URL: Code, https://github.com/nickderobertis/pysentiment
Project-URL: Documentation, https://nickderobertis.github.io/pysentiment
Description: 
        [![](https://codecov.io/gh/nickderobertis/pysentiment/branch/master/graph/badge.svg)](https://codecov.io/gh/nickderobertis/pysentiment)
        
        # pysentiment
        
        ## Overview
        
        This is a library for sentiment analysis in dictionary framework.
        Two dictionaries are provided in the library, namely, Harvard IV-4 and
        Loughran and McDonald Financial Sentiment Dictionaries, which are sentiment
        dictionaries for general and financial sentiment analysis.
        
        See also http://www.wjh.harvard.edu/~inquirer/ and https://www3.nd.edu/~mcdonald/Word_Lists.html .
        
        ### Introduction
        
        `Positive` and `Negative` are word counts for the words in positive and negative sets.
        
        
        `Polarity` and `Subjectivity` are calculated in the same way of Lydia system.
        See also http://www.cs.sunysb.edu/~skiena/lydia/
        
        
        ## Getting Started
        
        Install `pysentiment2`:
        
        ```
        pip install pysentiment2
        ```
        
        A simple example:
        
        ```python
        import pysentiment2
        
        # Do something with pysentiment2
        ```
        
        ## Usage
        
        To use the Harvard IV-4 dictionary, create an instance of the `HIV4` class
        
        ```python
        import pysentiment2 as ps
        hiv4 = ps.HIV4()
        tokens = hiv4.tokenize(text)  # text can be tokenized by other ways
                                          # however, dict in HIV4 is preprocessed
                                          # by the default tokenizer in the library
        score = hiv4.get_score(tokens)
        ```
        
        `HIV4` is a subclass for `pysentiment2.base.BaseDict`. `BaseDict` can be inherited by 
        implmenting `init_dict` to initialize `_posset` and `_negset` for the dictionary
        to calculate 'positive' or 'negative' scores for terms.
        
        Similarly, to use the Loughran and McDonald dictionary:
        ```python
        import pysentiment2 as ps
        lm = ps.LM()
        tokens = lm.tokenize(text)
        score = lm.get_score(tokens)
        ```
        
        ## Links
        
        See the
        [documentation here.](
        https://nickderobertis.github.io/pysentiment/
        )
        
        ## Author
        
        `pysentiment2` created by Nick DeRobertis but based on `pysentiment` by Zhichao Han. GNU GPL License.
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
