SlideShare a Scribd company logo
1 of 155
Download to read offline
Neural Nets
How Regular Expressions brought about Deep Learning
For millennia people have asked
Why?
What is mind?
What is consciousness?
How does my brain work?
We need a new science!
Exploring how neurons
work since 1890s™
Guillaume-Benjamin-Amand Duchenne (de Boulogne)
Fast forward to 1943,
just after
After Turing
After Turing
After Turing
in the USA
McCulloch
Neurosci
Pitts
Logician
published
During WW2
which tried to understand
During WW2
by modelling the neurons
they didn’t know it but...
Their paper had an enormous
impact on computer science
Shortly after in 1951
In 1956
Stephen Kleene
set out to prove what
could compute in
could compute
In 1956
proposed a
simple algebra
Kleene proposed a
simple algebra
(well, simple for algebra)
that defined a
Regular Language
WTF’s a Regular Language?
Let’s start with
an alphabet
{0,1,2,3,4,5,6,7,8,9}
some words
123
012334
23848484
a language
A language
004
005
007
0012
089
But what about a
Regular Language?
If you can decide if a “word”
is in a “language” by inspecting
its sequential “letters” in isolation
like
a bit like...
then it’s a
Regular Language
Isn’t everything regular?
Nope
for example
Palindromes are not Regular
aa
abba
abccba
abcddcba
abcdeedcba
So we call
a bit like...
Finite State Machine
or
Deterministic Finite Automaton
In 1956
proved that
a bit like...
is equivalent to
McCulloch
Neurosci
Pitts
Logician
He showed a Regular Language
can be defined using a
grammar with 3 operators
Concatenation
{"ab", "c"}{"d", "ef"}
= {"abd", "abef", "cd", "cef"}
Alternation
{"ab", "c"}|{"ab", "d", "ef"}
= {"ab", "c", "d", "ef"}
Kleene Star
{"ab", "c"}*
= {"", "ab", "c", "abab", "abc", "cab", "cc",
"ababab", "abcab", ... }.
Look familiar?
TADA!
A Regular Expression
defines a Regular Language
00(1|2|3|4|5|6|7|8|9)(0|1|2|3|4|5|6|7|8|9)*
00[1-9][0-9]*
00[1-9]d*
But hold up….
In 1956
didn’t mention computers in
could compute
he was considering
During WW2
so how did they end up
central to Computer Science?
Fast-forward to 1968
Ken Thomson
published
published
and introduced Regular
Expressions in his port of the
editor QED for CTSS
and the next year
wrote “ed”
Fast-forward to 1968
which is still part of
*nux today
It has the command
g/{some command}/p
g/re/p
grep
Then in the 80s
Larry Wall
created Perl
It has a further extended syntax
with features like
capturing subgroups
(d{5})(?:-(d{4}))?
backrefs
(.*)1
lookarounds
(?<=a)bcd
recursion
(w)(?:(?R)|w?)1
which is more
expressive and flexible
so this is the default in
Perl, Java, JS, Ruby, PHP, etc.
(*features may be missing from some implementations)
These RegEx aren’t always
equivalent to a
a bit like...
for example: Palindromes
in fact
in fact in the
Noam Chomsky
defined a hierarchy that
splits up the languages
Perl “RegEx” covers Context-Free Languages
(and some other ones too)
so...
“RegEx” ⊃ Regular Expression
What about today?
RegEx is the workhorse
of data extraction
from
Log collation
to
Web Scraping
infact
may generate a RegEx
when you train extractors
We wanted to try making this
more accessible, so we put it up
as a labs API
regexpgen.import.io
Let’s check it out...
Remember I said about
McCulloch
Neurosci
Pitts
Logician
Their paper had an enormous
impact on computer science
Even though they weren’t thinking
about computers at all
That paper not only
gave rise to RegEx
but also
every neural network since,
including
“Deep Learning”
using technology such as
Recurrent Neural Nets
using technology such as
using technology such as
and of course I have to mention
In fact at
we use neural nets for complex
data extraction tasks
where a rule based system, or
even ML, is simply not practical
such as
working out the name of a
company from their website
Let’s have a look...
I want to leave you with
a final thought...
When you are training an
extractor
and it generates a RegEx
that’s a Regular Expression
it’s defining a Regular Language
which can be detected by a
Finite State Machine
which is equivalent to a
a McCulloch-Pitts neural net
which blows my mind
Thank you
matthew.painter@import.io

More Related Content

Viewers also liked

P03 neural networks cvpr2012 deep learning methods for vision
P03 neural networks cvpr2012 deep learning methods for visionP03 neural networks cvpr2012 deep learning methods for vision
P03 neural networks cvpr2012 deep learning methods for visionzukun
 
Customer insights from telecom data using deep learning
Customer insights from telecom data using deep learning Customer insights from telecom data using deep learning
Customer insights from telecom data using deep learning Armando Vieira
 
Deep Belief nets
Deep Belief netsDeep Belief nets
Deep Belief netsbutest
 
Dsp U Lec06 The Z Transform And Its Application
Dsp U   Lec06 The Z Transform And Its ApplicationDsp U   Lec06 The Z Transform And Its Application
Dsp U Lec06 The Z Transform And Its Applicationtaha25
 
Dsp U Lec07 Realization Of Discrete Time Systems
Dsp U   Lec07 Realization Of Discrete Time SystemsDsp U   Lec07 Realization Of Discrete Time Systems
Dsp U Lec07 Realization Of Discrete Time Systemstaha25
 
Dsp U Lec05 The Z Transform
Dsp U   Lec05 The Z TransformDsp U   Lec05 The Z Transform
Dsp U Lec05 The Z Transformtaha25
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformAmr E. Mohamed
 
Les expressions téléphoniques
Les expressions téléphoniquesLes expressions téléphoniques
Les expressions téléphoniquesnanifuentes1
 
Deep Web
Deep WebDeep Web
Deep WebSt John
 
Stock Market Prediction using Hidden Markov Models and Investor sentiment
Stock Market Prediction using Hidden Markov Models and Investor sentimentStock Market Prediction using Hidden Markov Models and Investor sentiment
Stock Market Prediction using Hidden Markov Models and Investor sentimentPatrick Nicolas
 
Historia de la educacion
Historia de la educacionHistoria de la educacion
Historia de la educacionMarcela M.
 

Viewers also liked (16)

P03 neural networks cvpr2012 deep learning methods for vision
P03 neural networks cvpr2012 deep learning methods for visionP03 neural networks cvpr2012 deep learning methods for vision
P03 neural networks cvpr2012 deep learning methods for vision
 
Z transform
 Z transform Z transform
Z transform
 
Customer insights from telecom data using deep learning
Customer insights from telecom data using deep learning Customer insights from telecom data using deep learning
Customer insights from telecom data using deep learning
 
Deep Belief nets
Deep Belief netsDeep Belief nets
Deep Belief nets
 
Z transfrm ppt
Z transfrm pptZ transfrm ppt
Z transfrm ppt
 
Dsp U Lec06 The Z Transform And Its Application
Dsp U   Lec06 The Z Transform And Its ApplicationDsp U   Lec06 The Z Transform And Its Application
Dsp U Lec06 The Z Transform And Its Application
 
Dsp U Lec07 Realization Of Discrete Time Systems
Dsp U   Lec07 Realization Of Discrete Time SystemsDsp U   Lec07 Realization Of Discrete Time Systems
Dsp U Lec07 Realization Of Discrete Time Systems
 
Dsp U Lec05 The Z Transform
Dsp U   Lec05 The Z TransformDsp U   Lec05 The Z Transform
Dsp U Lec05 The Z Transform
 
DSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-TransformDSP_FOEHU - MATLAB 03 - The z-Transform
DSP_FOEHU - MATLAB 03 - The z-Transform
 
Z transform
Z transformZ transform
Z transform
 
z transforms
z transformsz transforms
z transforms
 
Les expressions téléphoniques
Les expressions téléphoniquesLes expressions téléphoniques
Les expressions téléphoniques
 
Andrew Ng, Chief Scientist at Baidu
Andrew Ng, Chief Scientist at BaiduAndrew Ng, Chief Scientist at Baidu
Andrew Ng, Chief Scientist at Baidu
 
Deep Web
Deep WebDeep Web
Deep Web
 
Stock Market Prediction using Hidden Markov Models and Investor sentiment
Stock Market Prediction using Hidden Markov Models and Investor sentimentStock Market Prediction using Hidden Markov Models and Investor sentiment
Stock Market Prediction using Hidden Markov Models and Investor sentiment
 
Historia de la educacion
Historia de la educacionHistoria de la educacion
Historia de la educacion
 

Similar to Neural nets: How regular expressions brought about deep learning

Lecture 2: Language
Lecture 2: LanguageLecture 2: Language
Lecture 2: LanguageDavid Evans
 
Natural Language Processing: Lecture 255
Natural Language Processing: Lecture 255Natural Language Processing: Lecture 255
Natural Language Processing: Lecture 255deffa5
 
An Incomplete Introduction to Artificial Intelligence
An Incomplete Introduction to Artificial IntelligenceAn Incomplete Introduction to Artificial Intelligence
An Incomplete Introduction to Artificial IntelligenceSteven Beeckman
 
Imperative programming
Imperative programmingImperative programming
Imperative programmingEdward Blurock
 
Natural Language Processing with Python
Natural Language Processing with PythonNatural Language Processing with Python
Natural Language Processing with PythonBenjamin Bengfort
 
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"Olga Lavrentieva
 
Functional OO programming (as part of the the PTT lecture)
Functional OO programming (as part of the the PTT lecture)Functional OO programming (as part of the the PTT lecture)
Functional OO programming (as part of the the PTT lecture)Ralf Laemmel
 
A Survey Of NP-Complete Puzzles
A Survey Of NP-Complete PuzzlesA Survey Of NP-Complete Puzzles
A Survey Of NP-Complete PuzzlesAndrew Molina
 
A History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdfA History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdfSohaib Roomi
 
Why Languages Matter 20090123
Why Languages Matter 20090123Why Languages Matter 20090123
Why Languages Matter 20090123David Wood
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingYasir Khan
 
Lecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfLecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfDeptii Chaudhari
 
Diving into Functional Programming
Diving into Functional ProgrammingDiving into Functional Programming
Diving into Functional ProgrammingLev Walkin
 

Similar to Neural nets: How regular expressions brought about deep learning (20)

Lecture 2: Language
Lecture 2: LanguageLecture 2: Language
Lecture 2: Language
 
Natural Language Processing: Lecture 255
Natural Language Processing: Lecture 255Natural Language Processing: Lecture 255
Natural Language Processing: Lecture 255
 
grammer genration
grammer genration grammer genration
grammer genration
 
An Incomplete Introduction to Artificial Intelligence
An Incomplete Introduction to Artificial IntelligenceAn Incomplete Introduction to Artificial Intelligence
An Incomplete Introduction to Artificial Intelligence
 
Logic Programming and ILP
Logic Programming and ILPLogic Programming and ILP
Logic Programming and ILP
 
Imperative programming
Imperative programmingImperative programming
Imperative programming
 
Natural Language Processing with Python
Natural Language Processing with PythonNatural Language Processing with Python
Natural Language Processing with Python
 
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
 
Functional OO programming (as part of the the PTT lecture)
Functional OO programming (as part of the the PTT lecture)Functional OO programming (as part of the the PTT lecture)
Functional OO programming (as part of the the PTT lecture)
 
A Survey Of NP-Complete Puzzles
A Survey Of NP-Complete PuzzlesA Survey Of NP-Complete Puzzles
A Survey Of NP-Complete Puzzles
 
A History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdfA History of Computer Programming Languages.pdf
A History of Computer Programming Languages.pdf
 
Why Languages Matter 20090123
Why Languages Matter 20090123Why Languages Matter 20090123
Why Languages Matter 20090123
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
intro.ppt
intro.pptintro.ppt
intro.ppt
 
Pascal programming language
Pascal programming languagePascal programming language
Pascal programming language
 
Algol60
Algol60Algol60
Algol60
 
Lecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdfLecture Notes-Are Natural Languages Regular.pdf
Lecture Notes-Are Natural Languages Regular.pdf
 
Parsing techniques
Parsing techniquesParsing techniques
Parsing techniques
 
IMPACT Final Conference - Katrien Depuydt
IMPACT Final Conference - Katrien DepuydtIMPACT Final Conference - Katrien Depuydt
IMPACT Final Conference - Katrien Depuydt
 
Diving into Functional Programming
Diving into Functional ProgrammingDiving into Functional Programming
Diving into Functional Programming
 

Recently uploaded

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Neural nets: How regular expressions brought about deep learning