| Server IP : 54.37.205.81 / Your IP : 216.73.216.76 Web Server : nginx/1.22.1 System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64 User : debian ( 1000) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/nltk/sentiment/__pycache__/ |
Upload File : |
�
T�c@Q � � � d Z ddlZddlZddlZddlmZ ddlZddlm Z G d� d� � Z
G d� d� � Z G d � d
� � ZdS )a
If you use the VADER sentiment analysis tools, please cite:
Hutto, C.J. & 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)�product)�pairwisec � � e Zd ZdZdZdZdZdZh d�Zi de�de�d e�d
e�de�de�d
e�de�de�de�de�de�de�de�de�de�de�i de�de�de�de�de�de�de�de�d e�d!e�d"e�d#e�d$e�d%e�d&e�d'e�d(e��i d)e�d*e�d+e�d,e�d-e�d.e�d/e�d0e�d1e�d2e�d3e�d4e�d5e�d6e�d7e�d8e�d9e��eeeeeeeeeeeeeeed:��Z d;d;d<d=d>d?d=d@�Z
ej dA ej
ej � � � dB�� � Zg dC�ZdD� ZdKdF�ZdLdH�ZdI� ZdJS )M�VaderConstantsz8
A class to keep the Vader lists and constants.
g��n���?g��n��ҿg�~j�t�?g�G�z��>; �ain't�can't�don't�isn't�uh-uh�won't�aren't�didn't�hadn't�hasn't�shan't�wasn't�daren't�doesn't�haven't�mustn't�needn't�weren't�couldn't�mightn't�oughtn't�wouldn't� shouldn't�nor�not�aint�cant�dont�isnt�none�nope�uhuh�wont�arent�didnt�hadnt�hasnt�never�shant�wasnt�cannot�darent�doesnt�havent�mustnt�neednt�rarely�seldom�werent�couldnt�despite�mightnt�neither�nothing�nowhere�oughtnt�without�wouldnt�shouldnt�
absolutely� amazingly�awfully�
completely�considerably� decidedly�deeply�effing�
enormously�entirely�
especially�
exceptionally� extremely�
fabulously�flipping�flippin�fricking�frickin�frigging�friggin�fully�fucking�greatly�hella�highly�hugely�
incredibly� intensely�majorly�more�most�particularly�purely�quite�really�
remarkably�so�
substantially�
thoroughly�totally�tremendously�uber�unbelievably� unusually�utterly�very�almost�barely�hardlyzjust enoughzkind of)�kinda�kindofzkind-of�less�little�
marginally�occasionally�partly�scarcely�slightly�somewhatzsort of�sorta�sortofzsort-of� � �?���� g ��)zthe shitzthe bombzbad assz
yeah rightzcut the mustardz
kiss of deathz
hand to mouth�[�])�.�!�?�,�;�:�-�'�"z!!z!!!z??z???z?!?z!?!z?!?!z!?!?c � � d S �N� )�selfs �6/usr/lib/python3/dist-packages/nltk/sentiment/vader.py�__init__zVaderConstants.__init__� s � ��� Tc � �� | j �t �fd�|D � � � � rdS |rt d� |D � � � � rdS t |� � D ]8\ }}|� � � dk r|� � � dk r dS �9dS )z<
Determine if input contains negation words
c 3 �D �K � | ]}|� � � �v V � �d S r� ��lower)�.0�word� neg_wordss �r� � <genexpr>z)VaderConstants.negated.<locals>.<genexpr>� s0 �� � � �A�A�T�t�z�z�|�|�y�(�A�A�A�A�A�Ar� Tc 3 �B K � | ]}d |� � � v V � �dS )zn'tNr� )r� r� s r� r� z)VaderConstants.negated.<locals>.<genexpr>� s/ � � � �A�A�T�5�D�J�J�L�L�(�A�A�A�A�A�Ar� �least�atF)�NEGATE�anyr r� )r� �input_words�
include_nt�first�secondr� s @r� �negatedzVaderConstants.negated� s� �� � �K� ��A�A�A�A�[�A�A�A�A�A� ��4�� ��A�A�[�A�A�A�A�A�
��t�%�k�2�2� � �M�E�6��|�|�~�~��(�(�U�[�[�]�]�d�-B�-B��t�t���ur� � c �@ � |t j ||z |z � � z }|S )z|
Normalize the score to be between -1 and 1 using an alpha that
approximates the max expected value
)�math�sqrt)r� �score�alpha�
norm_scores r� � normalizezVaderConstants.normalize� s'