SlideShare uma empresa Scribd logo
1 de 32
Designing a NLP based
Multipurpose Javascript Extension
#FrontConf alain.lompo@senacor.com #alainlompo
About me
 Alain Lompo
 Software developer at Senacor
 Working on eBanking agile projects
 Currently using
Java/JEE or Spring boot in the backend
Angular/React on the frontend (with javascript of course)
Worked a lot previously with .Net technologies
MCSD .Net / MCT, …
Also old times MVP (Windows System / Biztalk Server),
Plan
Motivation
The javascript phenomenon:
How to build a javascript extension
Natural language processing: core concepts
Demo
Deep learning and neural networks in javascript
Demo
Wrapping up
Motivation
 It would be awesome to be able to communicate precise
intent to our IDE or Webapp through natural language
instructions
 Wether they come through text typing or vocal commands
 It could make of programming in general and web development
in particular a more attractive discipline
 Productive level software development would be accessible to
more disabled people
 …
The javascript phenomenon
 Javascript is taking over everything
 They nevertheless hate it…?
 Syndrome of Stockholm?
 Is javascript still weird?
Javascript is taking over everything
I ran a software business for a couple of years. I got bought and
Right now I am developing the very product I used to sell. My former
Employees put AngularJs and Node.js in there. I remember my conversation
3 years ago with my best engineer. he said that javascript was taking over
Everything. I though „Wow. They managed to fix that horrible language“
Javascript is taking over everything
They nevertheless hate it…?
At my new company, everyone was pretending that JS was alright.
I got tired and spoke up. Turns out, deep down they all hated JS,
it was just crowd thinking. Now they all hate JS.
And we’re waiting impatiently for Web Assembly.
Stockholm syndrome…?
Of all the supportive messages I’ve received over the years,
this is one of my favourites. It confirms what I knew all along:
that JavaScript programmers have been mind-fucked
into thinking that JavaScript is a good programming language.
The president speaks of “mass psychosis”
and “crowd thinking” but I’ve used the analogy of Stockholm syndrome
and cult psychology. Think Patty Hearst and Scientology.
Is javascript still weird?
 YES !!!
 Fail silently at runtime
 Callback hell (worked around with promises)
 Weak typing
 And many more… (https://github.com/denysdovhan/wtfjs)
 But constantly improving
 Jslint, Eslint, Tslint and similar linters…
 The use of new libraries that help reduce the weirdness
 The improvements from the last standard releases of javascripts
 And many more… (https://github.com/sorrycc/awesome-javascript)
How to build a js extension
 How easy is that?
 Major goals of an extension
 Using functions and templates
How easy is that?
 It can be very easy with a little bit of discipline
 The DOM manipulations capabilities make the language
powerful
 Allmost everything can be achieved with pure javascript
functionalities
Major goals of an extension
 Zero external dependencies (as less as possible otherwise)
 Reusability and easy to use
 Efficiency (minimal size and processing load)
DOM manipulation abilities
// Listening to events
document.getElementById("viewerId").addEventListener
("click", this.viewerZoomIn);
// Dynamically update any attribute of any element
document.getElementById("previewerId").src = ...
// Directly enrich html content
var firstLevelHeading =
document.createElement("h1");
var headingText = document.createTextNode("Bird eye
preview");
firstLevelHeading.appendChild(headingText);
document.body.appendChild(firstLevelHeading);
NLP core concepts
NLP is not a theory but rather a model
It is a generative and not a repair model
It strives to detect the structure behind human language
To the contrary to the human conscious mind, modern CPUs
are potentially limitless (availability of computational power)
The challenge of ambiguity
 It originates from
 Words with multiple definitions (the same word means
something else depending on the context)
 Long sentences
Structuring the language
 Uses the parse (or syntactic) tree
 Originates in generative grammar
 Sentences in any language are being generated by a set of rules
 Any grammatical sentence can be generated by these rules
 Any non – grammatical sentence weren’t and can’t be generated by them
Structuring the language…
S
N
the N
cat
V
ran
PV
in N
the N
kitchen
DEMOS
The power of compromise
Deep learning and neural networks in javascript
 Deep learning and javascript should go hand in hand
 Javascript is crossplatform, therefore deep learning apps
will run on more platforms
Will reach a wider audience
Will become more visual and interactive
Will benefit from one of the biggest realistic data source
possible
 On the other hand, deep learning
Will help make web apps more (artificially…) intelligent
More advantages of web deep learning
Reduced server costs
Lowered inference latency
Data privacy
Instant GPU acceleration
Instant access (no complex or constraining setup required)
Deep learning
Neural networks
Machine learning
Artificial intelligence
Symbolic AI
Kernel methods
Decision trees
Shallow
Neural
Network
…
…
Machine learning Venn diagram
The machine learning paradigm
Training Inference
Training phase Inference phase
Data
Answers
Model architecture
Rules
New data
Answer
General approach
 Reading/Training dataset
 Defining the neural network architecture
 Defining the loss function and optimiser method
 Training the neural network based on data batches
 Evaluating the performances over the test data
Demo
Azure text analytics
Demos (wit.ai)
Wrapping up
 Javascript has come a long way from its initial design and
intent
 It is now one of the most popular programming language
 Though it retains many of its original flaws/weirdness it is
made stronger by a very strong open source community
 Being cross platform and offering a huge amount of real life
datas, it is a perfect fit for deep learning
Wrapping up
 Already many extensions are provided by the community to
allow NLP with javascript such as:
Compromise
Superscriptjs
Dialogflow
Azure text analytics
Retextjs
Opennlp (with its nodejs wrapper: node opennlp)
THANK YOU !
QUESTIONS ?
Resources
 https://github.com/spencermountain/compromise
 https://github.com/superscriptjs/superscript
 https://github.com/superscriptjs/superscript/wiki/Installing
 https://github.com/silentrob/hello-superscript
 http://kmtabish.com/articles/NLP/
 https://github.com/tensorflow/tfjs-examples.git
 www.superscriptjs.com
 https://github.com/superscriptjs/superscript
 https://dialogflow.com
 https://github.com/retextjs/retext
 https://spacy.io
 https://github.com/NaturalNode/natural
Resources
 Citations from: https://hackernoon.com/the-javascript-phenomenon-is-a-mass-psychosis-
57adebb09359
 https://wit.ai/getting-started

Mais conteúdo relacionado

Semelhante a Designing nlp-js-extension

Resisting The Feature Creature
Resisting The Feature CreatureResisting The Feature Creature
Resisting The Feature CreatureChristian Heilmann
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdminsPuppet
 
Deep Learning: Application Landscape - March 2018
Deep Learning: Application Landscape - March 2018Deep Learning: Application Landscape - March 2018
Deep Learning: Application Landscape - March 2018Grigory Sapunov
 
Dl applicationlandscape-mar2018-180405144127
Dl applicationlandscape-mar2018-180405144127Dl applicationlandscape-mar2018-180405144127
Dl applicationlandscape-mar2018-180405144127Aravindharamanan S
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDave Malouf
 
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community SupportWilliam Grosso
 
From 🤦 to 🐿️
From 🤦 to 🐿️From 🤦 to 🐿️
From 🤦 to 🐿️Ori Pekelman
 
The Next Generation of Flash User Experience
The Next Generation of Flash User ExperienceThe Next Generation of Flash User Experience
The Next Generation of Flash User ExperienceKevin Suttle
 
building intelligent systems with large scale deep learning
building intelligent systems with large scale deep learningbuilding intelligent systems with large scale deep learning
building intelligent systems with large scale deep learningmustafa sarac
 
Designing A Project Using Java Programming
Designing A Project Using Java ProgrammingDesigning A Project Using Java Programming
Designing A Project Using Java ProgrammingKaty Allen
 
Java Programming
Java ProgrammingJava Programming
Java ProgrammingTracy Clark
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015Christopher Curtin
 
Deep Learning and the state of AI / 2016
Deep Learning and the state of AI / 2016Deep Learning and the state of AI / 2016
Deep Learning and the state of AI / 2016Grigory Sapunov
 
Designing Powerful Web Applications - Monterey
Designing Powerful Web Applications - MontereyDesigning Powerful Web Applications - Monterey
Designing Powerful Web Applications - MontereyDave Malouf
 
Notes on Simulation and GHDL
Notes on Simulation and GHDLNotes on Simulation and GHDL
Notes on Simulation and GHDLDIlawar Singh
 

Semelhante a Designing nlp-js-extension (20)

Resisting The Feature Creature
Resisting The Feature CreatureResisting The Feature Creature
Resisting The Feature Creature
 
Enterprise TypeScript
Enterprise TypeScriptEnterprise TypeScript
Enterprise TypeScript
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdmins
 
Java Day Brochure
Java Day BrochureJava Day Brochure
Java Day Brochure
 
Deep Learning: Application Landscape - March 2018
Deep Learning: Application Landscape - March 2018Deep Learning: Application Landscape - March 2018
Deep Learning: Application Landscape - March 2018
 
Dl applicationlandscape-mar2018-180405144127
Dl applicationlandscape-mar2018-180405144127Dl applicationlandscape-mar2018-180405144127
Dl applicationlandscape-mar2018-180405144127
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
 
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community Support
 
From 🤦 to 🐿️
From 🤦 to 🐿️From 🤦 to 🐿️
From 🤦 to 🐿️
 
The Next Generation of Flash User Experience
The Next Generation of Flash User ExperienceThe Next Generation of Flash User Experience
The Next Generation of Flash User Experience
 
building intelligent systems with large scale deep learning
building intelligent systems with large scale deep learningbuilding intelligent systems with large scale deep learning
building intelligent systems with large scale deep learning
 
All of javascript
All of javascriptAll of javascript
All of javascript
 
Designing A Project Using Java Programming
Designing A Project Using Java ProgrammingDesigning A Project Using Java Programming
Designing A Project Using Java Programming
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Make Tools
Make ToolsMake Tools
Make Tools
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
 
01.intro
01.intro01.intro
01.intro
 
Deep Learning and the state of AI / 2016
Deep Learning and the state of AI / 2016Deep Learning and the state of AI / 2016
Deep Learning and the state of AI / 2016
 
Designing Powerful Web Applications - Monterey
Designing Powerful Web Applications - MontereyDesigning Powerful Web Applications - Monterey
Designing Powerful Web Applications - Monterey
 
Notes on Simulation and GHDL
Notes on Simulation and GHDLNotes on Simulation and GHDL
Notes on Simulation and GHDL
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Designing nlp-js-extension

  • 1. Designing a NLP based Multipurpose Javascript Extension #FrontConf alain.lompo@senacor.com #alainlompo
  • 2. About me  Alain Lompo  Software developer at Senacor  Working on eBanking agile projects  Currently using Java/JEE or Spring boot in the backend Angular/React on the frontend (with javascript of course) Worked a lot previously with .Net technologies MCSD .Net / MCT, … Also old times MVP (Windows System / Biztalk Server),
  • 3. Plan Motivation The javascript phenomenon: How to build a javascript extension Natural language processing: core concepts Demo Deep learning and neural networks in javascript Demo Wrapping up
  • 4. Motivation  It would be awesome to be able to communicate precise intent to our IDE or Webapp through natural language instructions  Wether they come through text typing or vocal commands  It could make of programming in general and web development in particular a more attractive discipline  Productive level software development would be accessible to more disabled people  …
  • 5. The javascript phenomenon  Javascript is taking over everything  They nevertheless hate it…?  Syndrome of Stockholm?  Is javascript still weird?
  • 6. Javascript is taking over everything I ran a software business for a couple of years. I got bought and Right now I am developing the very product I used to sell. My former Employees put AngularJs and Node.js in there. I remember my conversation 3 years ago with my best engineer. he said that javascript was taking over Everything. I though „Wow. They managed to fix that horrible language“
  • 7. Javascript is taking over everything
  • 8. They nevertheless hate it…? At my new company, everyone was pretending that JS was alright. I got tired and spoke up. Turns out, deep down they all hated JS, it was just crowd thinking. Now they all hate JS. And we’re waiting impatiently for Web Assembly.
  • 9. Stockholm syndrome…? Of all the supportive messages I’ve received over the years, this is one of my favourites. It confirms what I knew all along: that JavaScript programmers have been mind-fucked into thinking that JavaScript is a good programming language. The president speaks of “mass psychosis” and “crowd thinking” but I’ve used the analogy of Stockholm syndrome and cult psychology. Think Patty Hearst and Scientology.
  • 10. Is javascript still weird?  YES !!!  Fail silently at runtime  Callback hell (worked around with promises)  Weak typing  And many more… (https://github.com/denysdovhan/wtfjs)  But constantly improving  Jslint, Eslint, Tslint and similar linters…  The use of new libraries that help reduce the weirdness  The improvements from the last standard releases of javascripts  And many more… (https://github.com/sorrycc/awesome-javascript)
  • 11. How to build a js extension  How easy is that?  Major goals of an extension  Using functions and templates
  • 12. How easy is that?  It can be very easy with a little bit of discipline  The DOM manipulations capabilities make the language powerful  Allmost everything can be achieved with pure javascript functionalities
  • 13. Major goals of an extension  Zero external dependencies (as less as possible otherwise)  Reusability and easy to use  Efficiency (minimal size and processing load)
  • 14. DOM manipulation abilities // Listening to events document.getElementById("viewerId").addEventListener ("click", this.viewerZoomIn); // Dynamically update any attribute of any element document.getElementById("previewerId").src = ... // Directly enrich html content var firstLevelHeading = document.createElement("h1"); var headingText = document.createTextNode("Bird eye preview"); firstLevelHeading.appendChild(headingText); document.body.appendChild(firstLevelHeading);
  • 15. NLP core concepts NLP is not a theory but rather a model It is a generative and not a repair model It strives to detect the structure behind human language To the contrary to the human conscious mind, modern CPUs are potentially limitless (availability of computational power)
  • 16. The challenge of ambiguity  It originates from  Words with multiple definitions (the same word means something else depending on the context)  Long sentences
  • 17. Structuring the language  Uses the parse (or syntactic) tree  Originates in generative grammar  Sentences in any language are being generated by a set of rules  Any grammatical sentence can be generated by these rules  Any non – grammatical sentence weren’t and can’t be generated by them
  • 18. Structuring the language… S N the N cat V ran PV in N the N kitchen
  • 19. DEMOS The power of compromise
  • 20. Deep learning and neural networks in javascript  Deep learning and javascript should go hand in hand  Javascript is crossplatform, therefore deep learning apps will run on more platforms Will reach a wider audience Will become more visual and interactive Will benefit from one of the biggest realistic data source possible  On the other hand, deep learning Will help make web apps more (artificially…) intelligent
  • 21. More advantages of web deep learning Reduced server costs Lowered inference latency Data privacy Instant GPU acceleration Instant access (no complex or constraining setup required)
  • 22. Deep learning Neural networks Machine learning Artificial intelligence Symbolic AI Kernel methods Decision trees Shallow Neural Network … … Machine learning Venn diagram
  • 23. The machine learning paradigm Training Inference Training phase Inference phase Data Answers Model architecture Rules New data Answer
  • 24. General approach  Reading/Training dataset  Defining the neural network architecture  Defining the loss function and optimiser method  Training the neural network based on data batches  Evaluating the performances over the test data
  • 27. Wrapping up  Javascript has come a long way from its initial design and intent  It is now one of the most popular programming language  Though it retains many of its original flaws/weirdness it is made stronger by a very strong open source community  Being cross platform and offering a huge amount of real life datas, it is a perfect fit for deep learning
  • 28. Wrapping up  Already many extensions are provided by the community to allow NLP with javascript such as: Compromise Superscriptjs Dialogflow Azure text analytics Retextjs Opennlp (with its nodejs wrapper: node opennlp)
  • 31. Resources  https://github.com/spencermountain/compromise  https://github.com/superscriptjs/superscript  https://github.com/superscriptjs/superscript/wiki/Installing  https://github.com/silentrob/hello-superscript  http://kmtabish.com/articles/NLP/  https://github.com/tensorflow/tfjs-examples.git  www.superscriptjs.com  https://github.com/superscriptjs/superscript  https://dialogflow.com  https://github.com/retextjs/retext  https://spacy.io  https://github.com/NaturalNode/natural
  • 32. Resources  Citations from: https://hackernoon.com/the-javascript-phenomenon-is-a-mass-psychosis- 57adebb09359  https://wit.ai/getting-started