├── DataPrep.py ├── FeatureSelection.py ├── LICENSE ├── README.md ├── __pycache__ ├── DataPrep.cpython-36.pyc └── FeatureSelection.cpython-36.pyc ├── _config.yml ├── animate.css ├── bootstrap.css ├── bootstrap.min.css ├── classifier.py ├── final-fnd.ipynb ├── final_model.sav ├── font.css ├── front.py ├── images ├── LR_LCurve.PNG ├── ProcessFlow.PNG └── RF_LCurve.png ├── index ├── li-scroller.css ├── liar_dataset ├── README ├── test.tsv ├── train.tsv └── valid.tsv ├── model.pkl ├── my_model ├── prediction.py ├── project.css ├── style.css ├── test.csv ├── theme.css ├── train.csv └── valid.csv /DataPrep.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sat Nov 4 12:00:49 2017 4 | 5 | @author: NishitP 6 | """ 7 | #import os 8 | import pandas as pd 9 | import csv 10 | import numpy as np 11 | import nltk 12 | from nltk.stem import SnowballStemmer 13 | from nltk.stem.porter import PorterStemmer 14 | from nltk.tokenize import word_tokenize 15 | import seaborn as sb 16 | 17 | #before reading the files, setup the working directory to point to project repo 18 | #reading data files 19 | 20 | 21 | test_filename = 'test.csv' 22 | train_filename = 'train.csv' 23 | valid_filename = 'valid.csv' 24 | 25 | train_news = pd.read_csv(train_filename) 26 | test_news = pd.read_csv(test_filename) 27 | valid_news = pd.read_csv(valid_filename) 28 | 29 | 30 | 31 | #data observation 32 | def data_obs(): 33 | print("training dataset size:") 34 | print(train_news.shape) 35 | print(train_news.head(10)) 36 | 37 | #below dataset were used for testing and validation purposes 38 | print(test_news.shape) 39 | print(test_news.head(10)) 40 | 41 | print(valid_news.shape) 42 | print(valid_news.head(10)) 43 | 44 | #check the data by calling below function 45 | #data_obs() 46 | 47 | #distribution of classes for prediction 48 | def create_distribution(dataFile): 49 | 50 | return sb.countplot(x='Label', data=dataFile, palette='hls') 51 | 52 | 53 | #by calling below we can see that training, test and valid data seems to be failry evenly distributed between the classes 54 | create_distribution(train_news) 55 | create_distribution(test_news) 56 | create_distribution(valid_news) 57 | 58 | 59 | #data integrity check (missing label values) 60 | #none of the datasets contains missing values therefore no cleaning required 61 | def data_qualityCheck(): 62 | 63 | print("Checking data qualitites...") 64 | train_news.isnull().sum() 65 | train_news.info() 66 | 67 | print("check finished.") 68 | 69 | #below datasets were used to 70 | test_news.isnull().sum() 71 | test_news.info() 72 | 73 | valid_news.isnull().sum() 74 | valid_news.info() 75 | 76 | #run the below function call to see the quality check results 77 | #data_qualityCheck() 78 | 79 | 80 | 81 | #eng_stemmer = SnowballStemmer('english') 82 | #stopwords = set(nltk.corpus.stopwords.words('english')) 83 | 84 | #Stemming 85 | def stem_tokens(tokens, stemmer): 86 | stemmed = [] 87 | for token in tokens: 88 | stemmed.append(stemmer.stem(token)) 89 | return stemmed 90 | 91 | #process the data 92 | def process_data(data,exclude_stopword=True,stem=True): 93 | tokens = [w.lower() for w in data] 94 | tokens_stemmed = tokens 95 | tokens_stemmed = stem_tokens(tokens, eng_stemmer) 96 | tokens_stemmed = [w for w in tokens_stemmed if w not in stopwords ] 97 | return tokens_stemmed 98 | 99 | 100 | #creating ngrams 101 | #unigram 102 | def create_unigram(words): 103 | assert type(words) == list 104 | return words 105 | 106 | #bigram 107 | def create_bigrams(words): 108 | assert type(words) == list 109 | skip = 0 110 | join_str = " " 111 | Len = len(words) 112 | if Len > 1: 113 | lst = [] 114 | for i in range(Len-1): 115 | for k in range(1,skip+2): 116 | if i+k < Len: 117 | lst.append(join_str.join([words[i],words[i+k]])) 118 | else: 119 | #set it as unigram 120 | lst = create_unigram(words) 121 | return lst 122 | 123 | """ 124 | #trigrams 125 | def create_trigrams(words): 126 | assert type(words) == list 127 | skip == 0 128 | join_str = " " 129 | Len = len(words) 130 | if L > 2: 131 | lst = [] 132 | for i in range(1,skip+2): 133 | for k1 in range(1, skip+2): 134 | for k2 in range(1,skip+2): 135 | for i+k1 < Len and i+k1+k2 < Len: 136 | lst.append(join_str.join([words[i], words[i+k1],words[i+k1+k2])]) 137 | else: 138 | #set is as bigram 139 | lst = create_bigram(words) 140 | return lst 141 | """ 142 | 143 | 144 | porter = PorterStemmer() 145 | 146 | def tokenizer(text): 147 | return text.split() 148 | 149 | 150 | def tokenizer_porter(text): 151 | return [porter.stem(word) for word in text.split()] 152 | 153 | #doc = ['runners like running and thus they run','this is a test for tokens'] 154 | #tokenizer([word for line in test_news.iloc[:,1] for word in line.lower().split()]) 155 | 156 | #show the distribution of labels in the train and test data 157 | """def create_datafile(filename) 158 | #function to slice the dataframe to keep variables necessary to be used for classification 159 | return "return df to be used" 160 | """ 161 | 162 | """#converting multiclass labels present in our datasets to binary class labels 163 | for i , row in data_TrainNews.iterrows(): 164 | if (data_TrainNews.iloc[:,0] == "mostly-true" | data_TrainNews.iloc[:,0] == "half-true" | data_TrainNews.iloc[:,0] == "true"): 165 | data_TrainNews.iloc[:,0] = "true" 166 | else : 167 | data_TrainNews.iloc[:,0] = "false" 168 | 169 | for i,row in data_TrainNews.iterrows(): 170 | print(row) 171 | """ 172 | 173 | -------------------------------------------------------------------------------- /FeatureSelection.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sat Nov 4 14:13:38 2017 4 | 5 | @author: NishitP 6 | 7 | Note: before we can train an algorithm to classify fake news labels, we need to extract features from it. It means reducing the mass 8 | of unstructured data into some uniform set of attributes that an algorithm can understand. For fake news detection, it could be 9 | word counts (bag of words). 10 | """ 11 | import DataPrep 12 | import pandas as pd 13 | import numpy as np 14 | from sklearn.feature_extraction.text import CountVectorizer 15 | from sklearn.feature_extraction.text import TfidfTransformer 16 | from sklearn.feature_extraction.text import TfidfVectorizer 17 | from sklearn.pipeline import Pipeline 18 | import nltk 19 | import nltk.corpus 20 | from nltk.tokenize import word_tokenize 21 | from gensim.models.word2vec import Word2Vec 22 | 23 | 24 | #we will start with simple bag of words technique 25 | #creating feature vector - document term matrix 26 | countV = CountVectorizer() 27 | train_count = countV.fit_transform(DataPrep.train_news['Statement'].values) 28 | 29 | print(countV) 30 | print(train_count) 31 | 32 | #print training doc term matrix 33 | #we have matrix of size of (10240, 12196) by calling below 34 | def get_countVectorizer_stats(): 35 | 36 | #vocab size 37 | train_count.shape 38 | 39 | #check vocabulary using below command 40 | print(countV.vocabulary_) 41 | 42 | #get feature names 43 | print(countV.get_feature_names()[:25]) 44 | 45 | 46 | #create tf-df frequency features 47 | #tf-idf 48 | tfidfV = TfidfTransformer() 49 | train_tfidf = tfidfV.fit_transform(train_count) 50 | 51 | def get_tfidf_stats(): 52 | train_tfidf.shape 53 | #get train data feature names 54 | print(train_tfidf.A[:10]) 55 | 56 | 57 | #bag of words - with n-grams 58 | #countV_ngram = CountVectorizer(ngram_range=(1,3),stop_words='english') 59 | #tfidf_ngram = TfidfTransformer(use_idf=True,smooth_idf=True) 60 | 61 | tfidf_ngram = TfidfVectorizer(stop_words='english',ngram_range=(1,4),use_idf=True,smooth_idf=True) 62 | 63 | 64 | #POS Tagging 65 | tagged_sentences = nltk.corpus.treebank.tagged_sents() 66 | 67 | cutoff = int(.75 * len(tagged_sentences)) 68 | training_sentences = DataPrep.train_news['Statement'] 69 | 70 | print(training_sentences) 71 | 72 | #training POS tagger based on words 73 | def features(sentence, index): 74 | """ sentence: [w1, w2, ...], index: the index of the word """ 75 | return { 76 | 'word': sentence[index], 77 | 'is_first': index == 0, 78 | 'is_last': index == len(sentence) - 1, 79 | 'is_capitalized': sentence[index][0].upper() == sentence[index][0], 80 | 'is_all_caps': sentence[index].upper() == sentence[index], 81 | 'is_all_lower': sentence[index].lower() == sentence[index], 82 | 'prefix-1': sentence[index][0], 83 | 'prefix-2': sentence[index][:2], 84 | 'prefix-3': sentence[index][:3], 85 | 'suffix-1': sentence[index][-1], 86 | 'suffix-2': sentence[index][-2:], 87 | 'suffix-3': sentence[index][-3:], 88 | 'prev_word': '' if index == 0 else sentence[index - 1], 89 | 'next_word': '' if index == len(sentence) - 1 else sentence[index + 1], 90 | 'has_hyphen': '-' in sentence[index], 91 | 'is_numeric': sentence[index].isdigit(), 92 | 'capitals_inside': sentence[index][1:].lower() != sentence[index][1:] 93 | } 94 | 95 | 96 | #helper function to strip tags from tagged corpus 97 | def untag(tagged_sentence): 98 | return [w for w, t in tagged_sentence] 99 | 100 | 101 | 102 | #Using Word2Vec 103 | with open("glove.6B.50d.txt", "rb") as lines: 104 | w2v = {line.split()[0]: np.array(map(float, line.split()[1:])) 105 | for line in lines} 106 | 107 | 108 | 109 | #model = gensim.models.Word2Vec(X, size=100) # x be tokenized text 110 | #w2v = dict(zip(model.wv.index2word, model.wv.syn0)) 111 | 112 | 113 | class MeanEmbeddingVectorizer(object): 114 | def __init__(self, word2vec): 115 | self.word2vec = word2vec 116 | # if a text is empty we should return a vector of zeros 117 | # with the same dimensionality as all the other vectors 118 | self.dim = len(word2vec.itervalues().next()) 119 | 120 | def fit(self, X, y): 121 | return self 122 | 123 | def transform(self, X): 124 | return np.array([ 125 | np.mean([self.word2vec[w] for w in words if w in self.word2vec] 126 | or [np.zeros(self.dim)], axis=0) 127 | for words in X 128 | ]) 129 | 130 | 131 | """ 132 | class TfidfEmbeddingVectorizer(object): 133 | def __init__(self, word2vec): 134 | self.word2vec = word2vec 135 | self.word2weight = None 136 | self.dim = len(word2vec.itervalues().next()) 137 | 138 | def fit(self, X, y): 139 | tfidf = TfidfVectorizer(analyzer=lambda x: x) 140 | tfidf.fit(X) 141 | # if a word was never seen - it must be at least as infrequent 142 | # as any of the known words - so the default idf is the max of 143 | # known idf's 144 | max_idf = max(tfidf.idf_) 145 | self.word2weight = defaultdict( 146 | lambda: max_idf, 147 | [(w, tfidf.idf_[i]) for w, i in tfidf.vocabulary_.items()]) 148 | 149 | return self 150 | 151 | def transform(self, X): 152 | return np.array([ 153 | np.mean([self.word2vec[w] * self.word2weight[w] 154 | for w in words if w in self.word2vec] or 155 | [np.zeros(self.dim)], axis=0) 156 | for words in X 157 | ]) 158 | 159 | """ 160 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Nishit Patel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fake News Detection 2 | 3 | Fake News Detection in Python 4 | 5 | In this project, we have used various natural language processing techniques and machine learning algorithms to classify fake news articles using sci-kit libraries from python. 6 | 7 | ## Getting Started 8 | 9 | These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. 10 | 11 | ### Prerequisites 12 | 13 | What things you need to install the software and how to install them: 14 | 15 | 1. Python 3.6 16 | - This setup requires that your machine has python 3.6 installed on it. you can refer to this url https://www.python.org/downloads/ to download python. Once you have python downloaded and installed, you will need to setup PATH variables (if you want to run python program directly, detail instructions are below in *how to run software section*). To do that check this: https://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/. 17 | - Setting up PATH variable is optional as you can also run program without it and more instruction are given below on this topic. 18 | 2. Second and easier option is to download anaconda and use its anaconda prompt to run the commands. To install anaconda check this url https://www.anaconda.com/download/ 19 | 3. You will also need to download and install below 3 packages after you install either python or anaconda from the steps above 20 | - Sklearn (scikit-learn) 21 | - numpy 22 | - scipy 23 | 24 | - if you have chosen to install python 3.6 then run below commands in command prompt/terminal to install these packages 25 | ``` 26 | pip install -U scikit-learn 27 | pip install numpy 28 | pip install scipy 29 | ``` 30 | - if you have chosen to install anaconda then run below commands in anaconda prompt to install these packages 31 | ``` 32 | conda install -c scikit-learn 33 | conda install -c anaconda numpy 34 | conda install -c anaconda scipy 35 | ``` 36 | 37 | #### Dataset used 38 | The data source used for this project is LIAR dataset which contains 3 files with .tsv format for test, train and validation. Below is some description about the data files used for this project. 39 | 40 | LIAR: A BENCHMARK DATASET FOR FAKE NEWS DETECTION 41 | 42 | William Yang Wang, "Liar, Liar Pants on Fire": A New Benchmark Dataset for Fake News Detection, to appear in Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (ACL 2017), short paper, Vancouver, BC, Canada, July 30-August 4, ACL. 43 | 44 | the original dataset contained 13 variables/columns for train, test and validation sets as follows: 45 | 46 | * Column 1: the ID of the statement ([ID].json). 47 | * Column 2: the label. (Label class contains: True, Mostly-true, Half-true, Barely-true, FALSE, Pants-fire) 48 | * Column 3: the statement. 49 | * Column 4: the subject(s). 50 | * Column 5: the speaker. 51 | * Column 6: the speaker's job title. 52 | * Column 7: the state info. 53 | * Column 8: the party affiliation. 54 | * Column 9-13: the total credit history count, including the current statement. 55 | * 9: barely true counts. 56 | * 10: false counts. 57 | * 11: half true counts. 58 | * 12: mostly true counts. 59 | * 13: pants on fire counts. 60 | * Column 14: the context (venue / location of the speech or statement). 61 | 62 | To make things simple we have chosen only 2 variables from this original dataset for this classification. The other variables can be added later to add some more complexity and enhance the features. 63 | 64 | Below are the columns used to create 3 datasets that have been in used in this project 65 | * Column 1: Statement (News headline or text). 66 | * Column 2: Label (Label class contains: True, False) 67 | 68 | You will see that newly created dataset has only 2 classes as compared to 6 from original classes. Below is method used for reducing the number of classes. 69 | 70 | * Original -- New 71 | * True -- True 72 | * Mostly-true -- True 73 | * Half-true -- True 74 | * Barely-true -- False 75 | * False -- False 76 | * Pants-fire -- False 77 | 78 | The dataset used for this project were in csv format named train.csv, test.csv and valid.csv and can be found in repo. The original datasets are in "liar" folder in tsv format. 79 | 80 | 81 | ### File descriptions 82 | 83 | #### DataPrep.py 84 | This file contains all the pre processing functions needed to process all input documents and texts. First we read the train, test and validation data files then performed some pre processing like tokenizing, stemming etc. There are some exploratory data analysis is performed like response variable distribution and data quality checks like null or missing values etc. 85 | 86 | #### FeatureSelection.py 87 | In this file we have performed feature extraction and selection methods from sci-kit learn python libraries. For feature selection, we have used methods like simple bag-of-words and n-grams and then term frequency like tf-tdf weighting. we have also used word2vec and POS tagging to extract the features, though POS tagging and word2vec has not been used at this point in the project. 88 | 89 | #### classifier.py 90 | Here we have build all the classifiers for predicting the fake news detection. The extracted features are fed into different classifiers. We have used Naive-bayes, Logistic Regression, Linear SVM, Stochastic gradient descent and Random forest classifiers from sklearn. Each of the extracted features were used in all of the classifiers. Once fitting the model, we compared the f1 score and checked the confusion matrix. After fitting all the classifiers, 2 best performing models were selected as candidate models for fake news classification. We have performed parameter tuning by implementing GridSearchCV methods on these candidate models and chosen best performing parameters for these classifier. Finally selected model was used for fake news detection with the probability of truth. In Addition to this, We have also extracted the top 50 features from our term-frequency tfidf vectorizer to see what words are most and important in each of the classes. We have also used Precision-Recall and learning curves to see how training and test set performs when we increase the amount of data in our classifiers. 91 | 92 | #### prediction.py 93 | Our finally selected and best performing classifier was ```Logistic Regression``` which was then saved on disk with name ```final_model.sav```. Once you close this repository, this model will be copied to user's machine and will be used by prediction.py file to classify the fake news. It takes an news article as input from user then model is used for final classification output that is shown to user along with probability of truth. 94 | 95 | Below is the Process Flow of the project: 96 | 97 |

98 | 99 |

100 | 101 | ### Performance 102 | Below is the learning curves for our candidate models. 103 | 104 | **Logistic Regression Classifier** 105 | 106 |

107 | 108 |

109 | 110 | **Random Forest Classifier** 111 | 112 |

113 | 114 |

115 | 116 | ### Next steps 117 | As we can see that our best performing models had an f1 score in the range of 70's. This is due to less number of data that we have used for training purposes and simplicity of our models. For the future implementations, we could introduce some more feature selection methods such as POS tagging, word2vec and topic modeling. In addition, we could also increase the training data size. We will extend this project to implement these techniques in future to increase the accuracy and performance of our models. 118 | 119 | 120 | ### Installing and steps to run the software 121 | 122 | A step by step series of examples that tell you have to get a development env running 123 | 124 | 1. The first step would be to clone this repo in a folder in your local machine. To do that you need to run following command in command prompt or in git bash 125 | ``` 126 | $ git clone https://github.com/nishitpatel01/Fake_News_Detection.git 127 | ``` 128 | 129 | 2. This will copy all the data source file, program files and model into your machine. 130 | 131 | 3. 132 | - If you have chosen to install anaconda then follow below instructions 133 | - After all the files are saved in a folder in your machine. If you chosen to install anaconda from the steps given in ```Prerequisites``` sections then open the anaconda prompt, change the directory to the folder where this project is saved in your machine and type below command and press enter. 134 | ``` 135 | cd C:/your cloned project folder path goes here/ 136 | ``` 137 | - Once you are inside the directory call the ```prediction.py``` file, To do this, run below command in anaconda prompt. 138 | ``` 139 | python prediction.py 140 | ``` 141 | - After hitting the enter, program will ask for an input which will be a piece of information or a news headline that you want to verify. Once you paste or type news headline, then press enter. 142 | 143 | - Once you hit the enter, program will take user input (news headline) and will be used by model to classify in one of categories of "True" and "False". Along with classifying the news headline, model will also provide a probability of truth associated with it. 144 | 145 | 4. If you have chosen to install python (and did not set up PATH variable for it) then follow below instructions: 146 | - After you clone the project in a folder in your machine. Open command prompt and change the directory to project directory by running below command. 147 | ``` 148 | cd C:/your cloned project folder path goes here/ 149 | ``` 150 | - Locate ```python.exe``` in your machine. you can search this in window explorer search bar. 151 | - Once you locate the ```python.exe``` path, you need to write whole path of it and then entire path of project folder with ```prediction.py``` at the end. For example if your ```python.exe``` is located at ```c:/Python36/python.exe``` and project folder is at ```c:/users/user_name/desktop/fake_news_detection/```, then your command to run program will be as below: 152 | ``` 153 | c:/Python36/python.exe C:/users/user_name/desktop/fake_news_detection/prediction.py 154 | ``` 155 | - After hitting the enter, program will ask for an input which will be a piece of information or a news headline that you want to verify. Once you paste or type news headline, then press enter. 156 | 157 | - Once you hit the enter, program will take user input (news headline) and will be used by model to classify in one of categories of "True" and "False". Along with classifying the news headline, model will also provide a probability of truth associated with it. It might take few seconds for model to classify the given statement so wait for it. 158 | 159 | 5. If you have chosen to install python (and already setup PATH variable for ```python.exe```) then follow instructions: 160 | - Open the command prompt and change the directory to project folder as mentioned in above by running below command 161 | ``` 162 | cd C:/your cloned project folder path goes here/ 163 | ``` 164 | - run below command 165 | ``` 166 | python.exe C:/your cloned project folder path goes here/ 167 | ``` 168 | - After hitting the enter, program will ask for an input which will be a piece of information or a news headline that you want to verify. Once you paste or type news headline, then press enter. 169 | 170 | - Once you hit the enter, program will take user input (news headline) and will be used by model to classify in one of categories of "True" and "False". Along with classifying the news headline, model will also provide a probability of truth associated with it. 171 | 172 | -------------------------------------------------------------------------------- /__pycache__/DataPrep.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nishitpatel01/Fake_News_Detection/880a2782ab627c10e4f9cf98c3d753d48439a9d1/__pycache__/DataPrep.cpython-36.pyc -------------------------------------------------------------------------------- /__pycache__/FeatureSelection.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nishitpatel01/Fake_News_Detection/880a2782ab627c10e4f9cf98c3d753d48439a9d1/__pycache__/FeatureSelection.cpython-36.pyc -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /animate.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /*! 3 | Animate.css - http://daneden.me/animate 4 | Licensed under the MIT license 5 | Copyright (c) 2013 Daniel Eden 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | .animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}@-webkit-keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)}}@keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);-ms-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);-ms-transform:translateY(-15px);transform:translateY(-15px)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce}@-webkit-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}100%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);-ms-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);-ms-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);-ms-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);-ms-transform:rotate(-5deg);transform:rotate(-5deg)}100%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg)}}.swing{-webkit-transform-origin:top center;-ms-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(0.9) rotate(-3deg);transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}}@keyframes tada{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(0.9) rotate(-3deg);-ms-transform:scale(0.9) rotate(-3deg);transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg);-ms-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg);-ms-transform:scale(1.1) rotate(-3deg);transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0);-ms-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translateX(0%);transform:translateX(0%)}15%{-webkit-transform:translateX(-25%) rotate(-5deg);transform:translateX(-25%) rotate(-5deg)}30%{-webkit-transform:translateX(20%) rotate(3deg);transform:translateX(20%) rotate(3deg)}45%{-webkit-transform:translateX(-15%) rotate(-3deg);transform:translateX(-15%) rotate(-3deg)}60%{-webkit-transform:translateX(10%) rotate(2deg);transform:translateX(10%) rotate(2deg)}75%{-webkit-transform:translateX(-5%) rotate(-1deg);transform:translateX(-5%) rotate(-1deg)}100%{-webkit-transform:translateX(0%);transform:translateX(0%)}}@keyframes wobble{0%{-webkit-transform:translateX(0%);-ms-transform:translateX(0%);transform:translateX(0%)}15%{-webkit-transform:translateX(-25%) rotate(-5deg);-ms-transform:translateX(-25%) rotate(-5deg);transform:translateX(-25%) rotate(-5deg)}30%{-webkit-transform:translateX(20%) rotate(3deg);-ms-transform:translateX(20%) rotate(3deg);transform:translateX(20%) rotate(3deg)}45%{-webkit-transform:translateX(-15%) rotate(-3deg);-ms-transform:translateX(-15%) rotate(-3deg);transform:translateX(-15%) rotate(-3deg)}60%{-webkit-transform:translateX(10%) rotate(2deg);-ms-transform:translateX(10%) rotate(2deg);transform:translateX(10%) rotate(2deg)}75%{-webkit-transform:translateX(-5%) rotate(-1deg);-ms-transform:translateX(-5%) rotate(-1deg);transform:translateX(-5%) rotate(-1deg)}100%{-webkit-transform:translateX(0%);-ms-transform:translateX(0%);transform:translateX(0%)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.3);transform:scale(.3)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}70%{-webkit-transform:scale(.9);transform:scale(.9)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.3);-ms-transform:scale(.3);transform:scale(.3)}50%{opacity:1;-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}70%{-webkit-transform:scale(.9);-ms-transform:scale(.9);transform:scale(.9)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}60%{opacity:1;-webkit-transform:translateY(30px);transform:translateY(30px)}80%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes bounceInDown{0%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}60%{opacity:1;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px)}80%{-webkit-transform:translateY(-10px);-ms-transform:translateY(-10px);transform:translateY(-10px)}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}60%{opacity:1;-webkit-transform:translateX(30px);transform:translateX(30px)}80%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes bounceInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}60%{opacity:1;-webkit-transform:translateX(30px);-ms-transform:translateX(30px);transform:translateX(30px)}80%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}60%{opacity:1;-webkit-transform:translateX(-30px);transform:translateX(-30px)}80%{-webkit-transform:translateX(10px);transform:translateX(10px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes bounceInRight{0%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}60%{opacity:1;-webkit-transform:translateX(-30px);-ms-transform:translateX(-30px);transform:translateX(-30px)}80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}60%{opacity:1;-webkit-transform:translateY(-30px);transform:translateY(-30px)}80%{-webkit-transform:translateY(10px);transform:translateY(10px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes bounceInUp{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}60%{opacity:1;-webkit-transform:translateY(-30px);-ms-transform:translateY(-30px);transform:translateY(-30px)}80%{-webkit-transform:translateY(10px);-ms-transform:translateY(10px);transform:translateY(10px)}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(.95);transform:scale(.95)}50%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1)}100%{opacity:0;-webkit-transform:scale(.3);transform:scale(.3)}}@keyframes bounceOut{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}50%{opacity:1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}100%{opacity:0;-webkit-transform:scale(.3);-ms-transform:scale(.3);transform:scale(.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{0%{-webkit-transform:translateY(0);transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}}@keyframes bounceOutDown{0%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(-20px);-ms-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{0%{-webkit-transform:translateX(0);transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(20px);transform:translateX(20px)}100%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}}@keyframes bounceOutLeft{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}100%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{0%{-webkit-transform:translateX(0);transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(-20px);transform:translateX(-20px)}100%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}}@keyframes bounceOutRight{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(-20px);-ms-transform:translateX(-20px);transform:translateX(-20px)}100%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(20px);transform:translateY(20px)}100%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}}@keyframes bounceOutUp{0%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(20px);-ms-transform:translateY(20px);transform:translateY(20px)}100%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-20px);-ms-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-ms-transform:translateX(-20px);transform:translateX(-20px)}100%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}100%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}100%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}100%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(20px);-ms-transform:translateY(20px);transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}}@keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(20px);-ms-transform:translateY(20px);transform:translateY(20px)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}}@keyframes fadeOutDownBig{0%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}}@keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-20px);-ms-transform:translateX(-20px);transform:translateX(-20px)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}}@keyframes fadeOutLeftBig{0%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}}@keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}}@keyframes fadeOutRightBig{0%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}}@keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-20px);-ms-transform:translateY(-20px);transform:translateY(-20px)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}}@keyframes fadeOutUpBig{0%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) translateZ(0) rotateY(0) scale(1);transform:perspective(400px) translateZ(0) rotateY(0) scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(.95);transform:perspective(400px) translateZ(0) rotateY(360deg) scale(.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) translateZ(0) rotateY(0) scale(1);-ms-transform:perspective(400px) translateZ(0) rotateY(0) scale(1);transform:perspective(400px) translateZ(0) rotateY(0) scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);-ms-transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-ms-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(.95);-ms-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(.95);transform:perspective(400px) translateZ(0) rotateY(360deg) scale(.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);-ms-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;-ms-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-10deg);transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}100%{-webkit-transform:perspective(400px) rotateX(0deg);transform:perspective(400px) rotateX(0deg);opacity:1}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);-ms-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-10deg);-ms-transform:perspective(400px) rotateX(-10deg);transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg);-ms-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}100%{-webkit-transform:perspective(400px) rotateX(0deg);-ms-transform:perspective(400px) rotateX(0deg);transform:perspective(400px) rotateX(0deg);opacity:1}}.flipInX{-webkit-backface-visibility:visible !important;-ms-backface-visibility:visible !important;backface-visibility:visible !important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-10deg);transform:perspective(400px) rotateY(-10deg)}70%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg)}100%{-webkit-transform:perspective(400px) rotateY(0deg);transform:perspective(400px) rotateY(0deg);opacity:1}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);-ms-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-10deg);-ms-transform:perspective(400px) rotateY(-10deg);transform:perspective(400px) rotateY(-10deg)}70%{-webkit-transform:perspective(400px) rotateY(10deg);-ms-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg)}100%{-webkit-transform:perspective(400px) rotateY(0deg);-ms-transform:perspective(400px) rotateY(0deg);transform:perspective(400px) rotateY(0deg);opacity:1}}.flipInY{-webkit-backface-visibility:visible !important;-ms-backface-visibility:visible !important;backface-visibility:visible !important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px) rotateX(0deg);transform:perspective(400px) rotateX(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px) rotateX(0deg);-ms-transform:perspective(400px) rotateX(0deg);transform:perspective(400px) rotateX(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateX(90deg);-ms-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible !important;-ms-backface-visibility:visible !important;backface-visibility:visible !important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px) rotateY(0deg);transform:perspective(400px) rotateY(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px) rotateY(0deg);-ms-transform:perspective(400px) rotateY(0deg);transform:perspective(400px) rotateY(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateY(90deg);-ms-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible !important;-ms-backface-visibility:visible !important;backface-visibility:visible !important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translateX(100%) skewX(-30deg);transform:translateX(100%) skewX(-30deg);opacity:0}60%{-webkit-transform:translateX(-20%) skewX(30deg);transform:translateX(-20%) skewX(30deg);opacity:1}80%{-webkit-transform:translateX(0%) skewX(-15deg);transform:translateX(0%) skewX(-15deg);opacity:1}100%{-webkit-transform:translateX(0%) skewX(0deg);transform:translateX(0%) skewX(0deg);opacity:1}}@keyframes lightSpeedIn{0%{-webkit-transform:translateX(100%) skewX(-30deg);-ms-transform:translateX(100%) skewX(-30deg);transform:translateX(100%) skewX(-30deg);opacity:0}60%{-webkit-transform:translateX(-20%) skewX(30deg);-ms-transform:translateX(-20%) skewX(30deg);transform:translateX(-20%) skewX(30deg);opacity:1}80%{-webkit-transform:translateX(0%) skewX(-15deg);-ms-transform:translateX(0%) skewX(-15deg);transform:translateX(0%) skewX(-15deg);opacity:1}100%{-webkit-transform:translateX(0%) skewX(0deg);-ms-transform:translateX(0%) skewX(0deg);transform:translateX(0%) skewX(0deg);opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{-webkit-transform:translateX(0%) skewX(0deg);transform:translateX(0%) skewX(0deg);opacity:1}100%{-webkit-transform:translateX(100%) skewX(-30deg);transform:translateX(100%) skewX(-30deg);opacity:0}}@keyframes lightSpeedOut{0%{-webkit-transform:translateX(0%) skewX(0deg);-ms-transform:translateX(0%) skewX(0deg);transform:translateX(0%) skewX(0deg);opacity:1}100%{-webkit-transform:translateX(100%) skewX(-30deg);-ms-transform:translateX(100%) skewX(-30deg);transform:translateX(100%) skewX(-30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}100%{-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(-200deg);-ms-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}100%{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;-webkit-transform:rotate(200deg);-ms-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}}@keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}}@keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}}@keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}}@keyframes slideOutRight{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}}@keyframes slideOutUp{0%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}@-webkit-keyframes hinge{0%{-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%{-webkit-transform:rotate(60deg);transform:rotate(60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}80%{-webkit-transform:rotate(60deg) translateY(0);transform:rotate(60deg) translateY(0);opacity:1;-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}100%{-webkit-transform:translateY(700px);transform:translateY(700px);opacity:0}}@keyframes hinge{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);-ms-transform:rotate(80deg);transform:rotate(80deg);-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%{-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg);-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}80%{-webkit-transform:rotate(60deg) translateY(0);-ms-transform:rotate(60deg) translateY(0);transform:rotate(60deg) translateY(0);opacity:1;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}100%{-webkit-transform:translateY(700px);-ms-transform:translateY(700px);transform:translateY(700px);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);-ms-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}100%{opacity:0;-webkit-transform:translateX(100%) rotate(120deg);transform:translateX(100%) rotate(120deg)}}@keyframes rollOut{0%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);-ms-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}100%{opacity:0;-webkit-transform:translateX(100%) rotate(120deg);-ms-transform:translateX(100%) rotate(120deg);transform:translateX(100%) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut} -------------------------------------------------------------------------------- /classifier.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sun Nov 5 12:58:52 2017 4 | 5 | @author: NishitP 6 | """ 7 | 8 | import DataPrep 9 | import FeatureSelection 10 | import numpy as np 11 | import pandas as pd 12 | import pickle 13 | from sklearn.feature_extraction.text import CountVectorizer 14 | from sklearn.feature_extraction.text import TfidfTransformer 15 | from sklearn.feature_extraction.text import TfidfVectorizer 16 | from sklearn.pipeline import Pipeline 17 | from sklearn.naive_bayes import MultinomialNB 18 | from sklearn.linear_model import LogisticRegression 19 | from sklearn.linear_model import SGDClassifier 20 | from sklearn import svm 21 | from sklearn.ensemble import RandomForestClassifier 22 | from sklearn.model_selection import KFold 23 | from sklearn.metrics import confusion_matrix, f1_score, classification_report 24 | from sklearn.model_selection import GridSearchCV 25 | from sklearn.model_selection import learning_curve 26 | import matplotlib.pyplot as plt 27 | from sklearn.metrics import precision_recall_curve 28 | from sklearn.metrics import average_precision_score 29 | 30 | #string to test 31 | doc_new = ['obama is running for president in 2016'] 32 | 33 | #the feature selection has been done in FeatureSelection.py module. here we will create models using those features for prediction 34 | 35 | #first we will use bag of words techniques 36 | 37 | #building classifier using naive bayes 38 | nb_pipeline = Pipeline([ 39 | ('NBCV',FeatureSelection.countV), 40 | ('nb_clf',MultinomialNB())]) 41 | 42 | nb_pipeline.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 43 | predicted_nb = nb_pipeline.predict(DataPrep.test_news['Statement']) 44 | np.mean(predicted_nb == DataPrep.test_news['Label']) 45 | 46 | 47 | #building classifier using logistic regression 48 | logR_pipeline = Pipeline([ 49 | ('LogRCV',FeatureSelection.countV), 50 | ('LogR_clf',LogisticRegression()) 51 | ]) 52 | 53 | logR_pipeline.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 54 | predicted_LogR = logR_pipeline.predict(DataPrep.test_news['Statement']) 55 | np.mean(predicted_LogR == DataPrep.test_news['Label']) 56 | 57 | 58 | #building Linear SVM classfier 59 | svm_pipeline = Pipeline([ 60 | ('svmCV',FeatureSelection.countV), 61 | ('svm_clf',svm.LinearSVC()) 62 | ]) 63 | 64 | svm_pipeline.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 65 | predicted_svm = svm_pipeline.predict(DataPrep.test_news['Statement']) 66 | np.mean(predicted_svm == DataPrep.test_news['Label']) 67 | 68 | 69 | #using SVM Stochastic Gradient Descent on hinge loss 70 | sgd_pipeline = Pipeline([ 71 | ('svm2CV',FeatureSelection.countV), 72 | ('svm2_clf',SGDClassifier(loss='hinge', penalty='l2', alpha=1e-3, n_iter=5)) 73 | ]) 74 | 75 | sgd_pipeline.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 76 | predicted_sgd = sgd_pipeline.predict(DataPrep.test_news['Statement']) 77 | np.mean(predicted_sgd == DataPrep.test_news['Label']) 78 | 79 | 80 | #random forest 81 | random_forest = Pipeline([ 82 | ('rfCV',FeatureSelection.countV), 83 | ('rf_clf',RandomForestClassifier(n_estimators=200,n_jobs=3)) 84 | ]) 85 | 86 | random_forest.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 87 | predicted_rf = random_forest.predict(DataPrep.test_news['Statement']) 88 | np.mean(predicted_rf == DataPrep.test_news['Label']) 89 | 90 | 91 | #User defined functon for K-Fold cross validatoin 92 | def build_confusion_matrix(classifier): 93 | 94 | k_fold = KFold(n_splits=5) 95 | scores = [] 96 | confusion = np.array([[0,0],[0,0]]) 97 | 98 | for train_ind, test_ind in k_fold.split(DataPrep.train_news): 99 | train_text = DataPrep.train_news.iloc[train_ind]['Statement'] 100 | train_y = DataPrep.train_news.iloc[train_ind]['Label'] 101 | 102 | test_text = DataPrep.train_news.iloc[test_ind]['Statement'] 103 | test_y = DataPrep.train_news.iloc[test_ind]['Label'] 104 | 105 | classifier.fit(train_text,train_y) 106 | predictions = classifier.predict(test_text) 107 | 108 | confusion += confusion_matrix(test_y,predictions) 109 | score = f1_score(test_y,predictions) 110 | scores.append(score) 111 | 112 | return (print('Total statements classified:', len(DataPrep.train_news)), 113 | print('Score:', sum(scores)/len(scores)), 114 | print('score length', len(scores)), 115 | print('Confusion matrix:'), 116 | print(confusion)) 117 | 118 | #K-fold cross validation for all classifiers 119 | build_confusion_matrix(nb_pipeline) 120 | build_confusion_matrix(logR_pipeline) 121 | build_confusion_matrix(svm_pipeline) 122 | build_confusion_matrix(sgd_pipeline) 123 | build_confusion_matrix(random_forest) 124 | 125 | #======================================================================================== 126 | #Bag of words confusion matrix and F1 scores 127 | 128 | #Naive bayes 129 | # [2118 2370] 130 | # [1664 4088] 131 | # f1-Score: 0.669611539651 132 | 133 | #Logistic regression 134 | # [2252 2236] 135 | # [1933 3819] 136 | # f1-Score: 0.646909097798 137 | 138 | #svm 139 | # [2260 2228] 140 | # [2246 3506] 141 | #f1-score: 0.610468748792 142 | 143 | #sgdclassifier 144 | # [2414 2074] 145 | # [2042 3710] 146 | # f1-Score: 0.640874558778 147 | 148 | #random forest classifier 149 | # [1821 2667] 150 | # [1192 4560] 151 | # f1-Score: 0.702651511011 152 | #========================================================================================= 153 | 154 | 155 | """So far we have used bag of words technique to extract the features and passed those featuers into classifiers. We have also seen the 156 | f1 scores of these classifiers. now lets enhance these features using term frequency weights with various n-grams 157 | """ 158 | 159 | ##Now using n-grams 160 | #naive-bayes classifier 161 | nb_pipeline_ngram = Pipeline([ 162 | ('nb_tfidf',FeatureSelection.tfidf_ngram), 163 | ('nb_clf',MultinomialNB())]) 164 | 165 | nb_pipeline_ngram.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 166 | predicted_nb_ngram = nb_pipeline_ngram.predict(DataPrep.test_news['Statement']) 167 | np.mean(predicted_nb_ngram == DataPrep.test_news['Label']) 168 | 169 | 170 | #logistic regression classifier 171 | logR_pipeline_ngram = Pipeline([ 172 | ('LogR_tfidf',FeatureSelection.tfidf_ngram), 173 | ('LogR_clf',LogisticRegression(penalty="l2",C=1)) 174 | ]) 175 | 176 | logR_pipeline_ngram.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 177 | predicted_LogR_ngram = logR_pipeline_ngram.predict(DataPrep.test_news['Statement']) 178 | np.mean(predicted_LogR_ngram == DataPrep.test_news['Label']) 179 | 180 | 181 | #linear SVM classifier 182 | svm_pipeline_ngram = Pipeline([ 183 | ('svm_tfidf',FeatureSelection.tfidf_ngram), 184 | ('svm_clf',svm.LinearSVC()) 185 | ]) 186 | 187 | svm_pipeline_ngram.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 188 | predicted_svm_ngram = svm_pipeline_ngram.predict(DataPrep.test_news['Statement']) 189 | np.mean(predicted_svm_ngram == DataPrep.test_news['Label']) 190 | 191 | 192 | #sgd classifier 193 | sgd_pipeline_ngram = Pipeline([ 194 | ('sgd_tfidf',FeatureSelection.tfidf_ngram), 195 | ('sgd_clf',SGDClassifier(loss='hinge', penalty='l2', alpha=1e-3, n_iter=5)) 196 | ]) 197 | 198 | sgd_pipeline_ngram.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 199 | predicted_sgd_ngram = sgd_pipeline_ngram.predict(DataPrep.test_news['Statement']) 200 | np.mean(predicted_sgd_ngram == DataPrep.test_news['Label']) 201 | 202 | 203 | #random forest classifier 204 | random_forest_ngram = Pipeline([ 205 | ('rf_tfidf',FeatureSelection.tfidf_ngram), 206 | ('rf_clf',RandomForestClassifier(n_estimators=300,n_jobs=3)) 207 | ]) 208 | 209 | random_forest_ngram.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 210 | predicted_rf_ngram = random_forest_ngram.predict(DataPrep.test_news['Statement']) 211 | np.mean(predicted_rf_ngram == DataPrep.test_news['Label']) 212 | 213 | 214 | #K-fold cross validation for all classifiers 215 | build_confusion_matrix(nb_pipeline_ngram) 216 | build_confusion_matrix(logR_pipeline_ngram) 217 | build_confusion_matrix(svm_pipeline_ngram) 218 | build_confusion_matrix(sgd_pipeline_ngram) 219 | build_confusion_matrix(random_forest_ngram) 220 | 221 | #======================================================================================== 222 | #n-grams & tfidf confusion matrix and F1 scores 223 | 224 | #Naive bayes 225 | # [841 3647] 226 | # [427 5325] 227 | # f1-Score: 0.723262051071 228 | 229 | #Logistic regression 230 | # [1617 2871] 231 | # [1097 4655] 232 | # f1-Score: 0.70113000531 233 | 234 | #svm 235 | # [2016 2472] 236 | # [1524 4228] 237 | # f1-Score: 0.67909201429 238 | 239 | #sgdclassifier 240 | # [ 10 4478] 241 | # [ 13 5739] 242 | # f1-Score: 0.718731637053 243 | 244 | #random forest 245 | # [1979 2509] 246 | # [1630 4122] 247 | # f1-Score: 0.665720333284 248 | #========================================================================================= 249 | 250 | print(classification_report(DataPrep.test_news['Label'], predicted_nb_ngram)) 251 | print(classification_report(DataPrep.test_news['Label'], predicted_LogR_ngram)) 252 | print(classification_report(DataPrep.test_news['Label'], predicted_svm_ngram)) 253 | print(classification_report(DataPrep.test_news['Label'], predicted_sgd_ngram)) 254 | print(classification_report(DataPrep.test_news['Label'], predicted_rf_ngram)) 255 | 256 | DataPrep.test_news['Label'].shape 257 | 258 | """ 259 | Out of all the models fitted, we would take 2 best performing model. we would call them candidate models 260 | from the confusion matrix, we can see that random forest and logistic regression are best performing 261 | in terms of precision and recall (take a look into false positive and true negative counts which appeares 262 | to be low compared to rest of the models) 263 | """ 264 | 265 | #grid-search parameter optimization 266 | #random forest classifier parameters 267 | parameters = {'rf_tfidf__ngram_range': [(1, 1), (1, 2),(1,3),(1,4),(1,5)], 268 | 'rf_tfidf__use_idf': (True, False), 269 | 'rf_clf__max_depth': (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) 270 | } 271 | 272 | gs_clf = GridSearchCV(random_forest_ngram, parameters, n_jobs=-1) 273 | gs_clf = gs_clf.fit(DataPrep.train_news['Statement'][:10000],DataPrep.train_news['Label'][:10000]) 274 | 275 | gs_clf.best_score_ 276 | gs_clf.best_params_ 277 | gs_clf.cv_results_ 278 | 279 | #logistic regression parameters 280 | parameters = {'LogR_tfidf__ngram_range': [(1, 1), (1, 2),(1,3),(1,4),(1,5)], 281 | 'LogR_tfidf__use_idf': (True, False), 282 | 'LogR_tfidf__smooth_idf': (True, False) 283 | } 284 | 285 | gs_clf = GridSearchCV(logR_pipeline_ngram, parameters, n_jobs=-1) 286 | gs_clf = gs_clf.fit(DataPrep.train_news['Statement'][:10000],DataPrep.train_news['Label'][:10000]) 287 | 288 | gs_clf.best_score_ 289 | gs_clf.best_params_ 290 | gs_clf.cv_results_ 291 | 292 | #Linear SVM 293 | parameters = {'svm_tfidf__ngram_range': [(1, 1), (1, 2),(1,3),(1,4),(1,5)], 294 | 'svm_tfidf__use_idf': (True, False), 295 | 'svm_tfidf__smooth_idf': (True, False), 296 | 'svm_clf__penalty': ('l1','l2'), 297 | } 298 | 299 | gs_clf = GridSearchCV(svm_pipeline_ngram, parameters, n_jobs=-1) 300 | gs_clf = gs_clf.fit(DataPrep.train_news['Statement'][:10000],DataPrep.train_news['Label'][:10000]) 301 | 302 | gs_clf.best_score_ 303 | gs_clf.best_params_ 304 | gs_clf.cv_results_ 305 | 306 | #by running above commands we can find the model with best performing parameters 307 | 308 | 309 | #running both random forest and logistic regression models again with best parameter found with GridSearch method 310 | random_forest_final = Pipeline([ 311 | ('rf_tfidf',TfidfVectorizer(stop_words='english',ngram_range=(1,3),use_idf=True,smooth_idf=True)), 312 | ('rf_clf',RandomForestClassifier(n_estimators=300,n_jobs=3,max_depth=10)) 313 | ]) 314 | 315 | random_forest_final.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 316 | predicted_rf_final = random_forest_final.predict(DataPrep.test_news['Statement']) 317 | np.mean(predicted_rf_final == DataPrep.test_news['Label']) 318 | print(metrics.classification_report(DataPrep.test_news['Label'], predicted_rf_final)) 319 | 320 | logR_pipeline_final = Pipeline([ 321 | #('LogRCV',countV_ngram), 322 | ('LogR_tfidf',TfidfVectorizer(stop_words='english',ngram_range=(1,5),use_idf=True,smooth_idf=False)), 323 | ('LogR_clf',LogisticRegression(penalty="l2",C=1)) 324 | ]) 325 | 326 | logR_pipeline_final.fit(DataPrep.train_news['Statement'],DataPrep.train_news['Label']) 327 | predicted_LogR_final = logR_pipeline_final.predict(DataPrep.test_news['Statement']) 328 | np.mean(predicted_LogR_final == DataPrep.test_news['Label']) 329 | #accuracy = 0.62 330 | print(metrics.classification_report(DataPrep.test_news['Label'], predicted_LogR_final)) 331 | 332 | 333 | """ 334 | by running both random forest and logistic regression with GridSearch's best parameter estimation, we found that for random 335 | forest model with n-gram has better accuracty than with the parameter estimated. The logistic regression model with best parameter 336 | has almost similar performance as n-gram model so logistic regression will be out choice of model for prediction. 337 | """ 338 | 339 | #saving best model to the disk 340 | model_file = 'final_model.sav' 341 | pickle.dump(logR_pipeline_ngram,open(model_file,'wb')) 342 | 343 | 344 | #Plotting learing curve 345 | def plot_learing_curve(pipeline,title): 346 | size = 10000 347 | cv = KFold(size, shuffle=True) 348 | 349 | X = DataPrep.train_news["Statement"] 350 | y = DataPrep.train_news["Label"] 351 | 352 | pl = pipeline 353 | pl.fit(X,y) 354 | 355 | train_sizes, train_scores, test_scores = learning_curve(pl, X, y, n_jobs=-1, cv=cv, train_sizes=np.linspace(.1, 1.0, 5), verbose=0) 356 | 357 | train_scores_mean = np.mean(train_scores, axis=1) 358 | train_scores_std = np.std(train_scores, axis=1) 359 | test_scores_mean = np.mean(test_scores, axis=1) 360 | test_scores_std = np.std(test_scores, axis=1) 361 | 362 | plt.figure() 363 | plt.title(title) 364 | plt.legend(loc="best") 365 | plt.xlabel("Training examples") 366 | plt.ylabel("Score") 367 | plt.gca().invert_yaxis() 368 | 369 | # box-like grid 370 | plt.grid() 371 | 372 | # plot the std deviation as a transparent range at each training set size 373 | plt.fill_between(train_sizes, train_scores_mean - train_scores_std, train_scores_mean + train_scores_std, alpha=0.1, color="r") 374 | plt.fill_between(train_sizes, test_scores_mean - test_scores_std, test_scores_mean + test_scores_std, alpha=0.1, color="g") 375 | 376 | # plot the average training and test score lines at each training set size 377 | plt.plot(train_sizes, train_scores_mean, 'o-', color="r", label="Training score") 378 | plt.plot(train_sizes, test_scores_mean, 'o-', color="g", label="Cross-validation score") 379 | 380 | # sizes the window for readability and displays the plot 381 | # shows error from 0 to 1.1 382 | plt.ylim(-.1,1.1) 383 | plt.show() 384 | 385 | 386 | #below command will plot learing curves for each of the classifiers 387 | plot_learing_curve(logR_pipeline_ngram,"Naive-bayes Classifier") 388 | plot_learing_curve(nb_pipeline_ngram,"LogisticRegression Classifier") 389 | plot_learing_curve(svm_pipeline_ngram,"SVM Classifier") 390 | plot_learing_curve(sgd_pipeline_ngram,"SGD Classifier") 391 | plot_learing_curve(random_forest_ngram,"RandomForest Classifier") 392 | 393 | """ 394 | by plotting the learning cureve for logistic regression, it can be seen that cross-validation score is stagnating throughout and it 395 | is unable to learn from data. Also we see that there are high errors that indicates model is simple and we may want to increase the 396 | model complexity. 397 | """ 398 | 399 | 400 | #plotting Precision-Recall curve 401 | def plot_PR_curve(classifier): 402 | 403 | precision, recall, thresholds = precision_recall_curve(DataPrep.test_news['Label'], classifier) 404 | average_precision = average_precision_score(DataPrep.test_news['Label'], classifier) 405 | 406 | plt.step(recall, precision, color='b', alpha=0.2, 407 | where='post') 408 | plt.fill_between(recall, precision, step='post', alpha=0.2, 409 | color='b') 410 | 411 | plt.xlabel('Recall') 412 | plt.ylabel('Precision') 413 | plt.ylim([0.0, 1.05]) 414 | plt.xlim([0.0, 1.0]) 415 | plt.title('2-class Random Forest Precision-Recall curve: AP={0:0.2f}'.format( 416 | average_precision)) 417 | 418 | plot_PR_curve(predicted_LogR_ngram) 419 | plot_PR_curve(predicted_rf_ngram) 420 | 421 | 422 | """ 423 | Now let's extract the most informative feature from ifidf vectorizer for all fo the classifiers and see of there are any common 424 | words that we can identify i.e. are these most informative feature acorss the classifiers are same? we will create a function that 425 | will extract top 50 features. 426 | """ 427 | 428 | def show_most_informative_features(model, vect, clf, text=None, n=50): 429 | # Extract the vectorizer and the classifier from the pipeline 430 | vectorizer = model.named_steps[vect] 431 | classifier = model.named_steps[clf] 432 | 433 | # Check to make sure that we can perform this computation 434 | if not hasattr(classifier, 'coef_'): 435 | raise TypeError( 436 | "Cannot compute most informative features on {}.".format( 437 | classifier.__class__.__name__ 438 | ) 439 | ) 440 | 441 | if text is not None: 442 | # Compute the coefficients for the text 443 | tvec = model.transform([text]).toarray() 444 | else: 445 | # Otherwise simply use the coefficients 446 | tvec = classifier.coef_ 447 | 448 | # Zip the feature names with the coefs and sort 449 | coefs = sorted( 450 | zip(tvec[0], vectorizer.get_feature_names()), 451 | reverse=True 452 | ) 453 | 454 | # Get the top n and bottom n coef, name pairs 455 | topn = zip(coefs[:n], coefs[:-(n+1):-1]) 456 | 457 | # Create the output string to return 458 | output = [] 459 | 460 | # If text, add the predicted value to the output. 461 | if text is not None: 462 | output.append("\"{}\"".format(text)) 463 | output.append( 464 | "Classified as: {}".format(model.predict([text])) 465 | ) 466 | output.append("") 467 | 468 | # Create two columns with most negative and most positive features. 469 | for (cp, fnp), (cn, fnn) in topn: 470 | output.append( 471 | "{:0.4f}{: >15} {:0.4f}{: >15}".format( 472 | cp, fnp, cn, fnn 473 | ) 474 | ) 475 | #return "\n".join(output) 476 | print(output) 477 | 478 | show_most_informative_features(logR_pipeline_ngram,vect='LogR_tfidf',clf='LogR_clf') 479 | show_most_informative_features(nb_pipeline_ngram,vect='nb_tfidf',clf='nb_clf') 480 | show_most_informative_features(svm_pipeline_ngram,vect='svm_tfidf',clf='svm_clf') 481 | show_most_informative_features(sgd_pipeline_ngram,vect='sgd_tfidf',clf='sgd_clf') 482 | -------------------------------------------------------------------------------- /final-fnd.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 45, 6 | "metadata": { 7 | "execution": { 8 | "iopub.execute_input": "2021-05-25T06:50:29.636394Z", 9 | "iopub.status.busy": "2021-05-25T06:50:29.636041Z", 10 | "iopub.status.idle": "2021-05-25T06:50:29.643277Z", 11 | "shell.execute_reply": "2021-05-25T06:50:29.642127Z", 12 | "shell.execute_reply.started": "2021-05-25T06:50:29.636365Z" 13 | } 14 | }, 15 | "outputs": [], 16 | "source": [ 17 | "import pandas as pd\n", 18 | "import sklearn\n", 19 | "import itertools\n", 20 | "import numpy as np\n", 21 | "import seaborn as sb\n", 22 | "import re\n", 23 | "import nltk\n", 24 | "import pickle\n", 25 | "from sklearn.model_selection import train_test_split\n", 26 | "from sklearn.feature_extraction.text import TfidfVectorizer\n", 27 | "from sklearn import metrics\n", 28 | "from sklearn.metrics import confusion_matrix\n", 29 | "from matplotlib import pyplot as plt\n", 30 | "from sklearn.linear_model import PassiveAggressiveClassifier\n", 31 | "from nltk.stem import WordNetLemmatizer\n", 32 | "from nltk.corpus import stopwords" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": 46, 38 | "metadata": { 39 | "execution": { 40 | "iopub.execute_input": "2021-05-25T06:50:29.656569Z", 41 | "iopub.status.busy": "2021-05-25T06:50:29.656203Z", 42 | "iopub.status.idle": "2021-05-25T06:50:32.048864Z", 43 | "shell.execute_reply": "2021-05-25T06:50:32.047882Z", 44 | "shell.execute_reply.started": "2021-05-25T06:50:29.65654Z" 45 | } 46 | }, 47 | "outputs": [], 48 | "source": [ 49 | "train_df = pd.read_csv(r'C:\\Users\\Mayur\\Downloads\\train.csv')" 50 | ] 51 | }, 52 | { 53 | "cell_type": "code", 54 | "execution_count": 47, 55 | "metadata": { 56 | "execution": { 57 | "iopub.execute_input": "2021-05-25T06:50:32.05136Z", 58 | "iopub.status.busy": "2021-05-25T06:50:32.051032Z", 59 | "iopub.status.idle": "2021-05-25T06:50:32.089516Z", 60 | "shell.execute_reply": "2021-05-25T06:50:32.088399Z", 61 | "shell.execute_reply.started": "2021-05-25T06:50:32.051329Z" 62 | } 63 | }, 64 | "outputs": [ 65 | { 66 | "data": { 67 | "text/html": [ 68 | "
\n", 69 | "\n", 82 | "\n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | " \n", 91 | " \n", 92 | " \n", 93 | " \n", 94 | " \n", 95 | " \n", 96 | " \n", 97 | " \n", 98 | " \n", 99 | " \n", 100 | " \n", 101 | " \n", 102 | " \n", 103 | " \n", 104 | " \n", 105 | " \n", 106 | " \n", 107 | " \n", 108 | " \n", 109 | " \n", 110 | " \n", 111 | " \n", 112 | " \n", 113 | " \n", 114 | " \n", 115 | " \n", 116 | " \n", 117 | " \n", 118 | " \n", 119 | " \n", 120 | " \n", 121 | " \n", 122 | " \n", 123 | " \n", 124 | " \n", 125 | " \n", 126 | " \n", 127 | " \n", 128 | " \n", 129 | " \n", 130 | " \n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | " \n", 206 | " \n", 207 | " \n", 208 | " \n", 209 | " \n", 210 | " \n", 211 | " \n", 212 | " \n", 213 | " \n", 214 | " \n", 215 | "
idtitleauthortextlabel
00House Dem Aide: We Didn’t Even See Comey’s Let...Darrell LucusHouse Dem Aide: We Didn’t Even See Comey’s Let...1
11FLYNN: Hillary Clinton, Big Woman on Campus - ...Daniel J. FlynnEver get the feeling your life circles the rou...0
22Why the Truth Might Get You FiredConsortiumnews.comWhy the Truth Might Get You Fired October 29, ...1
3315 Civilians Killed In Single US Airstrike Hav...Jessica PurkissVideos 15 Civilians Killed In Single US Airstr...1
44Iranian woman jailed for fictional unpublished...Howard PortnoyPrint \\nAn Iranian woman has been sentenced to...1
55Jackie Mason: Hollywood Would Love Trump if He...Daniel NussbaumIn these trying times, Jackie Mason is the Voi...0
66Life: Life Of Luxury: Elton John’s 6 Favorite ...NaNEver wonder how Britain’s most iconic pop pian...1
77Benoît Hamon Wins French Socialist Party’s Pre...Alissa J. RubinPARIS — France chose an idealistic, traditi...0
88Excerpts From a Draft Script for Donald Trump’...NaNDonald J. Trump is scheduled to make a highly ...0
99A Back-Channel Plan for Ukraine and Russia, Co...Megan Twohey and Scott ShaneA week before Michael T. Flynn resigned as nat...0
1010Obama’s Organizing for Action Partners with So...Aaron KleinOrganizing for Action, the activist group that...0
1111BBC Comedy Sketch \"Real Housewives of ISIS\" Ca...Chris TomlinsonThe BBC produced spoof on the “Real Housewives...0
1212Russian Researchers Discover Secret Nazi Milit...Amando FlavioThe mystery surrounding The Third Reich and Na...1
1313US Officials See No Link Between Trump and RussiaJason DitzClinton Campaign Demands FBI Affirm Trump's Ru...1
1414Re: Yes, There Are Paid Government Trolls On S...AnotherAnnieYes, There Are Paid Government Trolls On Socia...1
\n", 216 | "
" 217 | ], 218 | "text/plain": [ 219 | " id title \\\n", 220 | "0 0 House Dem Aide: We Didn’t Even See Comey’s Let... \n", 221 | "1 1 FLYNN: Hillary Clinton, Big Woman on Campus - ... \n", 222 | "2 2 Why the Truth Might Get You Fired \n", 223 | "3 3 15 Civilians Killed In Single US Airstrike Hav... \n", 224 | "4 4 Iranian woman jailed for fictional unpublished... \n", 225 | "5 5 Jackie Mason: Hollywood Would Love Trump if He... \n", 226 | "6 6 Life: Life Of Luxury: Elton John’s 6 Favorite ... \n", 227 | "7 7 Benoît Hamon Wins French Socialist Party’s Pre... \n", 228 | "8 8 Excerpts From a Draft Script for Donald Trump’... \n", 229 | "9 9 A Back-Channel Plan for Ukraine and Russia, Co... \n", 230 | "10 10 Obama’s Organizing for Action Partners with So... \n", 231 | "11 11 BBC Comedy Sketch \"Real Housewives of ISIS\" Ca... \n", 232 | "12 12 Russian Researchers Discover Secret Nazi Milit... \n", 233 | "13 13 US Officials See No Link Between Trump and Russia \n", 234 | "14 14 Re: Yes, There Are Paid Government Trolls On S... \n", 235 | "\n", 236 | " author \\\n", 237 | "0 Darrell Lucus \n", 238 | "1 Daniel J. Flynn \n", 239 | "2 Consortiumnews.com \n", 240 | "3 Jessica Purkiss \n", 241 | "4 Howard Portnoy \n", 242 | "5 Daniel Nussbaum \n", 243 | "6 NaN \n", 244 | "7 Alissa J. Rubin \n", 245 | "8 NaN \n", 246 | "9 Megan Twohey and Scott Shane \n", 247 | "10 Aaron Klein \n", 248 | "11 Chris Tomlinson \n", 249 | "12 Amando Flavio \n", 250 | "13 Jason Ditz \n", 251 | "14 AnotherAnnie \n", 252 | "\n", 253 | " text label \n", 254 | "0 House Dem Aide: We Didn’t Even See Comey’s Let... 1 \n", 255 | "1 Ever get the feeling your life circles the rou... 0 \n", 256 | "2 Why the Truth Might Get You Fired October 29, ... 1 \n", 257 | "3 Videos 15 Civilians Killed In Single US Airstr... 1 \n", 258 | "4 Print \\nAn Iranian woman has been sentenced to... 1 \n", 259 | "5 In these trying times, Jackie Mason is the Voi... 0 \n", 260 | "6 Ever wonder how Britain’s most iconic pop pian... 1 \n", 261 | "7 PARIS — France chose an idealistic, traditi... 0 \n", 262 | "8 Donald J. Trump is scheduled to make a highly ... 0 \n", 263 | "9 A week before Michael T. Flynn resigned as nat... 0 \n", 264 | "10 Organizing for Action, the activist group that... 0 \n", 265 | "11 The BBC produced spoof on the “Real Housewives... 0 \n", 266 | "12 The mystery surrounding The Third Reich and Na... 1 \n", 267 | "13 Clinton Campaign Demands FBI Affirm Trump's Ru... 1 \n", 268 | "14 Yes, There Are Paid Government Trolls On Socia... 1 " 269 | ] 270 | }, 271 | "execution_count": 47, 272 | "metadata": {}, 273 | "output_type": "execute_result" 274 | } 275 | ], 276 | "source": [ 277 | "train_df.head(15)" 278 | ] 279 | }, 280 | { 281 | "cell_type": "code", 282 | "execution_count": 48, 283 | "metadata": { 284 | "execution": { 285 | "iopub.execute_input": "2021-05-25T06:50:32.091153Z", 286 | "iopub.status.busy": "2021-05-25T06:50:32.090847Z", 287 | "iopub.status.idle": "2021-05-25T06:50:32.104756Z", 288 | "shell.execute_reply": "2021-05-25T06:50:32.10363Z", 289 | "shell.execute_reply.started": "2021-05-25T06:50:32.091126Z" 290 | } 291 | }, 292 | "outputs": [], 293 | "source": [ 294 | "train_df = train_df.drop(\"author\", axis = 1)\n", 295 | "train_df = train_df.drop(\"title\", axis = 1)\n", 296 | "train_df = train_df.drop(\"id\", axis = 1)" 297 | ] 298 | }, 299 | { 300 | "cell_type": "code", 301 | "execution_count": 49, 302 | "metadata": { 303 | "execution": { 304 | "iopub.execute_input": "2021-05-25T06:50:32.10674Z", 305 | "iopub.status.busy": "2021-05-25T06:50:32.106434Z", 306 | "iopub.status.idle": "2021-05-25T06:50:32.120541Z", 307 | "shell.execute_reply": "2021-05-25T06:50:32.119386Z", 308 | "shell.execute_reply.started": "2021-05-25T06:50:32.106712Z" 309 | } 310 | }, 311 | "outputs": [ 312 | { 313 | "data": { 314 | "text/plain": [ 315 | "(20800, 2)" 316 | ] 317 | }, 318 | "execution_count": 49, 319 | "metadata": {}, 320 | "output_type": "execute_result" 321 | } 322 | ], 323 | "source": [ 324 | "train_df.shape" 325 | ] 326 | }, 327 | { 328 | "cell_type": "code", 329 | "execution_count": 50, 330 | "metadata": { 331 | "execution": { 332 | "iopub.execute_input": "2021-05-25T06:50:32.124489Z", 333 | "iopub.status.busy": "2021-05-25T06:50:32.12414Z", 334 | "iopub.status.idle": "2021-05-25T06:50:32.140229Z", 335 | "shell.execute_reply": "2021-05-25T06:50:32.139288Z", 336 | "shell.execute_reply.started": "2021-05-25T06:50:32.124461Z" 337 | } 338 | }, 339 | "outputs": [ 340 | { 341 | "data": { 342 | "text/html": [ 343 | "
\n", 344 | "\n", 357 | "\n", 358 | " \n", 359 | " \n", 360 | " \n", 361 | " \n", 362 | " \n", 363 | " \n", 364 | " \n", 365 | " \n", 366 | " \n", 367 | " \n", 368 | " \n", 369 | " \n", 370 | " \n", 371 | " \n", 372 | " \n", 373 | " \n", 374 | " \n", 375 | " \n", 376 | " \n", 377 | " \n", 378 | " \n", 379 | " \n", 380 | " \n", 381 | " \n", 382 | " \n", 383 | " \n", 384 | " \n", 385 | " \n", 386 | " \n", 387 | " \n", 388 | " \n", 389 | " \n", 390 | " \n", 391 | " \n", 392 | " \n", 393 | " \n", 394 | " \n", 395 | " \n", 396 | " \n", 397 | " \n", 398 | " \n", 399 | " \n", 400 | " \n", 401 | " \n", 402 | " \n", 403 | " \n", 404 | " \n", 405 | " \n", 406 | " \n", 407 | " \n", 408 | " \n", 409 | " \n", 410 | " \n", 411 | " \n", 412 | " \n", 413 | " \n", 414 | " \n", 415 | " \n", 416 | " \n", 417 | " \n", 418 | " \n", 419 | " \n", 420 | " \n", 421 | " \n", 422 | " \n", 423 | " \n", 424 | " \n", 425 | " \n", 426 | " \n", 427 | " \n", 428 | " \n", 429 | " \n", 430 | " \n", 431 | " \n", 432 | " \n", 433 | " \n", 434 | " \n", 435 | " \n", 436 | " \n", 437 | " \n", 438 | " \n", 439 | " \n", 440 | " \n", 441 | " \n", 442 | "
textlabel
0House Dem Aide: We Didn’t Even See Comey’s Let...1
1Ever get the feeling your life circles the rou...0
2Why the Truth Might Get You Fired October 29, ...1
3Videos 15 Civilians Killed In Single US Airstr...1
4Print \\nAn Iranian woman has been sentenced to...1
5In these trying times, Jackie Mason is the Voi...0
6Ever wonder how Britain’s most iconic pop pian...1
7PARIS — France chose an idealistic, traditi...0
8Donald J. Trump is scheduled to make a highly ...0
9A week before Michael T. Flynn resigned as nat...0
10Organizing for Action, the activist group that...0
11The BBC produced spoof on the “Real Housewives...0
12The mystery surrounding The Third Reich and Na...1
13Clinton Campaign Demands FBI Affirm Trump's Ru...1
14Yes, There Are Paid Government Trolls On Socia...1
\n", 443 | "
" 444 | ], 445 | "text/plain": [ 446 | " text label\n", 447 | "0 House Dem Aide: We Didn’t Even See Comey’s Let... 1\n", 448 | "1 Ever get the feeling your life circles the rou... 0\n", 449 | "2 Why the Truth Might Get You Fired October 29, ... 1\n", 450 | "3 Videos 15 Civilians Killed In Single US Airstr... 1\n", 451 | "4 Print \\nAn Iranian woman has been sentenced to... 1\n", 452 | "5 In these trying times, Jackie Mason is the Voi... 0\n", 453 | "6 Ever wonder how Britain’s most iconic pop pian... 1\n", 454 | "7 PARIS — France chose an idealistic, traditi... 0\n", 455 | "8 Donald J. Trump is scheduled to make a highly ... 0\n", 456 | "9 A week before Michael T. Flynn resigned as nat... 0\n", 457 | "10 Organizing for Action, the activist group that... 0\n", 458 | "11 The BBC produced spoof on the “Real Housewives... 0\n", 459 | "12 The mystery surrounding The Third Reich and Na... 1\n", 460 | "13 Clinton Campaign Demands FBI Affirm Trump's Ru... 1\n", 461 | "14 Yes, There Are Paid Government Trolls On Socia... 1" 462 | ] 463 | }, 464 | "execution_count": 50, 465 | "metadata": {}, 466 | "output_type": "execute_result" 467 | } 468 | ], 469 | "source": [ 470 | "train_df.head(15)" 471 | ] 472 | }, 473 | { 474 | "cell_type": "code", 475 | "execution_count": 51, 476 | "metadata": { 477 | "execution": { 478 | "iopub.execute_input": "2021-05-25T06:50:32.144642Z", 479 | "iopub.status.busy": "2021-05-25T06:50:32.144299Z", 480 | "iopub.status.idle": "2021-05-25T06:50:32.302296Z", 481 | "shell.execute_reply": "2021-05-25T06:50:32.301193Z", 482 | "shell.execute_reply.started": "2021-05-25T06:50:32.144612Z" 483 | } 484 | }, 485 | "outputs": [ 486 | { 487 | "data": { 488 | "text/plain": [ 489 | "" 490 | ] 491 | }, 492 | "execution_count": 51, 493 | "metadata": {}, 494 | "output_type": "execute_result" 495 | }, 496 | { 497 | "data": { 498 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEGCAYAAABPdROvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAQvUlEQVR4nO3df+xddX3H8efLVgF1dXR8YbVltm6NGxCN0jDExMyxhO6XZQZMzRiNI+lkbOqyZYH945Kliya6TZywNYotamQNutEtQUfq1DgJ7IsyodSGRhx0VPr1xxRNRIvv/XE/1Uv7bbl8P/3e26/f5yM5uee8z/nc+z7JN99Xzjn3npOqQpKkuXrWpBuQJC1sBokkqYtBIknqYpBIkroYJJKkLksn3cC4nXHGGbV69epJtyFJC8o999zztaqamm3doguS1atXMz09Pek2JGlBSfI/x1rnqS1JUheDRJLUxSCRJHUxSCRJXQwSSVIXg0SS1MUgkSR1MUgkSV0MEklSl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kSR1MUgkSV0MEklSF4NEktTl/wGXCDuZQEdEHgAAAABJRU5ErkJggg==\n", 499 | "text/plain": [ 500 | "
" 501 | ] 502 | }, 503 | "metadata": { 504 | "needs_background": "light" 505 | }, 506 | "output_type": "display_data" 507 | } 508 | ], 509 | "source": [ 510 | "def create_distribution(dataFile):\n", 511 | " return sb.countplot(x='label', data=dataFile, palette='hls')\n", 512 | "\n", 513 | "# by calling below we can see that training, test and valid data seems to be failry evenly distributed between the classes\n", 514 | "create_distribution(train_df)" 515 | ] 516 | }, 517 | { 518 | "cell_type": "code", 519 | "execution_count": null, 520 | "metadata": { 521 | "execution": { 522 | "iopub.execute_input": "2021-05-25T06:50:32.306146Z", 523 | "iopub.status.busy": "2021-05-25T06:50:32.305826Z", 524 | "iopub.status.idle": "2021-05-25T06:50:32.335357Z", 525 | "shell.execute_reply": "2021-05-25T06:50:32.33417Z", 526 | "shell.execute_reply.started": "2021-05-25T06:50:32.306118Z" 527 | } 528 | }, 529 | "outputs": [], 530 | "source": [ 531 | "def data_qualityCheck():\n", 532 | " print(\"Checking data qualitites...\")\n", 533 | " train_df.isnull().sum()\n", 534 | " train_df.info() \n", 535 | " print(\"check finished.\")\n", 536 | "data_qualityCheck()" 537 | ] 538 | }, 539 | { 540 | "cell_type": "code", 541 | "execution_count": 60, 542 | "metadata": { 543 | "execution": { 544 | "iopub.execute_input": "2021-05-25T06:50:32.337061Z", 545 | "iopub.status.busy": "2021-05-25T06:50:32.336735Z", 546 | "iopub.status.idle": "2021-05-25T06:50:32.367948Z", 547 | "shell.execute_reply": "2021-05-25T06:50:32.366933Z", 548 | "shell.execute_reply.started": "2021-05-25T06:50:32.33703Z" 549 | } 550 | }, 551 | "outputs": [], 552 | "source": [ 553 | "train_df = train_df.dropna()" 554 | ] 555 | }, 556 | { 557 | "cell_type": "code", 558 | "execution_count": 61, 559 | "metadata": { 560 | "execution": { 561 | "iopub.execute_input": "2021-05-25T06:50:32.369967Z", 562 | "iopub.status.busy": "2021-05-25T06:50:32.369528Z", 563 | "iopub.status.idle": "2021-05-25T06:50:32.399296Z", 564 | "shell.execute_reply": "2021-05-25T06:50:32.398264Z", 565 | "shell.execute_reply.started": "2021-05-25T06:50:32.369924Z" 566 | } 567 | }, 568 | "outputs": [ 569 | { 570 | "name": "stdout", 571 | "output_type": "stream", 572 | "text": [ 573 | "Checking data qualitites...\n", 574 | "\n", 575 | "Int64Index: 20761 entries, 0 to 20799\n", 576 | "Data columns (total 2 columns):\n", 577 | " # Column Non-Null Count Dtype \n", 578 | "--- ------ -------------- ----- \n", 579 | " 0 text 20761 non-null object\n", 580 | " 1 label 20761 non-null int64 \n", 581 | "dtypes: int64(1), object(1)\n", 582 | "memory usage: 486.6+ KB\n", 583 | "check finished.\n" 584 | ] 585 | } 586 | ], 587 | "source": [ 588 | "data_qualityCheck()" 589 | ] 590 | }, 591 | { 592 | "cell_type": "code", 593 | "execution_count": 62, 594 | "metadata": { 595 | "execution": { 596 | "iopub.execute_input": "2021-05-25T06:50:32.401314Z", 597 | "iopub.status.busy": "2021-05-25T06:50:32.400868Z", 598 | "iopub.status.idle": "2021-05-25T06:50:32.407806Z", 599 | "shell.execute_reply": "2021-05-25T06:50:32.406589Z", 600 | "shell.execute_reply.started": "2021-05-25T06:50:32.401272Z" 601 | } 602 | }, 603 | "outputs": [ 604 | { 605 | "data": { 606 | "text/plain": [ 607 | "(20761, 2)" 608 | ] 609 | }, 610 | "execution_count": 62, 611 | "metadata": {}, 612 | "output_type": "execute_result" 613 | } 614 | ], 615 | "source": [ 616 | "train_df.shape" 617 | ] 618 | }, 619 | { 620 | "cell_type": "code", 621 | "execution_count": 63, 622 | "metadata": { 623 | "execution": { 624 | "iopub.execute_input": "2021-05-25T06:50:32.409912Z", 625 | "iopub.status.busy": "2021-05-25T06:50:32.409162Z", 626 | "iopub.status.idle": "2021-05-25T06:50:32.426843Z", 627 | "shell.execute_reply": "2021-05-25T06:50:32.425727Z", 628 | "shell.execute_reply.started": "2021-05-25T06:50:32.409868Z" 629 | } 630 | }, 631 | "outputs": [ 632 | { 633 | "data": { 634 | "text/html": [ 635 | "
\n", 636 | "\n", 649 | "\n", 650 | " \n", 651 | " \n", 652 | " \n", 653 | " \n", 654 | " \n", 655 | " \n", 656 | " \n", 657 | " \n", 658 | " \n", 659 | " \n", 660 | " \n", 661 | " \n", 662 | " \n", 663 | " \n", 664 | " \n", 665 | " \n", 666 | " \n", 667 | " \n", 668 | " \n", 669 | " \n", 670 | " \n", 671 | " \n", 672 | " \n", 673 | " \n", 674 | " \n", 675 | " \n", 676 | " \n", 677 | " \n", 678 | " \n", 679 | " \n", 680 | " \n", 681 | " \n", 682 | " \n", 683 | " \n", 684 | " \n", 685 | " \n", 686 | " \n", 687 | " \n", 688 | " \n", 689 | " \n", 690 | " \n", 691 | " \n", 692 | " \n", 693 | " \n", 694 | " \n", 695 | " \n", 696 | " \n", 697 | " \n", 698 | " \n", 699 | " \n", 700 | " \n", 701 | " \n", 702 | " \n", 703 | " \n", 704 | " \n", 705 | " \n", 706 | " \n", 707 | " \n", 708 | " \n", 709 | "
textlabel
0House Dem Aide: We Didn’t Even See Comey’s Let...1
1Ever get the feeling your life circles the rou...0
2Why the Truth Might Get You Fired October 29, ...1
3Videos 15 Civilians Killed In Single US Airstr...1
4Print \\nAn Iranian woman has been sentenced to...1
5In these trying times, Jackie Mason is the Voi...0
6Ever wonder how Britain’s most iconic pop pian...1
7PARIS — France chose an idealistic, traditi...0
8Donald J. Trump is scheduled to make a highly ...0
9A week before Michael T. Flynn resigned as nat...0
\n", 710 | "
" 711 | ], 712 | "text/plain": [ 713 | " text label\n", 714 | "0 House Dem Aide: We Didn’t Even See Comey’s Let... 1\n", 715 | "1 Ever get the feeling your life circles the rou... 0\n", 716 | "2 Why the Truth Might Get You Fired October 29, ... 1\n", 717 | "3 Videos 15 Civilians Killed In Single US Airstr... 1\n", 718 | "4 Print \\nAn Iranian woman has been sentenced to... 1\n", 719 | "5 In these trying times, Jackie Mason is the Voi... 0\n", 720 | "6 Ever wonder how Britain’s most iconic pop pian... 1\n", 721 | "7 PARIS — France chose an idealistic, traditi... 0\n", 722 | "8 Donald J. Trump is scheduled to make a highly ... 0\n", 723 | "9 A week before Michael T. Flynn resigned as nat... 0" 724 | ] 725 | }, 726 | "execution_count": 63, 727 | "metadata": {}, 728 | "output_type": "execute_result" 729 | } 730 | ], 731 | "source": [ 732 | "train_df.head(10)" 733 | ] 734 | }, 735 | { 736 | "cell_type": "code", 737 | "execution_count": 64, 738 | "metadata": { 739 | "execution": { 740 | "iopub.execute_input": "2021-05-25T06:50:32.42892Z", 741 | "iopub.status.busy": "2021-05-25T06:50:32.42853Z", 742 | "iopub.status.idle": "2021-05-25T06:50:32.433555Z", 743 | "shell.execute_reply": "2021-05-25T06:50:32.432625Z", 744 | "shell.execute_reply.started": "2021-05-25T06:50:32.428889Z" 745 | } 746 | }, 747 | "outputs": [], 748 | "source": [ 749 | "train_df.reset_index(drop= True,inplace=True)" 750 | ] 751 | }, 752 | { 753 | "cell_type": "code", 754 | "execution_count": 65, 755 | "metadata": { 756 | "execution": { 757 | "iopub.execute_input": "2021-05-25T06:50:32.435265Z", 758 | "iopub.status.busy": "2021-05-25T06:50:32.434781Z", 759 | "iopub.status.idle": "2021-05-25T06:50:32.454591Z", 760 | "shell.execute_reply": "2021-05-25T06:50:32.453613Z", 761 | "shell.execute_reply.started": "2021-05-25T06:50:32.435224Z" 762 | } 763 | }, 764 | "outputs": [ 765 | { 766 | "data": { 767 | "text/html": [ 768 | "
\n", 769 | "\n", 782 | "\n", 783 | " \n", 784 | " \n", 785 | " \n", 786 | " \n", 787 | " \n", 788 | " \n", 789 | " \n", 790 | " \n", 791 | " \n", 792 | " \n", 793 | " \n", 794 | " \n", 795 | " \n", 796 | " \n", 797 | " \n", 798 | " \n", 799 | " \n", 800 | " \n", 801 | " \n", 802 | " \n", 803 | " \n", 804 | " \n", 805 | " \n", 806 | " \n", 807 | " \n", 808 | " \n", 809 | " \n", 810 | " \n", 811 | " \n", 812 | " \n", 813 | " \n", 814 | " \n", 815 | " \n", 816 | " \n", 817 | " \n", 818 | " \n", 819 | " \n", 820 | " \n", 821 | " \n", 822 | " \n", 823 | " \n", 824 | " \n", 825 | " \n", 826 | " \n", 827 | " \n", 828 | " \n", 829 | " \n", 830 | " \n", 831 | " \n", 832 | " \n", 833 | " \n", 834 | " \n", 835 | " \n", 836 | " \n", 837 | " \n", 838 | " \n", 839 | " \n", 840 | " \n", 841 | " \n", 842 | "
textlabel
0House Dem Aide: We Didn’t Even See Comey’s Let...1
1Ever get the feeling your life circles the rou...0
2Why the Truth Might Get You Fired October 29, ...1
3Videos 15 Civilians Killed In Single US Airstr...1
4Print \\nAn Iranian woman has been sentenced to...1
5In these trying times, Jackie Mason is the Voi...0
6Ever wonder how Britain’s most iconic pop pian...1
7PARIS — France chose an idealistic, traditi...0
8Donald J. Trump is scheduled to make a highly ...0
9A week before Michael T. Flynn resigned as nat...0
\n", 843 | "
" 844 | ], 845 | "text/plain": [ 846 | " text label\n", 847 | "0 House Dem Aide: We Didn’t Even See Comey’s Let... 1\n", 848 | "1 Ever get the feeling your life circles the rou... 0\n", 849 | "2 Why the Truth Might Get You Fired October 29, ... 1\n", 850 | "3 Videos 15 Civilians Killed In Single US Airstr... 1\n", 851 | "4 Print \\nAn Iranian woman has been sentenced to... 1\n", 852 | "5 In these trying times, Jackie Mason is the Voi... 0\n", 853 | "6 Ever wonder how Britain’s most iconic pop pian... 1\n", 854 | "7 PARIS — France chose an idealistic, traditi... 0\n", 855 | "8 Donald J. Trump is scheduled to make a highly ... 0\n", 856 | "9 A week before Michael T. Flynn resigned as nat... 0" 857 | ] 858 | }, 859 | "execution_count": 65, 860 | "metadata": {}, 861 | "output_type": "execute_result" 862 | } 863 | ], 864 | "source": [ 865 | "train_df.head(10)" 866 | ] 867 | }, 868 | { 869 | "cell_type": "code", 870 | "execution_count": 67, 871 | "metadata": { 872 | "execution": { 873 | "iopub.execute_input": "2021-05-25T06:50:32.457112Z", 874 | "iopub.status.busy": "2021-05-25T06:50:32.45653Z", 875 | "iopub.status.idle": "2021-05-25T06:50:32.46346Z", 876 | "shell.execute_reply": "2021-05-25T06:50:32.461467Z", 877 | "shell.execute_reply.started": "2021-05-25T06:50:32.457067Z" 878 | } 879 | }, 880 | "outputs": [], 881 | "source": [ 882 | "label_train = train_df.label" 883 | ] 884 | }, 885 | { 886 | "cell_type": "code", 887 | "execution_count": 68, 888 | "metadata": { 889 | "execution": { 890 | "iopub.execute_input": "2021-05-25T06:50:32.46513Z", 891 | "iopub.status.busy": "2021-05-25T06:50:32.46484Z", 892 | "iopub.status.idle": "2021-05-25T06:50:32.479833Z", 893 | "shell.execute_reply": "2021-05-25T06:50:32.478601Z", 894 | "shell.execute_reply.started": "2021-05-25T06:50:32.465102Z" 895 | } 896 | }, 897 | "outputs": [ 898 | { 899 | "data": { 900 | "text/plain": [ 901 | "0 1\n", 902 | "1 0\n", 903 | "2 1\n", 904 | "3 1\n", 905 | "4 1\n", 906 | "5 0\n", 907 | "6 1\n", 908 | "7 0\n", 909 | "8 0\n", 910 | "9 0\n", 911 | "Name: label, dtype: int64" 912 | ] 913 | }, 914 | "execution_count": 68, 915 | "metadata": {}, 916 | "output_type": "execute_result" 917 | } 918 | ], 919 | "source": [ 920 | "label_train.head(10)" 921 | ] 922 | }, 923 | { 924 | "cell_type": "code", 925 | "execution_count": 69, 926 | "metadata": { 927 | "execution": { 928 | "iopub.execute_input": "2021-05-25T06:50:32.481757Z", 929 | "iopub.status.busy": "2021-05-25T06:50:32.481439Z", 930 | "iopub.status.idle": "2021-05-25T06:50:32.493571Z", 931 | "shell.execute_reply": "2021-05-25T06:50:32.492736Z", 932 | "shell.execute_reply.started": "2021-05-25T06:50:32.481728Z" 933 | } 934 | }, 935 | "outputs": [], 936 | "source": [ 937 | "train_df = train_df.drop(\"label\", axis = 1)" 938 | ] 939 | }, 940 | { 941 | "cell_type": "code", 942 | "execution_count": 70, 943 | "metadata": { 944 | "execution": { 945 | "iopub.execute_input": "2021-05-25T06:50:32.495566Z", 946 | "iopub.status.busy": "2021-05-25T06:50:32.495116Z", 947 | "iopub.status.idle": "2021-05-25T06:50:32.513957Z", 948 | "shell.execute_reply": "2021-05-25T06:50:32.51265Z", 949 | "shell.execute_reply.started": "2021-05-25T06:50:32.495526Z" 950 | } 951 | }, 952 | "outputs": [ 953 | { 954 | "data": { 955 | "text/html": [ 956 | "
\n", 957 | "\n", 970 | "\n", 971 | " \n", 972 | " \n", 973 | " \n", 974 | " \n", 975 | " \n", 976 | " \n", 977 | " \n", 978 | " \n", 979 | " \n", 980 | " \n", 981 | " \n", 982 | " \n", 983 | " \n", 984 | " \n", 985 | " \n", 986 | " \n", 987 | " \n", 988 | " \n", 989 | " \n", 990 | " \n", 991 | " \n", 992 | " \n", 993 | " \n", 994 | " \n", 995 | " \n", 996 | " \n", 997 | " \n", 998 | " \n", 999 | " \n", 1000 | " \n", 1001 | " \n", 1002 | " \n", 1003 | " \n", 1004 | " \n", 1005 | " \n", 1006 | " \n", 1007 | " \n", 1008 | " \n", 1009 | " \n", 1010 | " \n", 1011 | " \n", 1012 | " \n", 1013 | " \n", 1014 | " \n", 1015 | " \n", 1016 | " \n", 1017 | " \n", 1018 | " \n", 1019 | "
text
0House Dem Aide: We Didn’t Even See Comey’s Let...
1Ever get the feeling your life circles the rou...
2Why the Truth Might Get You Fired October 29, ...
3Videos 15 Civilians Killed In Single US Airstr...
4Print \\nAn Iranian woman has been sentenced to...
5In these trying times, Jackie Mason is the Voi...
6Ever wonder how Britain’s most iconic pop pian...
7PARIS — France chose an idealistic, traditi...
8Donald J. Trump is scheduled to make a highly ...
9A week before Michael T. Flynn resigned as nat...
\n", 1020 | "
" 1021 | ], 1022 | "text/plain": [ 1023 | " text\n", 1024 | "0 House Dem Aide: We Didn’t Even See Comey’s Let...\n", 1025 | "1 Ever get the feeling your life circles the rou...\n", 1026 | "2 Why the Truth Might Get You Fired October 29, ...\n", 1027 | "3 Videos 15 Civilians Killed In Single US Airstr...\n", 1028 | "4 Print \\nAn Iranian woman has been sentenced to...\n", 1029 | "5 In these trying times, Jackie Mason is the Voi...\n", 1030 | "6 Ever wonder how Britain’s most iconic pop pian...\n", 1031 | "7 PARIS — France chose an idealistic, traditi...\n", 1032 | "8 Donald J. Trump is scheduled to make a highly ...\n", 1033 | "9 A week before Michael T. Flynn resigned as nat..." 1034 | ] 1035 | }, 1036 | "execution_count": 70, 1037 | "metadata": {}, 1038 | "output_type": "execute_result" 1039 | } 1040 | ], 1041 | "source": [ 1042 | "train_df.head(10)" 1043 | ] 1044 | }, 1045 | { 1046 | "cell_type": "code", 1047 | "execution_count": 59, 1048 | "metadata": {}, 1049 | "outputs": [ 1050 | { 1051 | "data": { 1052 | "text/plain": [ 1053 | "'Comments Actor Steven Seagal has just stood up for America, while the rest of Hollywood remains silent. This week has been rough for our country. First, Democratic nominee Hillary Clinton collapsed at the 9/11 memorial. Then, she called millions of hardworking Americans “deplorable.” As if that weren’t enough, NFL players throughout the country have been blatantly disrespecting the American flag. Needless to say, Seagal had enough. “I think the most important job as Secretary of State is ensuring our people don’t get killed,” Seagal tweeted. “If you can’t do [email protected] “Pneumonia or not, she is going to be disastrous for the American people. #NoToHillary,” he continued. Of course, Seagal quickly became the target of liberal fire for his comments, but he refused to break down. He particularly lost it when one Twitter user tried to argued that Hillary was the most capable for the presidency. “Capable? Capable of leaving AMERICANS to die. Capable of disregarding law. Capable of disrespecting rape survivors,” he argued. He then went on to address race relations in the United States, and the true role President Barack Obama has played in the social evolution of this country. “Obama has been abysmal for race relations in USA. #TRUTH We need to start having honest dialog,” he wrote. Seagal concluded by pointing out the irony of the attacks he was receiving from liberals everywhere. “Best thing in the world…Making one statement about freedom and getting attacked by every Demo out there… #HYPOCRITICAL,” he tweeted. “An America without a democrat in the White House, is a SAFER America.” What do you think of Seagal’s comments? '" 1054 | ] 1055 | }, 1056 | "execution_count": 59, 1057 | "metadata": {}, 1058 | "output_type": "execute_result" 1059 | } 1060 | ], 1061 | "source": [ 1062 | "train_df['text'][2188]" 1063 | ] 1064 | }, 1065 | { 1066 | "cell_type": "code", 1067 | "execution_count": 71, 1068 | "metadata": { 1069 | "execution": { 1070 | "iopub.execute_input": "2021-05-25T06:50:32.51602Z", 1071 | "iopub.status.busy": "2021-05-25T06:50:32.515411Z", 1072 | "iopub.status.idle": "2021-05-25T06:50:32.531829Z", 1073 | "shell.execute_reply": "2021-05-25T06:50:32.530895Z", 1074 | "shell.execute_reply.started": "2021-05-25T06:50:32.515972Z" 1075 | } 1076 | }, 1077 | "outputs": [], 1078 | "source": [ 1079 | "lemmatizer = WordNetLemmatizer()\n", 1080 | "stpwrds = list(stopwords.words('english'))" 1081 | ] 1082 | }, 1083 | { 1084 | "cell_type": "code", 1085 | "execution_count": 73, 1086 | "metadata": {}, 1087 | "outputs": [ 1088 | { 1089 | "data": { 1090 | "text/plain": [ 1091 | "['i',\n", 1092 | " 'me',\n", 1093 | " 'my',\n", 1094 | " 'myself',\n", 1095 | " 'we',\n", 1096 | " 'our',\n", 1097 | " 'ours',\n", 1098 | " 'ourselves',\n", 1099 | " 'you',\n", 1100 | " \"you're\",\n", 1101 | " \"you've\",\n", 1102 | " \"you'll\",\n", 1103 | " \"you'd\",\n", 1104 | " 'your',\n", 1105 | " 'yours',\n", 1106 | " 'yourself',\n", 1107 | " 'yourselves',\n", 1108 | " 'he',\n", 1109 | " 'him',\n", 1110 | " 'his',\n", 1111 | " 'himself',\n", 1112 | " 'she',\n", 1113 | " \"she's\",\n", 1114 | " 'her',\n", 1115 | " 'hers',\n", 1116 | " 'herself',\n", 1117 | " 'it',\n", 1118 | " \"it's\",\n", 1119 | " 'its',\n", 1120 | " 'itself',\n", 1121 | " 'they',\n", 1122 | " 'them',\n", 1123 | " 'their',\n", 1124 | " 'theirs',\n", 1125 | " 'themselves',\n", 1126 | " 'what',\n", 1127 | " 'which',\n", 1128 | " 'who',\n", 1129 | " 'whom',\n", 1130 | " 'this',\n", 1131 | " 'that',\n", 1132 | " \"that'll\",\n", 1133 | " 'these',\n", 1134 | " 'those',\n", 1135 | " 'am',\n", 1136 | " 'is',\n", 1137 | " 'are',\n", 1138 | " 'was',\n", 1139 | " 'were',\n", 1140 | " 'be',\n", 1141 | " 'been',\n", 1142 | " 'being',\n", 1143 | " 'have',\n", 1144 | " 'has',\n", 1145 | " 'had',\n", 1146 | " 'having',\n", 1147 | " 'do',\n", 1148 | " 'does',\n", 1149 | " 'did',\n", 1150 | " 'doing',\n", 1151 | " 'a',\n", 1152 | " 'an',\n", 1153 | " 'the',\n", 1154 | " 'and',\n", 1155 | " 'but',\n", 1156 | " 'if',\n", 1157 | " 'or',\n", 1158 | " 'because',\n", 1159 | " 'as',\n", 1160 | " 'until',\n", 1161 | " 'while',\n", 1162 | " 'of',\n", 1163 | " 'at',\n", 1164 | " 'by',\n", 1165 | " 'for',\n", 1166 | " 'with',\n", 1167 | " 'about',\n", 1168 | " 'against',\n", 1169 | " 'between',\n", 1170 | " 'into',\n", 1171 | " 'through',\n", 1172 | " 'during',\n", 1173 | " 'before',\n", 1174 | " 'after',\n", 1175 | " 'above',\n", 1176 | " 'below',\n", 1177 | " 'to',\n", 1178 | " 'from',\n", 1179 | " 'up',\n", 1180 | " 'down',\n", 1181 | " 'in',\n", 1182 | " 'out',\n", 1183 | " 'on',\n", 1184 | " 'off',\n", 1185 | " 'over',\n", 1186 | " 'under',\n", 1187 | " 'again',\n", 1188 | " 'further',\n", 1189 | " 'then',\n", 1190 | " 'once',\n", 1191 | " 'here',\n", 1192 | " 'there',\n", 1193 | " 'when',\n", 1194 | " 'where',\n", 1195 | " 'why',\n", 1196 | " 'how',\n", 1197 | " 'all',\n", 1198 | " 'any',\n", 1199 | " 'both',\n", 1200 | " 'each',\n", 1201 | " 'few',\n", 1202 | " 'more',\n", 1203 | " 'most',\n", 1204 | " 'other',\n", 1205 | " 'some',\n", 1206 | " 'such',\n", 1207 | " 'no',\n", 1208 | " 'nor',\n", 1209 | " 'not',\n", 1210 | " 'only',\n", 1211 | " 'own',\n", 1212 | " 'same',\n", 1213 | " 'so',\n", 1214 | " 'than',\n", 1215 | " 'too',\n", 1216 | " 'very',\n", 1217 | " 's',\n", 1218 | " 't',\n", 1219 | " 'can',\n", 1220 | " 'will',\n", 1221 | " 'just',\n", 1222 | " 'don',\n", 1223 | " \"don't\",\n", 1224 | " 'should',\n", 1225 | " \"should've\",\n", 1226 | " 'now',\n", 1227 | " 'd',\n", 1228 | " 'll',\n", 1229 | " 'm',\n", 1230 | " 'o',\n", 1231 | " 're',\n", 1232 | " 've',\n", 1233 | " 'y',\n", 1234 | " 'ain',\n", 1235 | " 'aren',\n", 1236 | " \"aren't\",\n", 1237 | " 'couldn',\n", 1238 | " \"couldn't\",\n", 1239 | " 'didn',\n", 1240 | " \"didn't\",\n", 1241 | " 'doesn',\n", 1242 | " \"doesn't\",\n", 1243 | " 'hadn',\n", 1244 | " \"hadn't\",\n", 1245 | " 'hasn',\n", 1246 | " \"hasn't\",\n", 1247 | " 'haven',\n", 1248 | " \"haven't\",\n", 1249 | " 'isn',\n", 1250 | " \"isn't\",\n", 1251 | " 'ma',\n", 1252 | " 'mightn',\n", 1253 | " \"mightn't\",\n", 1254 | " 'mustn',\n", 1255 | " \"mustn't\",\n", 1256 | " 'needn',\n", 1257 | " \"needn't\",\n", 1258 | " 'shan',\n", 1259 | " \"shan't\",\n", 1260 | " 'shouldn',\n", 1261 | " \"shouldn't\",\n", 1262 | " 'wasn',\n", 1263 | " \"wasn't\",\n", 1264 | " 'weren',\n", 1265 | " \"weren't\",\n", 1266 | " 'won',\n", 1267 | " \"won't\",\n", 1268 | " 'wouldn',\n", 1269 | " \"wouldn't\"]" 1270 | ] 1271 | }, 1272 | "execution_count": 73, 1273 | "metadata": {}, 1274 | "output_type": "execute_result" 1275 | } 1276 | ], 1277 | "source": [ 1278 | "stpwrds" 1279 | ] 1280 | }, 1281 | { 1282 | "cell_type": "code", 1283 | "execution_count": 75, 1284 | "metadata": { 1285 | "execution": { 1286 | "iopub.execute_input": "2021-05-25T06:50:32.54905Z", 1287 | "iopub.status.busy": "2021-05-25T06:50:32.548517Z", 1288 | "iopub.status.idle": "2021-05-25T06:53:51.648153Z", 1289 | "shell.execute_reply": "2021-05-25T06:53:51.647283Z", 1290 | "shell.execute_reply.started": "2021-05-25T06:50:32.549015Z" 1291 | } 1292 | }, 1293 | "outputs": [], 1294 | "source": [ 1295 | "for x in range(len(train_df)) :\n", 1296 | " corpus = []\n", 1297 | " review = train_df['text'][x]\n", 1298 | " review = re.sub(r'[^a-zA-Z\\s]', '', review)\n", 1299 | " review = review.lower()\n", 1300 | " review = nltk.word_tokenize(review)\n", 1301 | " for y in review :\n", 1302 | " if y not in stpwrds :\n", 1303 | " corpus.append(lemmatizer.lemmatize(y))\n", 1304 | " review = ' '.join(corpus)\n", 1305 | " train_df['text'][x] = review " 1306 | ] 1307 | }, 1308 | { 1309 | "cell_type": "code", 1310 | "execution_count": 79, 1311 | "metadata": { 1312 | "execution": { 1313 | "iopub.execute_input": "2021-05-25T07:14:51.798724Z", 1314 | "iopub.status.busy": "2021-05-25T07:14:51.798361Z", 1315 | "iopub.status.idle": "2021-05-25T07:14:51.805617Z", 1316 | "shell.execute_reply": "2021-05-25T07:14:51.804946Z", 1317 | "shell.execute_reply.started": "2021-05-25T07:14:51.798694Z" 1318 | }, 1319 | "scrolled": true 1320 | }, 1321 | "outputs": [ 1322 | { 1323 | "data": { 1324 | "text/plain": [ 1325 | "'comment actor steven seagal stood america rest hollywood remains silent week rough country first democratic nominee hillary clinton collapsed memorial called million hardworking american deplorable werent enough nfl player throughout country blatantly disrespecting american flag needle say seagal enough think important job secretary state ensuring people dont get killed seagal tweeted cant email protected pneumonia going disastrous american people notohillary continued course seagal quickly became target liberal fire comment refused break particularly lost one twitter user tried argued hillary capable presidency capable capable leaving american die capable disregarding law capable disrespecting rape survivor argued went address race relation united state true role president barack obama played social evolution country obama abysmal race relation usa truth need start honest dialog wrote seagal concluded pointing irony attack receiving liberal everywhere best thing worldmaking one statement freedom getting attacked every demo hypocritical tweeted america without democrat white house safer america think seagals comment'" 1326 | ] 1327 | }, 1328 | "execution_count": 79, 1329 | "metadata": {}, 1330 | "output_type": "execute_result" 1331 | } 1332 | ], 1333 | "source": [ 1334 | "train_df['text'][2182]" 1335 | ] 1336 | }, 1337 | { 1338 | "cell_type": "code", 1339 | "execution_count": 80, 1340 | "metadata": { 1341 | "execution": { 1342 | "iopub.execute_input": "2021-05-25T07:16:37.152728Z", 1343 | "iopub.status.busy": "2021-05-25T07:16:37.152216Z", 1344 | "iopub.status.idle": "2021-05-25T07:16:37.163059Z", 1345 | "shell.execute_reply": "2021-05-25T07:16:37.161884Z", 1346 | "shell.execute_reply.started": "2021-05-25T07:16:37.152696Z" 1347 | } 1348 | }, 1349 | "outputs": [], 1350 | "source": [ 1351 | "X_train, X_test, Y_train, Y_test = train_test_split(train_df['text'], label_train, test_size=0.3, random_state=1)" 1352 | ] 1353 | }, 1354 | { 1355 | "cell_type": "code", 1356 | "execution_count": 81, 1357 | "metadata": { 1358 | "scrolled": true 1359 | }, 1360 | "outputs": [ 1361 | { 1362 | "data": { 1363 | "text/plain": [ 1364 | "10140 comment fox news star megyn kelly finally reve...\n", 1365 | "11508 written daniel mcadams told attack iraq saddam...\n", 1366 | "4035 u representative california introduced bill bl...\n", 1367 | "4528 paris salah abdeslam thought direct participan...\n", 1368 | "2608 photo jorge lascar photo great wall china vasi...\n", 1369 | " ... \n", 1370 | "10955 daily caller progress unity found progress uni...\n", 1371 | "17289 archie elam third career transition living sta...\n", 1372 | "5192 philadelphia sometimes exhibition planned year...\n", 1373 | "12172 here something interesting unz review recipien...\n", 1374 | "235 changing montenegrin leader change ideology so...\n", 1375 | "Name: text, Length: 14532, dtype: object" 1376 | ] 1377 | }, 1378 | "execution_count": 81, 1379 | "metadata": {}, 1380 | "output_type": "execute_result" 1381 | } 1382 | ], 1383 | "source": [ 1384 | "X_train" 1385 | ] 1386 | }, 1387 | { 1388 | "cell_type": "code", 1389 | "execution_count": 83, 1390 | "metadata": { 1391 | "execution": { 1392 | "iopub.execute_input": "2021-05-25T07:17:50.592597Z", 1393 | "iopub.status.busy": "2021-05-25T07:17:50.592095Z", 1394 | "iopub.status.idle": "2021-05-25T07:17:50.598862Z", 1395 | "shell.execute_reply": "2021-05-25T07:17:50.597641Z", 1396 | "shell.execute_reply.started": "2021-05-25T07:17:50.592566Z" 1397 | } 1398 | }, 1399 | "outputs": [ 1400 | { 1401 | "data": { 1402 | "text/plain": [ 1403 | "(14532,)" 1404 | ] 1405 | }, 1406 | "execution_count": 83, 1407 | "metadata": {}, 1408 | "output_type": "execute_result" 1409 | } 1410 | ], 1411 | "source": [ 1412 | "X_train.shape" 1413 | ] 1414 | }, 1415 | { 1416 | "cell_type": "code", 1417 | "execution_count": 86, 1418 | "metadata": { 1419 | "execution": { 1420 | "iopub.execute_input": "2021-05-25T07:18:05.89317Z", 1421 | "iopub.status.busy": "2021-05-25T07:18:05.892651Z", 1422 | "iopub.status.idle": "2021-05-25T07:18:05.902743Z", 1423 | "shell.execute_reply": "2021-05-25T07:18:05.901523Z", 1424 | "shell.execute_reply.started": "2021-05-25T07:18:05.893127Z" 1425 | } 1426 | }, 1427 | "outputs": [ 1428 | { 1429 | "data": { 1430 | "text/plain": [ 1431 | "10140 1\n", 1432 | "11508 1\n", 1433 | "4035 0\n", 1434 | "4528 0\n", 1435 | "2608 1\n", 1436 | " ..\n", 1437 | "10955 1\n", 1438 | "17289 0\n", 1439 | "5192 0\n", 1440 | "12172 1\n", 1441 | "235 1\n", 1442 | "Name: label, Length: 14532, dtype: int64" 1443 | ] 1444 | }, 1445 | "execution_count": 86, 1446 | "metadata": {}, 1447 | "output_type": "execute_result" 1448 | } 1449 | ], 1450 | "source": [ 1451 | "Y_train" 1452 | ] 1453 | }, 1454 | { 1455 | "cell_type": "code", 1456 | "execution_count": 87, 1457 | "metadata": { 1458 | "execution": { 1459 | "iopub.execute_input": "2021-05-25T07:18:10.901469Z", 1460 | "iopub.status.busy": "2021-05-25T07:18:10.901136Z", 1461 | "iopub.status.idle": "2021-05-25T07:18:22.003384Z", 1462 | "shell.execute_reply": "2021-05-25T07:18:22.002314Z", 1463 | "shell.execute_reply.started": "2021-05-25T07:18:10.90144Z" 1464 | } 1465 | }, 1466 | "outputs": [], 1467 | "source": [ 1468 | "tfidf_v = TfidfVectorizer()\n", 1469 | "tfidf_X_train = tfidf_v.fit_transform(X_train)\n", 1470 | "tfidf_X_test = tfidf_v.transform(X_test)" 1471 | ] 1472 | }, 1473 | { 1474 | "cell_type": "code", 1475 | "execution_count": 88, 1476 | "metadata": { 1477 | "execution": { 1478 | "iopub.execute_input": "2021-05-25T07:18:24.321674Z", 1479 | "iopub.status.busy": "2021-05-25T07:18:24.321329Z", 1480 | "iopub.status.idle": "2021-05-25T07:18:24.327063Z", 1481 | "shell.execute_reply": "2021-05-25T07:18:24.325975Z", 1482 | "shell.execute_reply.started": "2021-05-25T07:18:24.321644Z" 1483 | } 1484 | }, 1485 | "outputs": [ 1486 | { 1487 | "data": { 1488 | "text/plain": [ 1489 | "(14532, 137427)" 1490 | ] 1491 | }, 1492 | "execution_count": 88, 1493 | "metadata": {}, 1494 | "output_type": "execute_result" 1495 | } 1496 | ], 1497 | "source": [ 1498 | "tfidf_X_train.shape" 1499 | ] 1500 | }, 1501 | { 1502 | "cell_type": "code", 1503 | "execution_count": 89, 1504 | "metadata": { 1505 | "execution": { 1506 | "iopub.execute_input": "2021-05-25T07:18:31.418929Z", 1507 | "iopub.status.busy": "2021-05-25T07:18:31.418573Z", 1508 | "iopub.status.idle": "2021-05-25T07:18:31.427535Z", 1509 | "shell.execute_reply": "2021-05-25T07:18:31.426865Z", 1510 | "shell.execute_reply.started": "2021-05-25T07:18:31.418889Z" 1511 | } 1512 | }, 1513 | "outputs": [], 1514 | "source": [ 1515 | "def plot_confusion_matrix(cm, classes,\n", 1516 | " normalize=False,\n", 1517 | " title='Confusion matrix',\n", 1518 | " cmap=plt.cm.Blues):\n", 1519 | " \n", 1520 | " plt.imshow(cm, interpolation='nearest', cmap=cmap)\n", 1521 | " plt.title(title)\n", 1522 | " plt.colorbar()\n", 1523 | " tick_marks = np.arange(len(classes))\n", 1524 | " plt.xticks(tick_marks, classes, rotation=45)\n", 1525 | " plt.yticks(tick_marks, classes)\n", 1526 | "\n", 1527 | " if normalize:\n", 1528 | " cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n", 1529 | " print(\"Normalized confusion matrix\")\n", 1530 | " else:\n", 1531 | " print('Confusion matrix, without normalization')\n", 1532 | "\n", 1533 | " thresh = cm.max() / 2.\n", 1534 | " for i, j in itertools.product(range(cm.shape[0]), range(cm.shape[1])):\n", 1535 | " plt.text(j, i, cm[i, j],\n", 1536 | " horizontalalignment=\"center\",\n", 1537 | " color=\"white\" if cm[i, j] > thresh else \"black\")\n", 1538 | "\n", 1539 | " plt.tight_layout()\n", 1540 | " plt.ylabel('True label')\n", 1541 | " plt.xlabel('Predicted label')" 1542 | ] 1543 | }, 1544 | { 1545 | "cell_type": "code", 1546 | "execution_count": 90, 1547 | "metadata": { 1548 | "execution": { 1549 | "iopub.execute_input": "2021-05-25T07:18:36.942583Z", 1550 | "iopub.status.busy": "2021-05-25T07:18:36.942Z", 1551 | "iopub.status.idle": "2021-05-25T07:18:37.23373Z", 1552 | "shell.execute_reply": "2021-05-25T07:18:37.233Z", 1553 | "shell.execute_reply.started": "2021-05-25T07:18:36.942549Z" 1554 | } 1555 | }, 1556 | "outputs": [ 1557 | { 1558 | "data": { 1559 | "text/plain": [ 1560 | "PassiveAggressiveClassifier()" 1561 | ] 1562 | }, 1563 | "execution_count": 90, 1564 | "metadata": {}, 1565 | "output_type": "execute_result" 1566 | } 1567 | ], 1568 | "source": [ 1569 | "classifier = PassiveAggressiveClassifier()\n", 1570 | "classifier.fit(tfidf_X_train,Y_train)" 1571 | ] 1572 | }, 1573 | { 1574 | "cell_type": "code", 1575 | "execution_count": 91, 1576 | "metadata": { 1577 | "execution": { 1578 | "iopub.execute_input": "2021-05-25T07:18:41.422338Z", 1579 | "iopub.status.busy": "2021-05-25T07:18:41.421887Z", 1580 | "iopub.status.idle": "2021-05-25T07:18:41.673492Z", 1581 | "shell.execute_reply": "2021-05-25T07:18:41.672498Z", 1582 | "shell.execute_reply.started": "2021-05-25T07:18:41.422308Z" 1583 | } 1584 | }, 1585 | "outputs": [ 1586 | { 1587 | "name": "stdout", 1588 | "output_type": "stream", 1589 | "text": [ 1590 | "Accuracy: 95.54%\n", 1591 | "Confusion matrix, without normalization\n" 1592 | ] 1593 | }, 1594 | { 1595 | "data": { 1596 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAEmCAYAAADBbUO1AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAsfElEQVR4nO3debxVVd3H8c/3gkziRIApgyOOqOCcI2YpmqZWGkiOOKZpphZaDpn21JOPluaQpjmDJA44oqmk4AiIgoiAokmgAqUioDL8nj/2uni43uEA955z973fd6/9uuesvfbe61zyd9f57bXXUkRgZmalUVHuBpiZNScOumZmJeSga2ZWQg66ZmYl5KBrZlZCDrpmZiXkoGsNTlJbSQ9K+ljS31fhPAMkPV6fbSsXSXtKerPc7bDSk8fpWiVJRwI/A7YA5gHjgcsiYtQqnvco4CfAbhGxeFXb2dhJCqBHREwrd1us8XFP1wCQ9DPgj8BvgXWB7sC1wCH1cPoNgCnNIeAWQ1LLcrfByigivDXzDVgL+BQ4vJY6rcmC8sy0/RFonfb1AWYAZwMfArOA49K+XwNfAIvSNQYCFwN3FJx7QyCAlun9scDbZL3t6cCAgvJRBcftBrwMfJx+7lawbyTwG2B0Os/jQMcaPltl+39e0P5DgQOBKcB/gPML6u8MPA98lOr+GWiV9j2TPsv89Hl/WHD+XwDvA7dXlqVjNknX2D69Xx+YA/Qp9/83vNX/5p6uAXw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bVuZrgbWAHmRLCQ2OiCXATElPVXP+XYFnKs8VEf+poR3fArYqWHdzTUlrpGt8Lx37sKT/FvGZzpB0WHrdLbV1LrCUbB5jyBYBvVdS+/R5/15w7dZFXMOaKQddW1ULI6JXYUEKPvMLi4CfVC4hVFDvQKCu59BVRB3IUmXfiIiF1bSl6GfdJfUhC+DfiIgFkkYCbWqoHum6H1X9HZjVxDldK4URwKmSVgOQtJmk1ckmYe+Xcr7rkVZfqOJ5YG9JG6VjO6TyecAaBfUeJ/uqT6rXK718BhiQyg4gm2C8NmsB/00BdwuynnalCrJFPwGOJEtbfAJMl3R4uoYkbVfHNawZc9C1UvgrWb52nKSJwF/IvmXdB0wFJgDXkc1Fu5yImE2Wh71X0qt8+fX+QeCwyhtpwBnAjulG3SS+HEXxa2AvSePI0hz/qqOtjwEtJb1GtuLyCwX75gNbSxpLlrO9JJUPAAam9r1OthKzWbU8y5iZWQm5p2tmVkIOumZmJeSga2ZWQg66ZmYl5KBrZlZCDrpmZiXkoGtmVkL/D9wGabVHhEcyAAAAAElFTkSuQmCC\n", 1597 | "text/plain": [ 1598 | "
" 1599 | ] 1600 | }, 1601 | "metadata": { 1602 | "needs_background": "light" 1603 | }, 1604 | "output_type": "display_data" 1605 | } 1606 | ], 1607 | "source": [ 1608 | "Y_pred = classifier.predict(tfidf_X_test)\n", 1609 | "score = metrics.accuracy_score(Y_test, Y_pred)\n", 1610 | "print(f'Accuracy: {round(score*100,2)}%')\n", 1611 | "cm = metrics.confusion_matrix(Y_test, Y_pred)\n", 1612 | "plot_confusion_matrix(cm, classes=['FAKE Data', 'REAL Data'])" 1613 | ] 1614 | }, 1615 | { 1616 | "cell_type": "code", 1617 | "execution_count": 92, 1618 | "metadata": { 1619 | "execution": { 1620 | "iopub.execute_input": "2021-05-25T07:47:25.718988Z", 1621 | "iopub.status.busy": "2021-05-25T07:47:25.718614Z", 1622 | "iopub.status.idle": "2021-05-25T07:47:25.723756Z", 1623 | "shell.execute_reply": "2021-05-25T07:47:25.722952Z", 1624 | "shell.execute_reply.started": "2021-05-25T07:47:25.718959Z" 1625 | } 1626 | }, 1627 | "outputs": [], 1628 | "source": [ 1629 | "pickle.dump(classifier,open('./model.pkl', 'wb'))" 1630 | ] 1631 | }, 1632 | { 1633 | "cell_type": "code", 1634 | "execution_count": 93, 1635 | "metadata": { 1636 | "execution": { 1637 | "iopub.execute_input": "2021-05-25T07:47:30.821844Z", 1638 | "iopub.status.busy": "2021-05-25T07:47:30.821333Z", 1639 | "iopub.status.idle": "2021-05-25T07:47:30.825935Z", 1640 | "shell.execute_reply": "2021-05-25T07:47:30.824983Z", 1641 | "shell.execute_reply.started": "2021-05-25T07:47:30.821811Z" 1642 | } 1643 | }, 1644 | "outputs": [], 1645 | "source": [ 1646 | "# load the model from disk\n", 1647 | "loaded_model = pickle.load(open('./model.pkl', 'rb'))" 1648 | ] 1649 | }, 1650 | { 1651 | "cell_type": "code", 1652 | "execution_count": 94, 1653 | "metadata": { 1654 | "execution": { 1655 | "iopub.execute_input": "2021-05-25T08:03:34.889218Z", 1656 | "iopub.status.busy": "2021-05-25T08:03:34.888860Z", 1657 | "iopub.status.idle": "2021-05-25T08:03:34.895792Z", 1658 | "shell.execute_reply": "2021-05-25T08:03:34.894703Z", 1659 | "shell.execute_reply.started": "2021-05-25T08:03:34.889189Z" 1660 | } 1661 | }, 1662 | "outputs": [], 1663 | "source": [ 1664 | "def fake_news_det(news):\n", 1665 | " review = news\n", 1666 | " review = re.sub(r'[^a-zA-Z\\s]', '', review)\n", 1667 | " review = review.lower()\n", 1668 | " review = nltk.word_tokenize(review)\n", 1669 | " for y in review :\n", 1670 | " if y not in stpwrds :\n", 1671 | " corpus.append(lemmatizer.lemmatize(y)) \n", 1672 | " input_data = [' '.join(corpus)]\n", 1673 | " vectorized_input_data = tfidf_v.transform(input_data)\n", 1674 | " prediction = loaded_model.predict(vectorized_input_data)\n", 1675 | " if prediction[0] == 0:\n", 1676 | " print(\"Prediction of the News : Looking Fake⚠ News📰 \")\n", 1677 | " else:\n", 1678 | " print(\"Prediction of the News : Looking Real News📰 \")" 1679 | ] 1680 | }, 1681 | { 1682 | "cell_type": "code", 1683 | "execution_count": null, 1684 | "metadata": {}, 1685 | "outputs": [], 1686 | "source": [] 1687 | } 1688 | ], 1689 | "metadata": { 1690 | "kernelspec": { 1691 | "display_name": "Python 3", 1692 | "language": "python", 1693 | "name": "python3" 1694 | }, 1695 | "language_info": { 1696 | "codemirror_mode": { 1697 | "name": "ipython", 1698 | "version": 3 1699 | }, 1700 | "file_extension": ".py", 1701 | "mimetype": "text/x-python", 1702 | "name": "python", 1703 | "nbconvert_exporter": "python", 1704 | "pygments_lexer": "ipython3", 1705 | "version": "3.8.5" 1706 | } 1707 | }, 1708 | "nbformat": 4, 1709 | "nbformat_minor": 4 1710 | } -------------------------------------------------------------------------------- /final_model.sav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nishitpatel01/Fake_News_Detection/880a2782ab627c10e4f9cf98c3d753d48439a9d1/final_model.sav -------------------------------------------------------------------------------- /font.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Oswald"; font-style:normal; font-weight:400; src:local("Oswald Regular"),local("Oswald-Regular"),url("..static/fonts/Oswald-Regular-400.woff") format("woff")} 2 | @font-face{font-family:"Varela"; font-style:normal; font-weight:400; src:local("Varela"),url("..static/fonts/Varela-400.woff") format("woff")} 3 | @font-face{font-family:"Open Sans"; font-style:normal; font-weight:400; src:local("Open Sans"),local("OpenSans"),url("..static/fonts/OpenSans-400.woff") format("woff")} -------------------------------------------------------------------------------- /front.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template, request 2 | import pandas as pd 3 | import sklearn 4 | import itertools 5 | import numpy as np 6 | import seaborn as sb 7 | import re 8 | import nltk 9 | import pickle 10 | from sklearn.feature_extraction.text import TfidfVectorizer 11 | from matplotlib import pyplot as plt 12 | from sklearn.linear_model import PassiveAggressiveClassifier 13 | from nltk.stem import WordNetLemmatizer 14 | from nltk.corpus import stopwords 15 | 16 | app = Flask(__name__,template_folder='./templates',static_folder='./static') 17 | 18 | loaded_model = pickle.load(open('model.pkl', 'rb')) 19 | lemmatizer = WordNetLemmatizer() 20 | stpwrds = set(stopwords.words('english')) 21 | tfidf_v = TfidfVectorizer() 22 | corpus = [] 23 | 24 | def fake_news_det(news): 25 | review = news 26 | review = re.sub(r'[^a-zA-Z\s]', '', review) 27 | review = review.lower() 28 | review = nltk.word_tokenize(review) 29 | for y in review : 30 | if y not in stpwrds : 31 | corpus.append(lemmatizer.lemmatize(y)) 32 | input_data = [' '.join(corpus)] 33 | vectorized_input_data = tfidf_v.transform(input_data) 34 | prediction = loaded_model.predict(vectorized_input_data) 35 | if prediction[0] == 0: 36 | print("Prediction of the News : Looking Fake⚠ News📰 ") 37 | else: 38 | print("Prediction of the News : Looking Real News📰 ") 39 | 40 | @app.route('/') 41 | def home(): 42 | return render_template('index.html') 43 | 44 | 45 | 46 | @app.route('/predict', methods=['POST']) 47 | def predict(): 48 | if request.method == 'POST': 49 | message = request.form['news'] 50 | pred = fake_news_det(message) 51 | print(pred) 52 | return render_template('index.html', prediction=pred) 53 | else: 54 | return render_template('index.html', prediction="Something went wrong") 55 | 56 | 57 | 58 | if __name__ == '__main__': 59 | app.run(debug=True) -------------------------------------------------------------------------------- /images/LR_LCurve.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nishitpatel01/Fake_News_Detection/880a2782ab627c10e4f9cf98c3d753d48439a9d1/images/LR_LCurve.PNG -------------------------------------------------------------------------------- /images/ProcessFlow.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nishitpatel01/Fake_News_Detection/880a2782ab627c10e4f9cf98c3d753d48439a9d1/images/ProcessFlow.PNG -------------------------------------------------------------------------------- /images/RF_LCurve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nishitpatel01/Fake_News_Detection/880a2782ab627c10e4f9cf98c3d753d48439a9d1/images/RF_LCurve.png -------------------------------------------------------------------------------- /index: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Fake News Detector 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 |
27 |
 
28 |
29 | 30 | 31 | 32 |
33 | 78 | 92 | 93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |

Paste Your News Text Here:

101 |
102 | 103 | 104 | 105 |

106 | 111 | 112 | 122 |
123 |
124 | 125 | 126 |

127 | 133 | 134 |
135 |
136 | 137 |
138 |
139 | 140 | 179 |
180 |
181 | 182 |
183 |
184 |
185 |
186 |
187 |

Real News

188 |
189 |
    190 |
  • 191 |
    192 |
    India Plans $6.8 Billion Program to Boost Health Infrastructure
    193 |

    India is considering offering as much as 500 billion rupees ($6.8 billion) of credit incentives to boost health care infrastructure in the nation hit by the coronavirus pandemic, according to people familiar with the matter.

    194 |
    195 |
  • 196 |
197 |
198 |
199 | 221 |
222 |
223 |
224 |
225 | 226 |
227 |
228 | 229 | 230 | 231 | 232 | 233 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | -------------------------------------------------------------------------------- /li-scroller.css: -------------------------------------------------------------------------------- 1 | /* liScroll styles */ 2 | 3 | .tickercontainer{width:100%; height:30px; margin:0; padding:0; overflow:hidden; padding-top:2px} 4 | .tickercontainer .mask{left:10px; overflow:hidden; position:relative; top:0; width:100%; height:20px; overflow:hidden; margin-top:4px} 5 | ul.newsticker{position:relative; left:750px; font:bold 10px Verdana; list-style-type:none; margin:0; padding:0} 6 | ul.newsticker li{float:left; margin:0; padding:0} 7 | ul.newsticker a{white-space:nowrap; padding:0; color:#fff; margin:0 50px 0 0} 8 | ul.newsticker a:hover{text-decoration:underline} 9 | ul.newsticker span{margin:0 10px 0 0} 10 | ul.newsticker a > img{height:20px; margin-right:5px; width:25px} -------------------------------------------------------------------------------- /liar_dataset/README: -------------------------------------------------------------------------------- 1 | LIAR: A BENCHMARK DATASET FOR FAKE NEWS DETECTION 2 | 3 | William Yang Wang, "Liar, Liar Pants on Fire": A New Benchmark Dataset for Fake News Detection, to appear in Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (ACL 2017), short paper, Vancouver, BC, Canada, July 30-August 4, ACL. 4 | ===================================================================== 5 | Description of the TSV format: 6 | 7 | Column 1: the ID of the statement ([ID].json). 8 | Column 2: the label. 9 | Column 3: the statement. 10 | Column 4: the subject(s). 11 | Column 5: the speaker. 12 | Column 6: the speaker's job title. 13 | Column 7: the state info. 14 | Column 8: the party affiliation. 15 | Column 9-13: the total credit history count, including the current statement. 16 | 9: barely true counts. 17 | 10: false counts. 18 | 11: half true counts. 19 | 12: mostly true counts. 20 | 13: pants on fire counts. 21 | Column 14: the context (venue / location of the speech or statement). 22 | 23 | Note that we do not provide the full-text verdict report in this current version of the dataset, 24 | but you can use the following command to access the full verdict report and links to the source documents: 25 | wget http://www.politifact.com//api/v/2/statement/[ID]/?format=json 26 | 27 | ====================================================================== 28 | The original sources retain the copyright of the data. 29 | 30 | Note that there are absolutely no guarantees with this data, 31 | and we provide this dataset "as is", 32 | but you are welcome to report the issues of the preliminary version 33 | of this data. 34 | 35 | You are allowed to use this dataset for research purposes only. 36 | 37 | For more question about the dataset, please contact: 38 | William Wang, william@cs.ucsb.edu 39 | 40 | v1.0 04/23/2017 41 | 42 | -------------------------------------------------------------------------------- /model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nishitpatel01/Fake_News_Detection/880a2782ab627c10e4f9cf98c3d753d48439a9d1/model.pkl -------------------------------------------------------------------------------- /my_model: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template, request 2 | import pandas as pd 3 | import sklearn 4 | import itertools 5 | import numpy as np 6 | import seaborn as sb 7 | import re 8 | import nltk 9 | import pickle 10 | from sklearn.feature_extraction.text import TfidfVectorizer 11 | from matplotlib import pyplot as plt 12 | from sklearn.linear_model import PassiveAggressiveClassifier 13 | from nltk.stem import WordNetLemmatizer 14 | from nltk.corpus import stopwords 15 | 16 | app = Flask(__name__,template_folder='./templates',static_folder='./static') 17 | 18 | loaded_model = pickle.load(open('model.pkl', 'rb')) 19 | lemmatizer = WordNetLemmatizer() 20 | stpwrds = set(stopwords.words('english')) 21 | tfidf_v = TfidfVectorizer() 22 | corpus = [] 23 | 24 | def fake_news_det(news): 25 | review = news 26 | review = re.sub(r'[^a-zA-Z\s]', '', review) 27 | review = review.lower() 28 | review = nltk.word_tokenize(review) 29 | for y in review : 30 | if y not in stpwrds : 31 | corpus.append(lemmatizer.lemmatize(y)) 32 | input_data = [' '.join(corpus)] 33 | vectorized_input_data = tfidf_v.transform(input_data) 34 | prediction = loaded_model.predict(vectorized_input_data) 35 | if prediction[0] == 0: 36 | print("Prediction of the News : Looking Fake⚠ News📰 ") 37 | else: 38 | print("Prediction of the News : Looking Real News📰 ") 39 | 40 | @app.route('/') 41 | def home(): 42 | return render_template('index.html') 43 | 44 | 45 | 46 | @app.route('/predict', methods=['POST']) 47 | def predict(): 48 | if request.method == 'POST': 49 | message = request.form['news'] 50 | pred = fake_news_det(message) 51 | print(pred) 52 | return render_template('index.html', prediction=pred) 53 | else: 54 | return render_template('index.html', prediction="Something went wrong") 55 | 56 | 57 | 58 | if __name__ == '__main__': 59 | app.run(debug=True) 60 | -------------------------------------------------------------------------------- /prediction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Mon Dec 4 17:45:40 2017 4 | 5 | @author: NishitP 6 | """ 7 | 8 | import pickle 9 | 10 | #doc_new = ['obama is running for president in 2016'] 11 | 12 | var = input("Please enter the news text you want to verify: ") 13 | print("You entered: " + str(var)) 14 | 15 | 16 | #function to run for prediction 17 | def detecting_fake_news(var): 18 | #retrieving the best model for prediction call 19 | load_model = pickle.load(open('final_model.sav', 'rb')) 20 | prediction = load_model.predict([var]) 21 | prob = load_model.predict_proba([var]) 22 | 23 | return (print("The given statement is ",prediction[0]), 24 | print("The truth probability score is ",prob[0][1])) 25 | 26 | 27 | if __name__ == '__main__': 28 | detecting_fake_news(var) -------------------------------------------------------------------------------- /project.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-image: url(https://cdn.hipwallpaper.com/i/55/28/yTersM.jpg); 4 | } 5 | .fnd 6 | { 7 | text-align: center; 8 | color: #d62750; 9 | font-size: 2.0em; 10 | margin-top: 0px; 11 | 12 | } 13 | .how 14 | { 15 | margin-left: 250px; 16 | padding-top: ; 17 | font-size: 30px; 18 | color: #ccbf87; 19 | } 20 | 21 | .name{ 22 | align-content: center; 23 | width: 50%; 24 | height: 150px; 25 | margin-left: 250px; 26 | margin-top: 10px; 27 | padding: 12px 20px; 28 | box-sizing: border-box; 29 | border: 2px solid #ccc; 30 | border-radius: 4px; 31 | background-color: #f8f8f8; 32 | resize: none; 33 | } 34 | 35 | .btn-success 36 | { 37 | margin-left: 250px; 38 | background: ; 39 | height: 40px; 40 | width: 100px; 41 | font-size: 1.5em; 42 | border-radius: 10px; 43 | border-color: #0a58ca; 44 | 45 | } 46 | .btn-primary 47 | { 48 | margin-left: 250px; 49 | background: red; 50 | height: 40px; 51 | width: 100px; 52 | font-size: 1.5em; 53 | border-radius: 10px; 54 | 55 | } 56 | 57 | #prediction 58 | { 59 | margin-left: 250px; 60 | font-size: 1.5em; 61 | color: #ccffff; 62 | } 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Template Name: NewsFeed 3 | Template URI: http://www.wpfreeware.com/newsfeed-ultra-responsive-news-magazine-theme/ 4 | Author: WpFreeware 5 | Author URI: http://www.wpfreeware.com 6 | Description: A Pro bootstrap html5 css3 responsive news magazine website template 7 | Version: 1.0 8 | License: GPL 9 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 | */ 11 | 12 | body{background:#f5f5f5} 13 | ul{padding:0; margin:0; list-style:none} 14 | a{text-decoration:none; color:#2f2f2f} 15 | a:hover{color:#646464; text-decoration:none} 16 | a:focus{outline:none; text-decoration:none} 17 | h1, h2, h3, h4, h5, h6{font-family:'Oswald',sans-serif} 18 | h2{line-height:23px} 19 | img{border:none} 20 | img:hover{opacity:0.75} 21 | .img-center{display:block; margin-left:auto; margin-right:auto; text-align:center} 22 | .img-right{display:block; margin-left:auto} 23 | .img-left{display:block; margin-right:auto} 24 | .yellow_bg{background-color:#ffd62c} 25 | .btn-yellow{background-color:#ffd62c; color:#fff} 26 | .btn-yellow:hover{background-color:#e1b70b; color:#fff} 27 | .limeblue_bg{background-color:#7dc34d} 28 | .blue_bg{background-color:#09c} 29 | .btn{border-radius:0; margin-bottom:5px; -webkit-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 30 | .btn:hover{} 31 | .btn-red{background-color:red; color:#fff} 32 | .btn-red:hover{background-color:#c40505; color:#fff} 33 | .btn-green{background-color:green; color:#fff} 34 | .btn-green:hover{background-color:#0ab20a; color:#fff} 35 | .btn-black{background-color:black; color:#fff} 36 | .btn-black:hover{background-color:#413a3a; color:#fff} 37 | .btn-orange{background-color:orange; color:#fff} 38 | .btn-orange:hover{background-color:#f09d05; color:#fff} 39 | .btn-blue{background-color:blue; color:#fff} 40 | .btn-blue:hover{background-color:#0707a2; color:#fff} 41 | .btn-lime{background-color:lime; color:#fff} 42 | .btn-lime:hover{background-color:#05ae05; color:#fff} 43 | .default-btn{background-color:#12a3df; color:#fff} 44 | .default-btn:hover{background-color:#0a8ec4; color:#fff} 45 | .btn-theme{background-color:#d083cf; color:#fff} 46 | .btn-theme:hover{background-color:#ce39cc; color:#fff} 47 | .transition{-webkit-transition:all 0.5s; -moz-transition:all 0.5s; -ms-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 48 | #preloader{position:fixed; top:0; left:0; right:0; bottom:0; background-color:#fff; z-index:99999} 49 | #status{width:200px; height:200px; position:absolute; left:50%; top:50%; background-image:url(images/status.gif); background-repeat:no-repeat; background-position:center; margin:-100px 0 0 -100px} 50 | .scrollToTop{bottom:105px; display:none; font-size:32px; font-weight:bold; height:50px; position:fixed; right:75px; text-align:center; text-decoration:none; width:50px; z-index:9; border:1px solid; -webkit-transition:all 0.5s; -moz-transition:all 0.5s; -ms-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 51 | .scrollToTop:hover, .scrollToTop:focus{text-decoration:none; outline:none} 52 | #header{display:inline; float:left; width:100%; margin-top:20px} 53 | .header_top{background-color:#2c2c2c; display:inline; float:left; padding:0 30px; width:100%} 54 | .header_top_left{float:left; display:inline; width:50%} 55 | .top_nav{text-align:left} 56 | .top_nav li{display:inline-block} 57 | .top_nav li a{display:inline-block; border-right:1px solid #333; color:#fff; font-size:11px; font-weight:bold; padding:20px 15px; text-transform:uppercase; -webkit-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 58 | .top_nav li a:hover{background-color:#d083cf} 59 | .header_top_right{float:left; display:inline; width:50%; text-align:right} 60 | .header_top_right > p{color:#fff; display:inline-block; float:right; font:bold 12px sans-serif; margin-bottom:0; padding-bottom:20px; padding-right:8px; padding-top:20px} 61 | .header_bottom{background-color:#fff; display:inline; float:left; padding:15px 30px 15px; width:100%} 62 | .logo_area{display:inline; float:left; width:31%} 63 | .logo{font-size:45px; font-weight:bold; color:#000; font-family:'Varela',sans-serif} 64 | .logo img{max-width:100%} 65 | .logo img:hover{opacity:1} 66 | .logo > span{ margin-left:-14px} 67 | .add_banner{float:right; width:728px; height:90px} 68 | .add_banner img{width:100%; height:100%} 69 | #navArea{float:left; display:inline; width:100%; padding:0 30px; background-color:#fff} 70 | .navbar{border:medium none; border-radius:0} 71 | .navbar-inverse .navbar-nav > li > a{border-left:1px solid #383838; color:#ddd; font-family:'Oswald',sans-serif; display:inline-block; height:50px; line-height:50px; padding:0 14px; text-shadow:0 1px 1px #000; text-transform:uppercase; -webkit-transition:all 0.5s; -mz-transition:all 0.5s; -ms-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 72 | .navbar-inverse .navbar-nav > li:first-child a{border:none} 73 | .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus{ color:#fff} 74 | .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus{ color:#fff} 75 | .main-nav ul li a{} 76 | .navbar-collapse{ padding-left:0} 77 | .mobile-show{display:none} 78 | .desktop-home{display:block; font-size:30px; margin-top:10px} 79 | .dropdown-menu{background-color:#222} 80 | .dropdown-menu > li > a{clear:both; color:#ddd; background-color:#222; padding:10px 20px; font-family:'Oswald',sans-serif; -webkit-transition:all 0.5s; -mz-transition:all 0.5s; -ms-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 81 | .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus{color:#fff} 82 | #newsSection{float:left; display:inline; width:100%; padding:0 30px; background-color:#fff; padding-bottom:20px} 83 | .latest_newsarea{float:left; display:inline; width:100%; background-color:#000; position:relative} 84 | .latest_newsarea span{ color:#fff; font-family:Oswald,sans-serif; font-size:15px; left:0; line-height:1.8em; margin-right:20px; overflow:hidden; padding:2px 18px 1px 19px; position:absolute; z-index:15} 85 | .social_area{ position:absolute; right:0; top:0; background:#fff; border-top:1px solid #ccc; border-bottom:1px solid #ccc; border-right:1px solid #ccc; height:31px} 86 | .social_nav{ text-align:right} 87 | .social_nav li{ display:block; float:left} 88 | .social_nav li a{ display:block; float:left; height:30px; text-indent:-9999px; width:30px; border-left:1px solid #ccc; -webkit-transition:all 0.5s; -moz-transition:all 0.5s; -ms-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 89 | .social_nav li.facebook a{ background-image:url("images/socials.png"); background-position:0 -30px; background-size:270px 60px} 90 | .social_nav li.facebook a:hover{ background-position:0 0px; background-size:270px 60px; background-color:#436eac} 91 | .social_nav li.twitter a{ background-image:url("images/socials.png"); background-position:-30px -30px; background-size:270px 60px} 92 | .social_nav li.twitter a:hover{ background-position:-30px 0px; background-size:270px 60px; background-color:#0598c9} 93 | .social_nav li.flickr a{ background-image:url("images/socials.png"); background-position:-60px -30px; background-size:270px 60px} 94 | .social_nav li.flickr a:hover{ background-position:-60px 0px; background-size:270px 60px; background-color:#e33b7e} 95 | .social_nav li.pinterest a{ background-image:url("images/socials.png"); background-position:-90px -30px; background-size:270px 60px} 96 | .social_nav li.pinterest a:hover{ background-position:-90px 0px; background-size:270px 60px; background-color:#cb2027} 97 | .social_nav li.googleplus a{ background-image:url("images/socials.png"); background-position:-120px -30px; background-size:270px 60px} 98 | .social_nav li.googleplus a:hover{ background-position:-120px 0px; background-size:270px 60px; background-color:#d64b2e} 99 | .social_nav li.vimeo a{ background-image:url("images/socials.png"); background-position:-150px -30px; background-size:270px 60px} 100 | .social_nav li.vimeo a:hover{ background-position:-150px 0px; background-size:270px 60px; background-color:#86ae24} 101 | .social_nav li.youtube a{ background-image:url("images/socials.png"); background-position:-180px -30px; background-size:270px 60px; width:60px} 102 | .social_nav li.youtube a:hover{ background-position:-180px 0px; background-size:270px 60px; background-color:#e32114} 103 | .social_nav li.mail a{ background-image:url("images/socials.png"); background-position:-240px -30px; background-size:270px 60px; width:32px} 104 | .social_nav li.mail a:hover{background-position:-240px 0px; background-size:270px 60px; background-color:#bc75d6} 105 | #sliderSection{background-color:#fff; display:inline; float:left; width:100%; padding:0 30px} 106 | .single_iteam{display:inline; float:left; position:relative; width:100%; height:448px} 107 | .single_iteam img{width:100%; height:100%} 108 | .single_iteam img:hover{opacity:1} 109 | .slider_article{ bottom:20px; left:0; position:absolute; right:0; padding:10px 15px} 110 | .slider_article > h2 a{ background:none repeat scroll 0 0 rgba(0,0,0,0.4); color:#fff; font-size:18px; padding:10px; display:inline-block} 111 | .slider_article > p{ background:none repeat scroll 0 0 rgba(0,0,0,0.4); color:#fff; padding:3px; display:inline-block} 112 | .slick-prev:before{ content:""} 113 | .slick-prev{ background-image:url(images/slider_prev.png); background-repeat:no-repeat; background-position:center; left:10px} 114 | .slick-next:before{ content:""} 115 | .slick-next{ background-image:url(images/slider_next.png); background-repeat:no-repeat; background-position:center; left:60px} 116 | .slick-prev, .slick-next{background-color:#000; top:10%; width:40px; height:40px} 117 | .slick-prev:hover, .slick-next:hover{opacity:0.5} 118 | .latest_post{float:left; display:inline; width:100%} 119 | .latest_post > h2{background:none repeat scroll 0 0 #151515; color:#fff; font-family:'Oswald',sans-serif; font-size:18px; margin-top:5px; font-weight:400; margin-bottom:10px; margin-left:0; padding:0; position:relative; text-align:center; text-transform:uppercase} 120 | .latest_post > h2 span{padding:4px 10px} 121 | .latest_postnav{height:auto !important; margin-top:20px} 122 | .latest_postnav li{margin-bottom:10px; float:left; width:100%} 123 | .latest_post_container{display:inline; float:left; height:430px; position:relative; width:100%} 124 | .latest_post_container:hover #prev-button, .latest_post_container:hover #next-button{display:block} 125 | #prev-button{cursor:pointer; font-size:20px; left:0; position:absolute; text-align:center; top:-10px; width:100%; display:none} 126 | #next-button{cursor:pointer; display:none; font-size:20px; left:0; position:absolute; text-align:center; bottom:0; width:100%} 127 | #contentSection{float:left; display:inline; width:100%; background-color:#fff; padding:0 30px} 128 | .left_content{float:left; display:inline; width:100%} 129 | .single_post_content{float:left; display:inline; width:100%; margin-bottom:20px} 130 | .single_post_content > h2{background:none repeat scroll 0 0 #151515; color:#fff; font-family:'Oswald',sans-serif; font-size:18px; font-weight:400; margin-bottom:10px; margin-left:0; margin-top:5px; padding:0; position:relative; text-align:center; text-transform:uppercase; margin-bottom:20px} 131 | .single_post_content > h2 span{padding:4px 10px} 132 | .single_post_content_left{float:left; display:inline; width:49%} 133 | .business_catgnav{} 134 | .business_catgnav li{float:left; display:block; width:100%} 135 | .bsbig_fig{width:100%} 136 | .bsbig_fig > a{display:block} 137 | .bsbig_fig > a img{width:100%} 138 | .bsbig_fig figcaption{color:#333; font-family:"Oswald",sans-serif; font-size:23px; font-weight:300; margin-top:10px; margin-bottom:10px} 139 | .single_post_content_right{float:right; display:inline; width:48%} 140 | .right_content{float:left; display:inline; width:100%; min-height:300px} 141 | .spost_nav{} 142 | .spost_nav li{float:left; display:block; width:100%; margin-bottom:10px} 143 | .spost_nav .media-left{width:100px; height:80px} 144 | .media-left > img{height:70px; width:90px} 145 | .spost_nav .media-body > a{font-family:"Oswald",sans-serif} 146 | .featured_img{position:relative} 147 | .overlay:hover{ background:none repeat scroll 0 0 rgba(0,0,0,0.4)} 148 | .overlay{ bottom:0; display:block; left:0; position:absolute; width:100%; z-index:2; height:100%; -webkit-transition:all 0.5s; -mz-transition:all 0.5s; -ms-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 149 | .fashion_technology_area{display:inline; float:left; width:100%} 150 | .fashion{float:left; display:inline; width:48%} 151 | .technology{float:right; display:inline; width:48%} 152 | .photo_grid{position:relative; margin:0 auto; max-width:1000px; list-style:none; text-align:center} 153 | .photograph_nav{margin-left:-11px} 154 | .photograph_nav li{display:block; float:left; margin-left:9px; width:32%} 155 | .photo_grid figure{position:relative; float:left; overflow:hidden; margin:10px 1%; margin-top:0; height:150px; width:100%; background:#3085a3; text-align:center; cursor:pointer} 156 | .photo_grid figure img{position:relative; display:block; min-height:100%; max-width:100%; width:100%; height:100% opacity:0.8} 157 | .photo_grid figure figcaption{padding:2em; color:#fff; text-transform:uppercase; font-size:1.25em; -webkit-backface-visibility:hidden; backface-visibility:hidden} 158 | .photo_grid figure figcaption::before, .photo_grid figure figcaption::after{pointer-events:none} 159 | .photo_grid figure figcaption{position:absolute; bottom:0; left:0; width:100%; height:100%} 160 | .photo_grid figure h2{word-spacing:-0.15em; font-weight:300} 161 | .photo_grid figure h2 span{font-weight:800} 162 | .photo_grid figure h2, .photo_grid figure a{margin:0} 163 | .photo_grid figcaption a{color:#fff; font-size:68.5%; letter-spacing:1px; display:block; margin-top:7px} 164 | figure.effect-layla img{height:390px} 165 | figure.effect-layla figcaption{padding:1.5em} 166 | figure.effect-layla figcaption::before, figure.effect-layla figcaption::after{position:absolute; content:''; opacity:0} 167 | figure.effect-layla figcaption::before{top:20px; right:15px; bottom:20px; left:15px; border-top:1px solid #fff; border-bottom:1px solid #fff; -webkit-transform:scale(0,1); transform:scale(0,1); -webkit-transform-origin:0 0; transform-origin:0 0} 168 | figure.effect-layla figcaption::after{top:9px; right:25px; bottom:9px; left:25px; border-right:1px solid #fff; border-left:1px solid #fff; -webkit-transform:scale(1,0); transform:scale(1,0); -webkit-transform-origin:100% 0; transform-origin:100% 0} 169 | figure.effect-layla h2{font-size:18px; padding-top:33%; -webkit-transition:-webkit-transform 0.35s; transition:transform 0.35s} 170 | figure.effect-layla a{ text-transform:none; -webkit-transform:translate3d(0,-10px,0); transform:translate3d(0,-10px,0)} 171 | figure.effect-layla img, figure.effect-layla h2{-webkit-transform:translate3d(0,-30px,0); transform:translate3d(0,-30px,0)} 172 | figure.effect-layla img, figure.effect-layla figcaption::before, figure.effect-layla figcaption::after, figure.effect-layla a{-webkit-transition:opacity 0.35s,-webkit-transform 0.35s; transition:opacity 0.35s,transform 0.35s} 173 | figure.effect-layla:hover img{opacity:0.7; -webkit-transform:translate3d(0,0,0); transform:translate3d(0,0,0)} 174 | figure.effect-layla:hover figcaption::before, figure.effect-layla:hover figcaption::after{opacity:1; -webkit-transform:scale(1); transform:scale(1)} 175 | figure.effect-layla:hover h2{padding-top:26%} 176 | figure.effect-layla:hover h2, figure.effect-layla:hover a{opacity:1; -webkit-transform:translate3d(0,-35px,0); transform:translate3d(0,-35px,0)} 177 | figure.effect-layla:hover figcaption::after, figure.effect-layla:hover h2, figure.effect-layla:hover a, figure.effect-layla:hover img{-webkit-transition-delay:0.15s; transition-delay:0.15s} 178 | .single_sidebar{float:left; display:inline; width:100%; margin-bottom:20px} 179 | .single_sidebar > h2{background:none repeat scroll 0 0 #151515; color:#fff; font-family:"Oswald",sans-serif; font-size:18px; font-weight:400; margin-bottom:10px; margin-left:0; margin-top:5px; padding:0; position:relative; text-align:center; text-transform:uppercase} 180 | .single_sidebar > h2 span{padding:4px 10px} 181 | .cat-item a{background:none repeat scroll 0 0 #e4e4e4; color:#888; display:block; float:left; border-bottom:none !important; font-size:13px; line-height:12px; margin:0 2px 2px 0; padding:12px 17px; -webkit-transition:all 0.5s; -mz-transition:all 0.5s; -ms-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 182 | .cat-item a:hover{color:#fff; text-decoration:none !important} 183 | .tab-content{margin-top:10px} 184 | .nav-tabs{background:none repeat scroll 0 0 #333; border-bottom:none} 185 | .nav-tabs > li{margin-bottom:0} 186 | .nav-tabs > li > a{margin-right:0; color:#fff; font-size:15px; border-radius:0; border:none; font-family:"Oswald",sans-serif; -webkit-transition:all 0.5s; -mz-transition:all 0.5s; -ms-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 187 | .nav-tabs > li > a:hover, .nav-tabs > li > a:focus{color:#fff !important; border:none} 188 | .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus{border-width:0; border-color:#ddd #ddd transparent; color:#fff} 189 | .vide_area{float:left; display:inline; width:100%} 190 | .sideAdd{display:block; float:left; height:250px; width:100%; margin-top:10px} 191 | .sideAdd > img{width:100%; height:100%} 192 | .single_sidebar ul li a{border-bottom:1px solid #333; display:block} 193 | .single_sidebar .spost_nav li a{border-bottom:none; float:left} 194 | #footer{display:inline; float:left; width:100%; margin-bottom:20px} 195 | .footer_top{background-color:#252525; color:#ddd; display:inline; float:left; padding:10px 30px 48px; width:100%} 196 | .footer_widget{display:inline; float:left; width:100%; min-height:310px} 197 | .footer_widget > h2{border-bottom:3px solid #666; font-family:Oswald,arial,Georgia,serif; font-size:16px; padding:10px 0; text-transform:uppercase} 198 | .tag_nav{} 199 | .tag_nav li{} 200 | .tag_nav li a{border-bottom:1px solid #ddd; color:#ccc; display:block; padding:6px 6px 6px 0; -webkit-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 201 | .tag_nav li a:hover{padding-left:10px} 202 | .footer_bottom{float:left; display:inline; width:100%; padding:10px 30px; background-color:#303030; color:#ccc} 203 | .copyright{float:left; width:50%; padding-top:5px; text-align:left} 204 | .copyright a{color:#ccc} 205 | .developer{float:right; width:50%; text-align:right; padding-top:5px; color:#ccc} 206 | .developer a{color:#ccc} 207 | .catgArchive{border:medium none; color:#fff; display:inline; float:left; font-weight:bold; padding:10px 15px; width:100%; margin-top:15px} 208 | .catgArchive option{background-color:#fff; font-weight:normal; padding:5px; color:#d083cf} 209 | .nav-tabs > li{display:inline-block; float:none; width:32.55%} 210 | .nav-tabs{ text-align:center} 211 | .pagination > li > a, .pagination > li > span{background-color:#000; border:1px solid #000; color:#eee; margin-right:5px; -webkit-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 212 | .pagination > li > a:hover, .pagination > li > a:focus{background-color:#d083cf; color:#fff; border-color:#d083cf} 213 | .pagination > li:first-child > a, .pagination > li:first-child > span{border-bottom-left-radius:0; border-top-left-radius:0} 214 | .pagination > li:last-child > a, .pagination > li:last-child > span{border-bottom-right-radius:0; border-top-right-radius:0} 215 | .single_page{float:left; display:inline; width:100%} 216 | .single_page > h1{color:#333; font-family:Oswald,arial,Georgia,serif; font-size:30px; line-height:1.4em; margin:10px 0 -10px; padding:0 0 4px; text-transform:uppercase} 217 | .post_commentbox{display:inline; float:left; width:100%; border-top:1px solid #ddd; border-bottom:1px solid #ddd; margin-top:20px; padding:5px 0px} 218 | .post_commentbox a, .post_commentbox span{color:#798992; font-size:11px; margin-right:5px} 219 | .post_commentbox a > i, .post_commentbox span > i{margin-right:5px} 220 | .breadcrumb{background-color:#303030; border-radius:0} 221 | .breadcrumb li a{color:#fff} 222 | .single_page_content{display:inline; float:left; padding-top:20px; width:100%; border-bottom:1px solid #ddd; padding-bottom:20px} 223 | .single_page_content > img{max-width:100%; width:320px; height:213px; margin-bottom:15px} 224 | .single_page_content ul{position:relative; padding-left:25px} 225 | .single_page_content ul li{line-height:25px} 226 | .single_page_content ul li:before{content:""; height:5px; left:5px; position:absolute; width:9px; margin-top:8px} 227 | .single_page_content ul li:hover{opacity:0.75} 228 | .single_page_content h2{line-height:35px} 229 | .single_page_content h3{line-height:30px} 230 | .single_page_content h4{line-height:25px} 231 | .single_page_content h4{line-height:20px} 232 | .social_link{display:inline; float:left; margin-bottom:25px; margin-top:20px; width:100%} 233 | .sociallink_nav{text-align:center} 234 | .sociallink_nav li{display:inline-block} 235 | .sociallink_nav li a{color:#fff; display:inline-block; font-size:17px; padding:8px 12px; margin:0 3px; -webkit-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 236 | .sociallink_nav li a:hover{-webkit-transform:rotate(50deg); -moz-transform:rotate(50deg); -ms-transform:rotate(50deg); -os-transform:rotate(50deg); transform:rotate(50deg)} 237 | .sociallink_nav li a:hover i{-webkit-transform:rotate(-50deg); -moz-transform:rotate(-50deg); -ms-transform:rotate(-50deg); -os-transform:rotate(-50deg); transform:rotate(-50deg)} 238 | .sociallink_nav li:nth-child(1) > a{background:none repeat scroll 0 0 #3b5998; padding:8px 15px} 239 | .sociallink_nav li:nth-child(2) > a{background:none repeat scroll 0 0 #00acee} 240 | .sociallink_nav li:nth-child(3) > a{background:none repeat scroll 0 0 #dd4b39} 241 | .sociallink_nav li:nth-child(4) > a{background:none repeat scroll 0 0 #0e76a8} 242 | .sociallink_nav li:nth-child(5) > a{background:none repeat scroll 0 0 #c92228} 243 | .related_post{display:inline; float:left; margin-top:0; width:100%; margin-bottom:20px} 244 | .related_post > h2{border-bottom:1px solid #e3e3e3; padding-bottom:5px} 245 | .related_post > h2 i{font-size:25px} 246 | .related_post .spost_nav li{width:32%; margin-right:10px} 247 | .related_post .spost_nav li:last-child{margin-right:0} 248 | .nav-slit a{position:fixed; top:50%; display:block; outline:none; text-align:left; z-index:1000; -webkit-transform:translateY(-50%); transform:translateY(-50%)} 249 | .nav-slit a.prev{left:0} 250 | .nav-slit a.next{right:0} 251 | .nav-slit .icon-wrap{position:relative; display:block; padding:45px 5px} 252 | .nav-slit .icon-wrap i{color:#fff; font-size:40px; display:inline-block} 253 | .nav-slit div{position:absolute; top:0; width:200px; height:100%; background-color:#939a9f; -webkit-transition:-webkit-transform 0.3s 0.3s; transition:transform 0.3s 0.3s; -webkit-perspective:1000px; perspective:1000px} 254 | .nav-slit a.prev div{left:0; -webkit-transform:translateX(-100%); transform:translateX(-100%)} 255 | .nav-slit a.next div{right:0; text-align:right; -webkit-transform:translateX(100%); transform:translateX(100%)} 256 | .nav-slit h3{position:absolute; top:100%; margin:0; padding:0 20px; height:30%; color:#fff; text-transform:uppercase; letter-spacing:1px; font-weight:500; font-size:0.75em; line-height:2.75; width:200px; text-align:left; overflow:hidden; padding-top:4px; -webkit-transition:-webkit-transform 0.3s; transition:transform 0.3s; -webkit-transform:rotateX(-90deg); transform:rotateX(-90deg); -webkit-transform-origin:50% 0; transform-origin:50% 0; -webki-backface-visibility:hidden; -webkit-backface-visibility:hidden; backface-visibility:hidden} 257 | .nav-slit img{left:0; position:absolute; top:0; width:100%; width:200px; height:130px} 258 | .nav-slit a:hover div{-webkit-transform:translateX(0); transform:translateX(0)} 259 | .nav-slit a:hover h3{-webkit-transition-delay:0.6s; transition-delay:0.6s; -webkit-transform:rotateX(0deg); transform:rotateX(0deg)} 260 | .error_page{float:left; display:inline; width:100%; text-align:center} 261 | .error_page > h3{text-transform:uppercase} 262 | .error_page > h1{font-size:110px} 263 | .error_page > p{font-size:15px; margin:0 auto; width:80%; margin-bottom:40px} 264 | .error_page > span{display:inline-block; height:2px; text-align:center; width:100px} 265 | .error_page > a{color:#fff; display:inline-block; padding:5px 10px} 266 | .error_page > a:hover{opacity:0.75} 267 | .contact_area{float:left; display:inline; width:100%; margin-bottom:30px} 268 | .contact_area > h2{color:#fff; display:inline-block; font-size:20px; padding:7px 10px 5px; text-transform:uppercase; margin-bottom:30px} 269 | .contact_area > p{margin-bottom:20px} 270 | .contact_form input[type="text"], .contact_form input[type="email"], .contact_form textarea{border-radius:0; margin-bottom:30px} 271 | .contact_form input[type="submit"]{border:medium none; color:#fff; height:35px; padding:5px 10px; -webkit-transition:all 0.5s; -o-transition:all 0.5s; transition:all 0.5s} 272 | .contact_form input[type="submit"]:hover{border:1px solid #d083cf} 273 | @media(max-width:1199px ){.logo_area{width:34%}.add_banner{width:580px}.nav-tabs > li{width:32.3%}.photograph_nav li{width:31.5%} 274 | @media(max-width:991px ){.add_banner{display:none}.logo_area{width:100%}.nav > li > a{padding:8px 8px}.latest_post_container{height:380px;overflow:hidden}#next-button{bottom:-2px}.single_iteam{height:415px}.photograph_nav li{width:47.7%}.related_post .spost_nav li{width:100%}.nav-tabs > li{width:31.9%}.nav-tabs > li > a{font-size:13px;padding-left:0 !important;padding-right:0 !important;text-align:center}} 275 | @media(max-width:767px ){.navbar-collapse{padding-left:15px}.mobile-show{display:block}.desktop-home{display:none}.navbar-inverse .navbar-nav > li > a{display:block}.header_top_left{width:100%}.header_top_right > p{display:none}.social_area{display:none}.single_iteam a{height:100%}.single_iteam a > img{height:100%}.error_page > a{margin-bottom:25px}.nav-tabs > li{width:32.6%}} 276 | @media(max-width:480px ){.top_nav{text-align:center}.single_post_content_left{width:100%}.single_post_content_right{width:100%}.fashion{width:100%}.technology{width:100%}.copyright{text-align:center;width:100%}.developer{text-align:center;width:100%}.single_iteam{height:300px}.photo_grid figure{height:200px}.photograph_nav li{width:100%;margin-left:0}.nav > li > a{padding:8px 12px}.nav-tabs > li{width:32.6%}} 277 | @media(max-width:360px ){.latest_newsarea span{font-size:12px;line-height:2.2em;padding:2px 10px 1px 10px}.single_iteam{height:210px}.slider_article > p{display:none}.error_page > span{width:80px}.nav-tabs > li{width:32.3%}.pagination > li > a,.pagination > li > span{padding:4px 8px}} 278 | @media(max-width:320px ){.sociallink_nav li a{padding:5px 10px}.sociallink_nav li:nth-child(1) > a{padding:5px 13px}.nav-tabs > li{width:32.1%}} -------------------------------------------------------------------------------- /theme.css: -------------------------------------------------------------------------------- 1 | .scrollToTop{background-color:#d083cf; color:#fff} 2 | .scrollToTop:hover, .scrollToTop:focus{background-color:#fff; color:#d083cf; border-color:1px solid #d083cf} 3 | .logo > span{color:#d083cf} 4 | .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus{background-color:#d083cf} 5 | .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus{background-color:#d083cf} 6 | .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus{background-color:#d083cf} 7 | .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus{background-color:#d083cf} 8 | .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus{background-color:#d083cf} 9 | .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus{background-color:#d083cf} 10 | .latest_newsarea span{background:none repeat scroll 0 0 #d083cf} 11 | .latest_post > h2 span{background:none repeat scroll 0 0 #d083cf} 12 | #prev-button{color:#d083cf} 13 | #next-button{color:#d083cf} 14 | .single_post_content > h2 span{background:none repeat scroll 0 0 #d083cf} 15 | .single_sidebar > h2 span{ background:none repeat scroll 0 0 #d083cf} 16 | .bsbig_fig figcaption a:hover{color:#d083cf} 17 | .spost_nav .media-body > a:hover{color:#d083cf} 18 | .cat-item a:hover{background-color:#d083cf} 19 | .nav-tabs > li > a:hover, .nav-tabs > li > a:focus{background-color:#d083cf} 20 | .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus{background-color:#d083cf} 21 | .single_sidebar > ul > li a:hover{color:#d083cf} 22 | .footer_widget > h2:hover{color:#d083cf} 23 | .tag_nav li a:hover{color:#d083cf; border-color:#d083cf} 24 | .copyright a:hover{color:#d083cf} 25 | .post_commentbox a:hover, .post_commentbox span:hover{color:#d083cf} 26 | .breadcrumb{border-left:10px solid #d083cf} 27 | .single_page_content ul li:before{background-color:#d083cf} 28 | .single_page_content h2, .single_page_content h3, .single_page_content h4, .single_page_content h5, .single_page_content h6{color:#d083cf} 29 | .nav-slit .icon-wrap{background-color:#d083cf} 30 | .nav-slit h3{background:#d083cf} 31 | .catgArchive{background-color:#d083cf} 32 | .error_page > h3{color:#d083cf} 33 | .error_page > span{background:none repeat scroll 0 0 #d083cf} 34 | .error_page > a{background-color:#d083cf} 35 | .contact_area > h2{background-color:#d083cf} 36 | .contact_form input[type="submit"]{background-color:#d083cf} 37 | .contact_form input[type="submit"]:hover{background-color:#fff; color:#d083cf} 38 | .related_post > h2 i{color:#d083cf} 39 | .form-control:focus{border-color:#d083cf; box-shadow:0 0px 1px #d083cf inset,0 0 5px #d083cf} --------------------------------------------------------------------------------