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
!pip install pyLDAvis | |
import nltk | |
nltk.download('stopwords') | |
nltk.download('punkt') | |
import os | |
import re | |
import nltk | |
import string |
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
# !pip install -U spacy | |
# !python -m spacy download en_core_sm | |
# Importing the libraries | |
import spacy | |
import random | |
# Creating a dictionary for training data | |
train_data = [ | |
("The pizza in Naples it the best", {'entities' : [(4, 8, 'FOOD'), (13, 18, 'LOC')]}), |
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 numpy as np | |
import pandas as pd | |
import tensorflow as tf | |
from tensorflow.keras.models import Model | |
from tensorflow.keras.optimizers import Adam | |
from tensorflow.keras.layers import Dense, Input | |
from transformers import BertTokenizer | |
from transformers import TFAutoModel |
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 | |
import string | |
import os, re | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from nltk.corpus import stopwords | |
from nltk.stem import PorterStemmer | |
from nltk.stem import WordNetLemmatizer |
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 re | |
import nltk | |
import numpy as np | |
import unicodedata | |
import pandas as pd | |
nltk.download('stopwords') | |
nltk.download('wordnet') | |
nltk.download('punkt') |
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
# Importing Libaries | |
!python -m spacy download en | |
!python -m spacy download en_vectors_web_lg | |
import spacy | |
nlp = spacy.load('en_vectors_web_lg') | |
import re | |
import nltk | |
import numpy as np |
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 | |
import string | |
import unicodedata | |
# For Tokenizer | |
nltk.download('punkt') | |
# For Lemmatizer | |
nltk.download('wordnet') |