SlideShare a Scribd company logo
1 of 14
John Blake
University of Aizu
Regular expressions for JavaScript
/bbetweenW+(?:w+W+){1,2}?tob/gi;
Pattern Modifier
Overview
02
Introduction
• Probabilistic parsing
• Rule-based pattern matching
• Regular expressions
Pedagogic examples
• Error detection / proofreading
• Annotating
• Pronunciation
Probabilistic parsing
03
• Dynamic algorithms
• Machine learning
• Training sets
(e.g. Stanford POS parser)
Extremely powerful, but
requires significant knowledge
of computational linguistics and
huge time investment so…
Rule-based pattern matching
04
1. There is a man on your left. T / F
If true, a man is on your left. Stop.
If false, proceed to 2.
2. There is a woman on your left. T / F
If true, there is a woman on your left. Stop.
If false, there is nobody on your left. Stop.
True/false statements
Rule-based pattern matching
05
Decision-tree algorithm
There is a man on your left.
There is a woman on your left.
No.Yes. STOP
Yes. STOP No.
There is nobody on your left. STOP
Assumptions:
1. Only adults are present
2. There is no third gender
Regular expressions (Regex)
06
There is a man. /bmanb/;
There is a woman. /bwomanb/;
The discrete words “man” and “woman” will
be identified, generating a “true” result.
Literal characters Special characters (meta & class)
(preceded by backslash )
b as in boy b boundary (of word)
s as in sun s space
I as in left I case insensitive (finds upper & lower case)
g as in green g greedy (finds all)
Regular expressions (Regex)
07
1. /help/
2. /bhelp/  – escape b – boundary
3. /bhelpb/
4. /bHelpb/
5. /bhelpb/i i – case insensitive
6. /bhelpb/g g – global (greedy)
7. /bhelpb/gi
8. /bgreyb/gi
9. /bgr(a|e)yb/gi | - pipe (Boolean “or”)
10. /bgr[ae]yb/gi
Regular expressions (Regex)
08
e.g. /bmaybeb/gi;
 – escape (from normal characters)
i – case insensitive
b – boundary
g – greedy (global)
1. I think that maybe he can understand. T/F
2. He may be able to understand T/F
3. Maybe, he can understand. T/F
4. Maybelline is a company name. T/F
5. Maybe, he said maybe. T/F
09
Proofreading
Target
• One of the + singular noun
Regex
• /bone of theb/gi;
Execute
• Check that the phrase one of the
is followed by a plural noun
Eg. 1
10
Difficult-to-read tags
Introduction Purpose Method Results Discussion
<segment features='problem;introduction;rhetorical_moves' state='active'>We
address the problem of model-based object recognition.</segment> <segment
features='purpose;rhetorical_moves' state='active'>Our aim is to localize and
recognize road vehicles from monocular images or videos in calibrated traffic
scenes.</segment> <segment features='method;rhetorical_moves' state='active'>A
3-D deformable vehicle model with 12 shape parameters is set up as prior
information, and its pose is determined by three parameters, which are its position
on the ground plane and its orientation about the vertical axis under ground-plane
constraints.</segment> <segment features='purpose;rhetorical_moves'
state='active'>An efficient local gradient-based method is proposed to evaluate the
fitness between the projection of the vehicle model and image data, which is
combined into a novel evolutionary computing framework to estimate the 12 shape
parameters and three pose parameters by iterative evolution.</segment> <segment
features='background;introduction;rhetorical_moves' state='active'>The recovery of
pose parameters achieves vehicle localization, whereas the shape parameters are
used for vehicle recognition.</segment> <segment
features='method;rhetorical_moves' state='active'>Numerous experiments are
Eg. 2
11
Difficult-to-read tags
Introduction Purpose Method Results Discussion
<segment features='problem;introduction;rhetorical_moves' state='active'>We
address the problem of model-based object recognition.</segment> <segment
features='purpose;rhetorical_moves' state='active'>Our aim is to localize and
recognize road vehicles from monocular images or videos in calibrated traffic
scenes.</segment> <segment features='method;rhetorical_moves' state='active'>A
3-D deformable vehicle model with 12 shape parameters is set up as prior
information, and its pose is determined by three parameters, which are its position
on the ground plane and its orientation about the vertical axis under ground-plane
constraints.</segment> <segment features='purpose;rhetorical_moves'
state='active'>An efficient local gradient-based method is proposed to evaluate the
fitness between the projection of the vehicle model and image data, which is
combined into a novel evolutionary computing framework to estimate the 12 shape
parameters and three pose parameters by iterative evolution.</segment> <segment
features='background;introduction;rhetorical_moves' state='active'>The recovery of
pose parameters achieves vehicle localization, whereas the shape parameters are
used for vehicle recognition.</segment> <segment
features='method;rhetorical_moves' state='active'>Numerous experiments are
Eg. 2
12
Easy-to-read tags
Introduction Purpose Method Results Discussion
Eg. 2
13
Regular “-ed”
False positives:
• learned /d/ /id/
Pron Preceeding sound Potential regex
/id/ d, t /[dt]edb/gi;
/t/ voiceless consonants /[sf]edb/gi;
/d/ voiced consonants /[zv]edb/gi;
/d/ Vowel /(ow|i|ay)edb/gi;
Pronunciation of “ed” is dictated by the sound of the preceeding letter(s).
| – Boolean “or”
so x|y means either x or y
d|ted means d or ted but by adding brackets
(d|t)ed means ded or ted
Eg. 3
14
Pronunciation of “th-”
Pron Feature Potential regex
/𝜽/ Voiceless initial th /bth/gi;
- This is the default.
/t/ th pronounced as t /bthomas|thames|thyme/gi;
- This deals with special cases
/𝜹/ Voiced initial th /btha(n|t) b/gi;
/bthe(m|y) b/gi;
/bth(eir|ere|ese|) b/gi;
/bthisb/gi;
/btho(se|ugh) b/gi;
/bthusb/gi;
- These covert /𝜽/ to /𝜹/
Pronunciation of “th” can be predicted by the rule that for function words
the initial th is pronounced as a voiced sound. These regex used in
sequence can annotate for many “th” sounds.
Eg. 4

More Related Content

What's hot

What's hot (20)

Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
 
Learn C# Programming - Variables & Constants
Learn C# Programming - Variables & ConstantsLearn C# Programming - Variables & Constants
Learn C# Programming - Variables & Constants
 
What is identifier c programming
What is identifier c programmingWhat is identifier c programming
What is identifier c programming
 
What are variables and keywords in c++
What are variables and keywords in c++What are variables and keywords in c++
What are variables and keywords in c++
 
C7 agramakirshnan2
C7 agramakirshnan2C7 agramakirshnan2
C7 agramakirshnan2
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
 
Structure and Enum in c#
Structure and Enum in c#Structure and Enum in c#
Structure and Enum in c#
 
Unusual C# - OOP
Unusual C# - OOPUnusual C# - OOP
Unusual C# - OOP
 
Basic of c language
Basic of c languageBasic of c language
Basic of c language
 
Jarrar: Subtype Relations and Constraints
Jarrar: Subtype Relations and ConstraintsJarrar: Subtype Relations and Constraints
Jarrar: Subtype Relations and Constraints
 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
 
Learn C# Programming - Operators
Learn C# Programming - OperatorsLearn C# Programming - Operators
Learn C# Programming - Operators
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction tools
 
C# Value Data Types and Reference Data Types
C# Value Data Types and Reference Data TypesC# Value Data Types and Reference Data Types
C# Value Data Types and Reference Data Types
 
Anandkumar novel approach
Anandkumar novel approachAnandkumar novel approach
Anandkumar novel approach
 
Spreadsheets & applications software
Spreadsheets & applications softwareSpreadsheets & applications software
Spreadsheets & applications software
 
Edwin..
Edwin..Edwin..
Edwin..
 
Lec9
Lec9Lec9
Lec9
 
OOP in C#
OOP in C#OOP in C#
OOP in C#
 
5 introduction-to-c
5 introduction-to-c5 introduction-to-c
5 introduction-to-c
 

Similar to Regular expressions for JavaScript

Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Simplilearn
 
Wso2datasciencesummerschool20151 150714180825-lva1-app6892
Wso2datasciencesummerschool20151 150714180825-lva1-app6892Wso2datasciencesummerschool20151 150714180825-lva1-app6892
Wso2datasciencesummerschool20151 150714180825-lva1-app6892
WSO2
 
The California Supreme Court ruled that an employer will be liable.docx
The California Supreme Court ruled that an employer will be liable.docxThe California Supreme Court ruled that an employer will be liable.docx
The California Supreme Court ruled that an employer will be liable.docx
mehek4
 
Resume_Clasification.pptx
Resume_Clasification.pptxResume_Clasification.pptx
Resume_Clasification.pptx
MOINDALVS
 
Lecture 01 frank dellaert - 3 d reconstruction and mapping: a factor graph ...
Lecture 01   frank dellaert - 3 d reconstruction and mapping: a factor graph ...Lecture 01   frank dellaert - 3 d reconstruction and mapping: a factor graph ...
Lecture 01 frank dellaert - 3 d reconstruction and mapping: a factor graph ...
mustafa sarac
 
SPA Architecture Basics - Colombo JS meetup
SPA Architecture Basics - Colombo JS meetupSPA Architecture Basics - Colombo JS meetup
SPA Architecture Basics - Colombo JS meetup
Hasith Yaggahavita
 
Resume_Clasification.pptx
Resume_Clasification.pptxResume_Clasification.pptx
Resume_Clasification.pptx
MOINDALVS
 

Similar to Regular expressions for JavaScript (20)

Pedagogic application of regular expressions
Pedagogic application of regular expressionsPedagogic application of regular expressions
Pedagogic application of regular expressions
 
Loan Eligibility Checker
Loan Eligibility CheckerLoan Eligibility Checker
Loan Eligibility Checker
 
scrib.pptx
scrib.pptxscrib.pptx
scrib.pptx
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
 
The Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming ConceptsThe Three Basic Selection Structures in C++ Programming Concepts
The Three Basic Selection Structures in C++ Programming Concepts
 
Minimal Introduction to C++ - Part II
Minimal Introduction to C++ - Part IIMinimal Introduction to C++ - Part II
Minimal Introduction to C++ - Part II
 
Introduction to Data Science and Analytics
Introduction to Data Science and AnalyticsIntroduction to Data Science and Analytics
Introduction to Data Science and Analytics
 
Wso2datasciencesummerschool20151 150714180825-lva1-app6892
Wso2datasciencesummerschool20151 150714180825-lva1-app6892Wso2datasciencesummerschool20151 150714180825-lva1-app6892
Wso2datasciencesummerschool20151 150714180825-lva1-app6892
 
The California Supreme Court ruled that an employer will be liable.docx
The California Supreme Court ruled that an employer will be liable.docxThe California Supreme Court ruled that an employer will be liable.docx
The California Supreme Court ruled that an employer will be liable.docx
 
Use Model-Based Testing to Navigate the Software Forest
Use Model-Based Testing to Navigate the Software ForestUse Model-Based Testing to Navigate the Software Forest
Use Model-Based Testing to Navigate the Software Forest
 
Top 100+ Google Data Science Interview Questions.pdf
Top 100+ Google Data Science Interview Questions.pdfTop 100+ Google Data Science Interview Questions.pdf
Top 100+ Google Data Science Interview Questions.pdf
 
Imitation Learning and Direct Perception for Autonomous Driving
Imitation Learning and Direct Perception for Autonomous DrivingImitation Learning and Direct Perception for Autonomous Driving
Imitation Learning and Direct Perception for Autonomous Driving
 
Resume_Clasification.pptx
Resume_Clasification.pptxResume_Clasification.pptx
Resume_Clasification.pptx
 
Airline delay prediction
Airline delay predictionAirline delay prediction
Airline delay prediction
 
Lecture 01 frank dellaert - 3 d reconstruction and mapping: a factor graph ...
Lecture 01   frank dellaert - 3 d reconstruction and mapping: a factor graph ...Lecture 01   frank dellaert - 3 d reconstruction and mapping: a factor graph ...
Lecture 01 frank dellaert - 3 d reconstruction and mapping: a factor graph ...
 
OOP Lecture 01.pptx
OOP Lecture 01.pptxOOP Lecture 01.pptx
OOP Lecture 01.pptx
 
SPA Architecture Basics - Colombo JS meetup
SPA Architecture Basics - Colombo JS meetupSPA Architecture Basics - Colombo JS meetup
SPA Architecture Basics - Colombo JS meetup
 
GANs for Anti Money Laundering
GANs for Anti Money LaunderingGANs for Anti Money Laundering
GANs for Anti Money Laundering
 
Railway Reservation system Case study of oracle db by cj date
Railway Reservation system Case study of oracle db by cj dateRailway Reservation system Case study of oracle db by cj date
Railway Reservation system Case study of oracle db by cj date
 
Resume_Clasification.pptx
Resume_Clasification.pptxResume_Clasification.pptx
Resume_Clasification.pptx
 

More from john6938

More from john6938 (20)

Social Media Ethics.pptx
Social Media Ethics.pptxSocial Media Ethics.pptx
Social Media Ethics.pptx
 
Future of Information Ethics.pptx
Future of Information Ethics.pptxFuture of Information Ethics.pptx
Future of Information Ethics.pptx
 
Bioethics.pptx
Bioethics.pptxBioethics.pptx
Bioethics.pptx
 
Surveillance and security.pptx
Surveillance and security.pptxSurveillance and security.pptx
Surveillance and security.pptx
 
Introduction to Expert Systems.pptx
Introduction to Expert Systems.pptxIntroduction to Expert Systems.pptx
Introduction to Expert Systems.pptx
 
Starbuck.pptx
Starbuck.pptxStarbuck.pptx
Starbuck.pptx
 
Unit 4 Problem breakdown.pptx
Unit 4 Problem breakdown.pptxUnit 4 Problem breakdown.pptx
Unit 4 Problem breakdown.pptx
 
Image_recognition.pptx
Image_recognition.pptxImage_recognition.pptx
Image_recognition.pptx
 
Algorithms.pptx
Algorithms.pptxAlgorithms.pptx
Algorithms.pptx
 
Artificial_intelligence.pptx
Artificial_intelligence.pptxArtificial_intelligence.pptx
Artificial_intelligence.pptx
 
Image_generation.pptx
Image_generation.pptxImage_generation.pptx
Image_generation.pptx
 
Computer_Graphics.pptx
Computer_Graphics.pptxComputer_Graphics.pptx
Computer_Graphics.pptx
 
Security.pptx
Security.pptxSecurity.pptx
Security.pptx
 
Gravitational_wave_detection.pptx
Gravitational_wave_detection.pptxGravitational_wave_detection.pptx
Gravitational_wave_detection.pptx
 
Embedded_Systems.pptx
Embedded_Systems.pptxEmbedded_Systems.pptx
Embedded_Systems.pptx
 
Software_engineering.pptx
Software_engineering.pptxSoftware_engineering.pptx
Software_engineering.pptx
 
Quantum_computers.pptx
Quantum_computers.pptxQuantum_computers.pptx
Quantum_computers.pptx
 
NLP.pptx
NLP.pptxNLP.pptx
NLP.pptx
 
Sensors_SLAM.pptx
Sensors_SLAM.pptxSensors_SLAM.pptx
Sensors_SLAM.pptx
 
Maths.pptx
Maths.pptxMaths.pptx
Maths.pptx
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 

Regular expressions for JavaScript

  • 1. John Blake University of Aizu Regular expressions for JavaScript /bbetweenW+(?:w+W+){1,2}?tob/gi; Pattern Modifier
  • 2. Overview 02 Introduction • Probabilistic parsing • Rule-based pattern matching • Regular expressions Pedagogic examples • Error detection / proofreading • Annotating • Pronunciation
  • 3. Probabilistic parsing 03 • Dynamic algorithms • Machine learning • Training sets (e.g. Stanford POS parser) Extremely powerful, but requires significant knowledge of computational linguistics and huge time investment so…
  • 4. Rule-based pattern matching 04 1. There is a man on your left. T / F If true, a man is on your left. Stop. If false, proceed to 2. 2. There is a woman on your left. T / F If true, there is a woman on your left. Stop. If false, there is nobody on your left. Stop. True/false statements
  • 5. Rule-based pattern matching 05 Decision-tree algorithm There is a man on your left. There is a woman on your left. No.Yes. STOP Yes. STOP No. There is nobody on your left. STOP Assumptions: 1. Only adults are present 2. There is no third gender
  • 6. Regular expressions (Regex) 06 There is a man. /bmanb/; There is a woman. /bwomanb/; The discrete words “man” and “woman” will be identified, generating a “true” result. Literal characters Special characters (meta & class) (preceded by backslash ) b as in boy b boundary (of word) s as in sun s space I as in left I case insensitive (finds upper & lower case) g as in green g greedy (finds all)
  • 7. Regular expressions (Regex) 07 1. /help/ 2. /bhelp/ – escape b – boundary 3. /bhelpb/ 4. /bHelpb/ 5. /bhelpb/i i – case insensitive 6. /bhelpb/g g – global (greedy) 7. /bhelpb/gi 8. /bgreyb/gi 9. /bgr(a|e)yb/gi | - pipe (Boolean “or”) 10. /bgr[ae]yb/gi
  • 8. Regular expressions (Regex) 08 e.g. /bmaybeb/gi; – escape (from normal characters) i – case insensitive b – boundary g – greedy (global) 1. I think that maybe he can understand. T/F 2. He may be able to understand T/F 3. Maybe, he can understand. T/F 4. Maybelline is a company name. T/F 5. Maybe, he said maybe. T/F
  • 9. 09 Proofreading Target • One of the + singular noun Regex • /bone of theb/gi; Execute • Check that the phrase one of the is followed by a plural noun Eg. 1
  • 10. 10 Difficult-to-read tags Introduction Purpose Method Results Discussion <segment features='problem;introduction;rhetorical_moves' state='active'>We address the problem of model-based object recognition.</segment> <segment features='purpose;rhetorical_moves' state='active'>Our aim is to localize and recognize road vehicles from monocular images or videos in calibrated traffic scenes.</segment> <segment features='method;rhetorical_moves' state='active'>A 3-D deformable vehicle model with 12 shape parameters is set up as prior information, and its pose is determined by three parameters, which are its position on the ground plane and its orientation about the vertical axis under ground-plane constraints.</segment> <segment features='purpose;rhetorical_moves' state='active'>An efficient local gradient-based method is proposed to evaluate the fitness between the projection of the vehicle model and image data, which is combined into a novel evolutionary computing framework to estimate the 12 shape parameters and three pose parameters by iterative evolution.</segment> <segment features='background;introduction;rhetorical_moves' state='active'>The recovery of pose parameters achieves vehicle localization, whereas the shape parameters are used for vehicle recognition.</segment> <segment features='method;rhetorical_moves' state='active'>Numerous experiments are Eg. 2
  • 11. 11 Difficult-to-read tags Introduction Purpose Method Results Discussion <segment features='problem;introduction;rhetorical_moves' state='active'>We address the problem of model-based object recognition.</segment> <segment features='purpose;rhetorical_moves' state='active'>Our aim is to localize and recognize road vehicles from monocular images or videos in calibrated traffic scenes.</segment> <segment features='method;rhetorical_moves' state='active'>A 3-D deformable vehicle model with 12 shape parameters is set up as prior information, and its pose is determined by three parameters, which are its position on the ground plane and its orientation about the vertical axis under ground-plane constraints.</segment> <segment features='purpose;rhetorical_moves' state='active'>An efficient local gradient-based method is proposed to evaluate the fitness between the projection of the vehicle model and image data, which is combined into a novel evolutionary computing framework to estimate the 12 shape parameters and three pose parameters by iterative evolution.</segment> <segment features='background;introduction;rhetorical_moves' state='active'>The recovery of pose parameters achieves vehicle localization, whereas the shape parameters are used for vehicle recognition.</segment> <segment features='method;rhetorical_moves' state='active'>Numerous experiments are Eg. 2
  • 12. 12 Easy-to-read tags Introduction Purpose Method Results Discussion Eg. 2
  • 13. 13 Regular “-ed” False positives: • learned /d/ /id/ Pron Preceeding sound Potential regex /id/ d, t /[dt]edb/gi; /t/ voiceless consonants /[sf]edb/gi; /d/ voiced consonants /[zv]edb/gi; /d/ Vowel /(ow|i|ay)edb/gi; Pronunciation of “ed” is dictated by the sound of the preceeding letter(s). | – Boolean “or” so x|y means either x or y d|ted means d or ted but by adding brackets (d|t)ed means ded or ted Eg. 3
  • 14. 14 Pronunciation of “th-” Pron Feature Potential regex /𝜽/ Voiceless initial th /bth/gi; - This is the default. /t/ th pronounced as t /bthomas|thames|thyme/gi; - This deals with special cases /𝜹/ Voiced initial th /btha(n|t) b/gi; /bthe(m|y) b/gi; /bth(eir|ere|ese|) b/gi; /bthisb/gi; /btho(se|ugh) b/gi; /bthusb/gi; - These covert /𝜽/ to /𝜹/ Pronunciation of “th” can be predicted by the rule that for function words the initial th is pronounced as a voiced sound. These regex used in sequence can annotate for many “th” sounds. Eg. 4