Introduction to
Natural Language
Processing
with
TensorFlow
What will you need ?
● Basic Knowledge of Python
● Basic Machine Learning Understanding
● Basic Maths
pip install Tensorflow
pip install numpy
pip install pandas
pip install matplotlib
python3 -c "import tensorflow as tf;
print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
Cmd :
Today’s Agenda
● Introduction to natural language processing with TensorFlow
● Representing text as Tensors
● Represent words with embeddings
● Capture patterns with recurrent neural networks
● Generate text with recurrent networks
What is TensorFlow ?
Tensorflow is an open source machine
learning framework for all developers which is
use for implementing machine learning and
deep learning application.
Tensor
way of representing data in deeplearning.ng
Basic data structure of TensorFlow
Rank Shape Type
A rank of a tensor
is the order or
n-dimensions of a
tensor defined
Number of
columns and rows
together define the
shape of the
Tensor.
Type describes
the data type
assigned to
Tesnor’s
elements.
WHAT IS NEURAL NETWORk??
Weight
equation
Activation
function
Input layer
NEURONS
Output
layer
Hidden
layer
Y= ax1+bx2+....nxn
What is Natural Language Processing?
Branch of computer science and more specifically
the branch of AI concerned with giving
computers the ability to understand text or
spoken words in much the same way human
beings can.
CONVERTING LETTERS INTO THE ASCII VALUES
L I S T E N
S I L E N T
001 005 006
003 002 001 005 006 004
003 004
002
STEP 1 TOKENIZATION
A tokenizer breaks unstructured data and natural language text into
chunks of information that can be considered as discrete elements.
The token occurrences in a document can be used directly as a vector
representing that document.
The process of Numbering / encoding the letters is called Tokenization
STEP 2 SEQUENCING
Padding : Makes all the words of same length by appending 0
at the msb
Passing set of sentences to the ‘text_to_sequence()’ method
converts the sentences to their labelle equivalent base on the
corpus of words passe to it.
Turning sentences into data
STEP 3 Training the model to recognize the sentiment
in the text
Recurrent Neural Network
Long Short term memory
Recurrent Neural Network
Shradha loves watching POKEMON
1 0 0 1
shradha
shradha loves
loves Watching
watching
Pokemon
Recurrent Neural Network
Exception
Long Short Term Memory (LSTM)
In these type of networks ,in addition to the context being passed like
an RNN .
The LSTM have an additional pipeline of context called Cell State which
passes through the network

NLP with TensorFlow.pdf

  • 1.
  • 2.
    What will youneed ? ● Basic Knowledge of Python ● Basic Machine Learning Understanding ● Basic Maths
  • 3.
    pip install Tensorflow pipinstall numpy pip install pandas pip install matplotlib python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))" Cmd :
  • 4.
    Today’s Agenda ● Introductionto natural language processing with TensorFlow ● Representing text as Tensors ● Represent words with embeddings ● Capture patterns with recurrent neural networks ● Generate text with recurrent networks
  • 6.
    What is TensorFlow? Tensorflow is an open source machine learning framework for all developers which is use for implementing machine learning and deep learning application.
  • 8.
    Tensor way of representingdata in deeplearning.ng
  • 9.
    Basic data structureof TensorFlow Rank Shape Type A rank of a tensor is the order or n-dimensions of a tensor defined Number of columns and rows together define the shape of the Tensor. Type describes the data type assigned to Tesnor’s elements.
  • 10.
    WHAT IS NEURALNETWORk??
  • 11.
  • 13.
    What is NaturalLanguage Processing? Branch of computer science and more specifically the branch of AI concerned with giving computers the ability to understand text or spoken words in much the same way human beings can.
  • 14.
    CONVERTING LETTERS INTOTHE ASCII VALUES L I S T E N S I L E N T 001 005 006 003 002 001 005 006 004 003 004 002
  • 15.
    STEP 1 TOKENIZATION Atokenizer breaks unstructured data and natural language text into chunks of information that can be considered as discrete elements. The token occurrences in a document can be used directly as a vector representing that document. The process of Numbering / encoding the letters is called Tokenization
  • 17.
    STEP 2 SEQUENCING Padding: Makes all the words of same length by appending 0 at the msb Passing set of sentences to the ‘text_to_sequence()’ method converts the sentences to their labelle equivalent base on the corpus of words passe to it. Turning sentences into data
  • 18.
    STEP 3 Trainingthe model to recognize the sentiment in the text Recurrent Neural Network Long Short term memory
  • 19.
    Recurrent Neural Network Shradhaloves watching POKEMON 1 0 0 1 shradha shradha loves loves Watching watching Pokemon
  • 20.
  • 22.
  • 24.
    Long Short TermMemory (LSTM) In these type of networks ,in addition to the context being passed like an RNN . The LSTM have an additional pipeline of context called Cell State which passes through the network