Climate Change Fake News Detector
by ashu31 Updated: Aug 5, 2022
Solution Kit
import pandas as pd import numpy as np import re import string from nltk.corpus import stopwords from nltk.tokenize import word_tokenize df_text = pd.read_csv(‘fake_or_real_news.csv’, encoding=‘latin-1’) df_text.columns = [‘id’, ‘title’, ‘text’, ‘label’]df_text.drop([‘id’, ‘title’], axis=1) Use Case1 # Remove urls text = re.sub(r”http\S+|www\S+|https\S+”, ”, text, flags=re.MULTILINE) # Remove user @ references and ‘#’ from text text = re.sub(r’\@\w+|\#’,”, text) Use Case2 removing the punctuations text = text.translate(str.maketrans(”, ”, string.punctuation)) Use Case 3 make every sentence into a list of words or tokens tokens = word_tokenize(text) words = [w for w in tokens if not w in stop_words] Use Case 4 TF-IDF Implementation from sklearn.feature_extraction.text import TfidfVectorizer tf_vector = TfidfVectorizer(sublinear_tf=True) tf_vector.fit(df_text[‘text’]) Use Case 5 To transform the label texts into numbered targets. For example, assume that we have a list of labels like this: [‘real’, ‘fake’, ‘fake’, ‘fake’] What we essentially require is a list like this: [1, 0, 0, 0]. What label encoder does is, it takes all the distinct labels and makes a list. For our example, the list would be [‘fake’, ‘real’]. X_text = tf_vector.transform(df_text[‘text’].ravel()) y_values = np.array(df_text[‘label’].ravel()) from sklearn import preprocessing le = preprocessing.LabelEncoder() le.fit(y_values)le.transform(y_values) Use Case 6 The training and testing splits are done. It can be achieved by using sklearn’s preprocessing package and importing the train test split function. from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_test_split(X_text, y_values, test_size=0.15, random_state=120) Use Case 7 from sklearn.metrics import accuracy_score from sklearn.linear_model import LogisticRegression model = LogisticRegression(solver=‘lbfgs’) model.fit(X_train, y_train) y_predict = model.predict(X_test) print(accuracy_score(y_test, y_predict))
Group Name 1
fake-news-detectorby fake-news-detector
🤖 Flag and Detect Fake News with the help of AI
fake-news-detectorby fake-news-detector
HTML
97
Version:Current
License: No License
content-farm-terminatorby danny0838
Content Farm Terminator browser extension/「終結內容農場」瀏覽器套件
content-farm-terminatorby danny0838
JavaScript
1070
Version:Current
License: Strong Copyleft (GPL-3.0)
Hangmanby josephmoyer
A hangman game using the 6of12 word list, found at http://wordlist.sourceforge.net/, and included in the public domain by it's creator.
Hangmanby josephmoyer
C++
2
Version:v1.0
License: No License
Group Name 2
GCNNby YingtongDou
The Pytorch Implementation of GCNN model from paper Fake News Detection on Social Media using Geometric Deep Learning
GCNNby YingtongDou
Python
17
Version:Current
License: Permissive (Apache-2.0)
news-searchby MieszkoMakuch
University project: News search engine with fake news detection
news-searchby MieszkoMakuch
Python
8
Version:Current
License: No License
Group Name 3
Smart-news-detectorby farhan711
Smart News Detector Bot is a Chrome extension that attaches itself to your Twitter timeline and provides a one-click solution to retrieving diverse perspectives on an issue.
Smart-news-detectorby farhan711
Python
7
Version:Current
License: No License
Fake-News-Detectionby iamjagdeesh
Fake news detector based on the content and users associated with it using BERT and Graph Attention Networks (GAT).
Fake-News-Detectionby iamjagdeesh
Python
26
Version:Current
License: No License
Group Name 4
fake-news-detectorby shibing624
Fake News Detection Competition
fake-news-detectorby shibing624
Python
7
Version:Current
License: Permissive (Apache-2.0)
eu-coronavirus-fakemashby jasonantao
Combating the spread of Coronavirus in the European Union and around the world through the mitigation of fake news
eu-coronavirus-fakemashby jasonantao
Python
6
Version:Current
License: No License
keras-fake-news-generator-and-detectorby chen0040
Fake news generator and detector using keras
keras-fake-news-generator-and-detectorby chen0040
Python
20
Version:Current
License: Permissive (MIT)
Group Name 5
FakeNewsDeepLearningby sophiabiancalatessa
FakeNewsDeepLearningby sophiabiancalatessa
Python
20
Version:Current
License: Permissive (MIT)
fake-news-detectorby adityaRakhecha
Fake NEWS detector using LIAR dataset.
fake-news-detectorby adityaRakhecha
Jupyter Notebook
5
Version:Current
License: Strong Copyleft (GPL-3.0)
fake-news-detector.github.ioby fake-news-detector
Site for the Fake News Detector
fake-news-detector.github.ioby fake-news-detector
HTML
5
Version:Current
License: No License
Group Name 6
FAKE-NEWS-DETECTIONby tusharahuja0798
I built my own Fake News Detector using NLP and Classification Models.
FAKE-NEWS-DETECTIONby tusharahuja0798
Jupyter Notebook
4
Version:Current
License: No License
-Fake-News-Detection-by LeadingIndiaAI
Fake news is misinformation or manipulated news that is spread across the social media with an intention to damage a person, agency and organisation. Due to the dissemination of fake news, there is a need for computational methods to detect them. Fake news detection aims to help users to expose varieties of fabricated news. To achieve this goal, first we have taken the datasets which contains both fake and real news and conducted various experiments to organize fake news detector. We used natural processing, machine learning and deep learning techniques to classify the datasets. We yielded a comprehensive audit of detecting fake news by including fake news categorization, existing algorithms from machine learning techniques. In this project, we explored different machine learning models like Naïve Bayes, K nearest neighbors, decision tree, random forest and deep learning networks like Shallow Convolutional Neural Networks (CNN), Deep Convolutional Neural Network (VDCNN), Long Short-Term Memory Network (LSTM), Gated Recurrent Unit Network (GRU), Combination of Convolutional Neural Network with Long Short-Term Memory (CNN-LSTM) and Convolutional Neural Network with Gated Recurrent Unit (CNN-LSTM).
-Fake-News-Detection-by LeadingIndiaAI
Jupyter Notebook
21
Version:Current
License: Permissive (MIT)
numpyby numpy
The fundamental package for scientific computing with Python.
numpyby numpy
Python
23587
Version:v1.24.3
License: Permissive (BSD-3-Clause)
Group Name 7
pandasby pandas-dev
Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
pandasby pandas-dev
Python
38499
Version:v2.0.2
License: Permissive (BSD-3-Clause)
re-resizableby bokuweb
📏 A resizable component for React.
re-resizableby bokuweb
TypeScript
2009
Version:v6.5.0
License: Permissive (MIT)
Javascriptby TheAlgorithms
Algorithms implemented in JavaScript for beginners, following best practices.
Javascriptby TheAlgorithms
JavaScript
19017
Version:Current
License: Strong Copyleft (GPL-3.0)
Group Name 8
notebookby jupyter
Jupyter Interactive Notebook
notebookby jupyter
Jupyter Notebook
10114
Version:v7.0.0b2
License: Permissive (BSD-3-Clause)
deep-learning-with-python-notebooksby fchollet
Jupyter notebooks for the code samples of the book "Deep Learning with Python"
deep-learning-with-python-notebooksby fchollet
Jupyter Notebook
16794
Version:Current
License: Permissive (MIT)
data-science-ipython-notebooksby donnemartin
Data science Python notebooks: Deep learning (TensorFlow, Theano, Caffe, Keras), scikit-learn, Kaggle, big data (Spark, Hadoop MapReduce, HDFS), matplotlib, pandas, NumPy, SciPy, Python essentials, AWS, and various command lines.
data-science-ipython-notebooksby donnemartin
Python
25105
Version:Current
License: Others (Non-SPDX)
Group Name 9
PythonDataScienceHandbookby jakevdp
Python Data Science Handbook: full text in Jupyter Notebooks
PythonDataScienceHandbookby jakevdp
Jupyter Notebook
38467
Version:Current
License: Permissive (MIT)