This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nltk | |
nltk.download() | |
import nltk | |
from nltk.tokenize import RegexpTokenizer | |
text = 'Citizens of India are known as Indians.' | |
# By passing r'\w+' to the RegexpTokenizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fastText | |
import sys | |
import os | |
import nltk | |
nltk.download('punkt') | |
import csv | |
import datetime | |
from bs4 import BeautifulSoup | |
import re | |
import itertools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%pylab inline | |
import os | |
import numpy as np | |
import pandas as pd | |
from scipy.misc import imread | |
from sklearn.metrics import accuracy_score | |
import tensorflow as tf | |
import keras | |
from keras.layers import Dense, Dropout, Flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import librosa | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
import os | |
import csv | |
# Preprocessing | |
from sklearn.model_selection import train_test_split | |
from sklearn.preprocessing import LabelEncoder, StandardScaler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import pandas as pd | |
from scipy.misc import imread | |
import math | |
import numpy as np | |
import cv2 | |
import keras | |
import seaborn as sns | |
from keras.layers import Dense, Dropout, Flatten, Input | |
from keras.layers import Conv2D, MaxPooling2D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
import nltk | |
from sklearn.decomposition import TruncatedSVD | |
# If nltk stop word is not downloaded | |
# nltk.download('stopwords') | |
from nltk.corpus import stopwords | |
# List of documents | |
a1 = "He is a good dog." |