SlideShare a Scribd company logo
John Blake
Japan Advanced Institute of Science and Technology
Pedagogic application
of regular expressions
/bbetweenW+(?:w+W+){1,2}?tob/gi;
Overview
02
Introduction
โ€ข Probabilistic parsing
โ€ข Rule-based pattern matching
โ€ข Regular expressions
Pedagogic applications
โ€ข Modality detector
โ€ข Error detector
โ€ข Other: tagged corpora, pronunciation of โ€œedโ€
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
Rule-based pattern matching
06
There is a man. /bmanb/;
There is a woman. /bwomanb/;
Regular expressions (regexp|regex)
The discrete words โ€œmanโ€ and โ€œwomanโ€ will
be identified, generating a โ€œtrueโ€ result.
Regular expressions (Regex)
07
e.g. /bmaybeb/gi;
 โ€“ escape (from normal characters)
i โ€“ case insensitive
b โ€“ boundary
g โ€“ greedy
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
Pedagogic applications
08
Modality detector
Online error detectors
- Common error detector (Morrall, 2000-14)
- Corpus-based error detector (Blake, 2012-15)
Other applications
- Annotation highlighter
- Ideas for pronunciation, grammar and vocab
09
Situation
App. 1
Students
graduate students, researchers
Aim
write research articles
Problems
lack of familiarity of genre,
lack of language,
lack of content.
10
Tentative language
& approximation
Type Examples
Modal verbs may, might, would, can
Lexical verbs seem, appear, suggest
Modal adverbs perhaps, probably, possibly,
Modal adjectives probable, possible, uncertain
Modal nouns assumption, claim, possibility
# Approximation
49% Almost a half, nearly 50%, less than 1 in 2
App. 1
11
Material mismatch
Students from different faculties studying
tentative language (hedging) and
approximation in academic writing use
generic materials prepared by teacher.
App. 1
12
Lack of face validity
Some students do not want to โ€œwaste
timeโ€ dealing with materials not
appropriate to their major. They expect
materials tailored to their exact needs.
App. 1
13
Solution: Modality detector
App. 1
14
Solution: Modality detector
Individualized instruction
โ€ข Student selects appropriate text
โ€ข Student inputs relevant text
โ€ข Regex identifies hedges & approximation
โ€ข Execute command labels & highlights
App. 1
15
Warning: False positives
More complex regex reduce false positives
App. 1
16
Piles of unmarked homework
Responding to written work takes too
much time, and is repetitive since many
students make the same surface-level
mistakes.
App. 2
17
No time to respond
Teachers are expected to:
โ€ข Identify the location of errors
โ€ข Explain the errors (if necessary)
โ€ข Correct the errors (if necessary)
All of which take lots of time.
App. 2
18
Solution: Error detector
Identification
Student inputs own work
Regex identifies expected errors
Explanation
Execute command selects and displays
prepared explanation
Correction
Student corrects work and submits
improved version
App. 2
19
Error classification
App. 2
Type Description
Accuracy factual and language errors
Brevity too many words
Clarity vague or ambiguous terms
Objectivity emotive language
Formality abbreviations, contractions, &
informal terms
An ethnographic survey of the literature on writing scientific research articles
revealed five key criteria (Blake & Blake, 2015)
20
App. 2
21
Specific example
Error
โ€ข One of the + singular noun
Regex
โ€ข /bone of theb/gi;
Execute
โ€ข Check that the phrase one of the
is followed by a plural noun
App. 2
22
False positives harnessed in learning
process by forcing student engagement
App. 2
23
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
App. 3
24
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
App. 3
25
Easy-to-read tags
Introduction Purpose Method Results Discussion
http://www.jaist.ac.jp/~johnb/Movehighlighter.html
App. 3
26
Ideas for you and your students
Pronunciation: Regular โ€œedโ€
โ€ข Regular โ€œedโ€ /t/, /d/, /id/
โ€ข th [voiced or voiceless]
Grammar:
โ€ข Tenses: e.g. perfect continuous: been + ing
โ€ข Quantifiers : [U] much, little; [C] many, few; [U/C] lots of , a lot of
Vocabulary:
โ€ข Colours: red, blue crimson red, cobalt blue,
โ€ข Body parts: hand, eyes, leg hand out, eye up, leg it
27
Regular โ€œedโ€
False positives:
โ€ข learned /d/ /id/
Pron Preceeding sound Potential regex
/id/ d, t /(d|t)edb/gi;
/t/ voiceless consonants /(s|f)edb/gi;
/d/ voiced consonants /(z|v)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
28
Pronunciation of โ€œthโ€
Pron Feature Potential regex
/๐œน/ Voiced initial th /btha(n|t|) b/gi;
/bthe(b|ir|m|re|se|y) b/gi;
/bthisb/gi;
/btho(se|ugh|) b/gi;
/bthusb/gi;
/๐œฝ/ Voiceless initial th /bth/gi;
/t/ th pronounced as t /bthomas|thames|thyme/gi;
Pronunciation of โ€œthโ€ can be predicted by the law that for function words
the initial th is pronounced as a voiced sound.
References
29
Blake, J. (2012, November 28-30). Corpus-based academic written error
detector. Conference proceedings of the 20th International Conference on
Computers in Education. Nanyang Technological University, Singapore.
Blake, X. and Blake, J. (2015, January 29-31). Academic literacy: Mentor and
mentee perspectives. Poster presented at 35th International Conference of
ThaiTESOL, Bangkok, Thailand.
Morrall, A. (2000-2014). Common Error Detector. [Online tool]
http://www2.elc.polyu.edu.hk/cill/errordetector.htm
Any questions, comments or
suggestions?
johnb@jaist.ac.jp

More Related Content

Viewers also liked

Top 5 Reasons European companies keep outsourcing IT services
Top 5 Reasons European companies keep outsourcing IT servicesTop 5 Reasons European companies keep outsourcing IT services
Top 5 Reasons European companies keep outsourcing IT services
Cedric Brusselmans
ย 
Fundraising by facebook app
Fundraising by facebook appFundraising by facebook app
Fundraising by facebook app
rajeshvermaiari
ย 
Aรฑos 80ยดs
Aรฑos 80ยดsAรฑos 80ยดs
Varbergs miljรถmรฅl 2015-2025
Varbergs miljรถmรฅl 2015-2025Varbergs miljรถmรฅl 2015-2025
Varbergs miljรถmรฅl 2015-2025
Pierre Ringborg
ย 
Primera guerra-mundial
Primera guerra-mundial Primera guerra-mundial
Primera guerra-mundial
Hรฉctor Fernando Bolaรฑos Flores
ย 
MediaWhiz POV: Conversion Optimization for Lead-gen Paths
MediaWhiz POV: Conversion Optimization for Lead-gen PathsMediaWhiz POV: Conversion Optimization for Lead-gen Paths
MediaWhiz POV: Conversion Optimization for Lead-gen Paths
Matomy Media Group
ย 
Open project 2011
Open project 2011Open project 2011
Open project 2011
Seaon Lee
ย 
Ks 141028 budget 2015
Ks 141028 budget 2015Ks 141028 budget 2015
Ks 141028 budget 2015
Pierre Ringborg
ย 
ๆœ‰็ˆฑๅฟƒ็š„ๅฐๅ’Œๅฐš08 04-12 judy
ๆœ‰็ˆฑๅฟƒ็š„ๅฐๅ’Œๅฐš08 04-12 judyๆœ‰็ˆฑๅฟƒ็š„ๅฐๅ’Œๅฐš08 04-12 judy
ๆœ‰็ˆฑๅฟƒ็š„ๅฐๅ’Œๅฐš08 04-12 judy
jboose
ย 
SD stรถdpartiet till Alliansen
SD stรถdpartiet till AlliansenSD stรถdpartiet till Alliansen
SD stรถdpartiet till Alliansen
Pierre Ringborg
ย 
Materials design presentation 01 (2)
Materials design presentation 01 (2)Materials design presentation 01 (2)
Materials design presentation 01 (2)
Brenda Westtesten
ย 
51 ways to reduce your out-of-class marking
51 ways to reduce your out-of-class marking51 ways to reduce your out-of-class marking
51 ways to reduce your out-of-class marking
john6938
ย 
Pune OpenCoffee Club, an Introduction (2014)
Pune OpenCoffee Club, an Introduction (2014)Pune OpenCoffee Club, an Introduction (2014)
Pune OpenCoffee Club, an Introduction (2014)
Santosh Dawara
ย 
Winning - I am not designed to finish 2nd or 3rd
Winning - I am not designed to finish 2nd or 3rdWinning - I am not designed to finish 2nd or 3rd
Winning - I am not designed to finish 2nd or 3rd
Jonathan Hartley
ย 
Guia 02....
Guia 02....Guia 02....
Guia 02....
jhovannito22
ย 
On Target eCommerce
On Target eCommerceOn Target eCommerce
On Target eCommerce
Michael McMillan
ย 
Waterloo some modern lessons
Waterloo some modern lessonsWaterloo some modern lessons
Waterloo some modern lessons
Peter Eales
ย 
Corporate social responsibility
Corporate social responsibility Corporate social responsibility
Corporate social responsibility
International Summer School
ย 

Viewers also liked (19)

Top 5 Reasons European companies keep outsourcing IT services
Top 5 Reasons European companies keep outsourcing IT servicesTop 5 Reasons European companies keep outsourcing IT services
Top 5 Reasons European companies keep outsourcing IT services
ย 
Fundraising by facebook app
Fundraising by facebook appFundraising by facebook app
Fundraising by facebook app
ย 
Aรฑos 80ยดs
Aรฑos 80ยดsAรฑos 80ยดs
Aรฑos 80ยดs
ย 
Varbergs miljรถmรฅl 2015-2025
Varbergs miljรถmรฅl 2015-2025Varbergs miljรถmรฅl 2015-2025
Varbergs miljรถmรฅl 2015-2025
ย 
Primera guerra-mundial
Primera guerra-mundial Primera guerra-mundial
Primera guerra-mundial
ย 
MediaWhiz POV: Conversion Optimization for Lead-gen Paths
MediaWhiz POV: Conversion Optimization for Lead-gen PathsMediaWhiz POV: Conversion Optimization for Lead-gen Paths
MediaWhiz POV: Conversion Optimization for Lead-gen Paths
ย 
Open project 2011
Open project 2011Open project 2011
Open project 2011
ย 
Ks 141028 budget 2015
Ks 141028 budget 2015Ks 141028 budget 2015
Ks 141028 budget 2015
ย 
ๆœ‰็ˆฑๅฟƒ็š„ๅฐๅ’Œๅฐš08 04-12 judy
ๆœ‰็ˆฑๅฟƒ็š„ๅฐๅ’Œๅฐš08 04-12 judyๆœ‰็ˆฑๅฟƒ็š„ๅฐๅ’Œๅฐš08 04-12 judy
ๆœ‰็ˆฑๅฟƒ็š„ๅฐๅ’Œๅฐš08 04-12 judy
ย 
SD stรถdpartiet till Alliansen
SD stรถdpartiet till AlliansenSD stรถdpartiet till Alliansen
SD stรถdpartiet till Alliansen
ย 
Materials design presentation 01 (2)
Materials design presentation 01 (2)Materials design presentation 01 (2)
Materials design presentation 01 (2)
ย 
51 ways to reduce your out-of-class marking
51 ways to reduce your out-of-class marking51 ways to reduce your out-of-class marking
51 ways to reduce your out-of-class marking
ย 
Pune OpenCoffee Club, an Introduction (2014)
Pune OpenCoffee Club, an Introduction (2014)Pune OpenCoffee Club, an Introduction (2014)
Pune OpenCoffee Club, an Introduction (2014)
ย 
Winning - I am not designed to finish 2nd or 3rd
Winning - I am not designed to finish 2nd or 3rdWinning - I am not designed to finish 2nd or 3rd
Winning - I am not designed to finish 2nd or 3rd
ย 
Guia 02....
Guia 02....Guia 02....
Guia 02....
ย 
C#
C#C#
C#
ย 
On Target eCommerce
On Target eCommerceOn Target eCommerce
On Target eCommerce
ย 
Waterloo some modern lessons
Waterloo some modern lessonsWaterloo some modern lessons
Waterloo some modern lessons
ย 
Corporate social responsibility
Corporate social responsibility Corporate social responsibility
Corporate social responsibility
ย 

Similar to Pedagogic application of regular expressions

Minimal Introduction to C++ - Part II
Minimal Introduction to C++ - Part IIMinimal Introduction to C++ - Part II
Minimal Introduction to C++ - Part II
Michel Alves
ย 
Determining The Barriers Faced By Novice Programmers
Determining The Barriers Faced By Novice ProgrammersDetermining The Barriers Faced By Novice Programmers
Determining The Barriers Faced By Novice Programmers
Waqas Tariq
ย 
FLOSS Pilot Studies
FLOSS Pilot StudiesFLOSS Pilot Studies
FLOSS Pilot Studies
Dr. Sulayman K. Sowe
ย 
ID Unit Report 3
ID Unit Report 3ID Unit Report 3
ID Unit Report 3
juliabrannen
ย 
Alapcae math activities 2014 ged test
Alapcae math activities 2014 ged testAlapcae math activities 2014 ged test
Alapcae math activities 2014 ged test
dware655
ย 
Organization strategies to increase development productivity
Organization strategies to increase development productivityOrganization strategies to increase development productivity
Organization strategies to increase development productivity
Aaron Grant
ย 
Biomes WebQuest
Biomes WebQuestBiomes WebQuest
Biomes WebQuest
smtester2
ย 
WebQuest for Biomes
WebQuest for BiomesWebQuest for Biomes
WebQuest for Biomes
smtester2
ย 
MLApproachToProgramming.ppt
MLApproachToProgramming.pptMLApproachToProgramming.ppt
MLApproachToProgramming.ppt
Nitesh Dubey
ย 
Ml approach toprogramming
Ml approach toprogrammingMl approach toprogramming
Ml approach toprogramming
RMani7
ย 
Problem solving content
Problem solving contentProblem solving content
Problem solving content
Timothy Welsh
ย 
problem_solving in physics
 problem_solving in physics problem_solving in physics
problem_solving in physics
Timothy Welsh
ย 
e-asTTle Staff Meeting PowerPoint
e-asTTle Staff Meeting PowerPointe-asTTle Staff Meeting PowerPoint
e-asTTle Staff Meeting PowerPoint
benkelsey
ย 
E as t-tle adv pp
 E as t-tle adv pp E as t-tle adv pp
E as t-tle adv pp
benkelsey
ย 
MATH 107 Great Stories /newtonhelp.com
MATH 107 Great Stories /newtonhelp.comMATH 107 Great Stories /newtonhelp.com
MATH 107 Great Stories /newtonhelp.com
bellflower184
ย 
Specs design
Specs designSpecs design
Specs design
Fadi Sukkari
ย 
Combining General and Genre-Specific Approaches to L2 Writing Instruction
Combining General and Genre-Specific Approaches to L2 Writing InstructionCombining General and Genre-Specific Approaches to L2 Writing Instruction
Combining General and Genre-Specific Approaches to L2 Writing Instruction
guest05424
ย 
Introduction to programming languages part 2
Introduction to programming languages   part 2Introduction to programming languages   part 2
Introduction to programming languages part 2
university of education,Lahore
ย 
Face Detection Using MATLAB (SUD)
Face Detection Using MATLAB (SUD)Face Detection Using MATLAB (SUD)
Face Detection Using MATLAB (SUD)
Sudhanshu Saxena
ย 
AshwiniCV- SAP Basis
AshwiniCV- SAP BasisAshwiniCV- SAP Basis
AshwiniCV- SAP Basis
Ashwini Panchal
ย 

Similar to Pedagogic application of regular expressions (20)

Minimal Introduction to C++ - Part II
Minimal Introduction to C++ - Part IIMinimal Introduction to C++ - Part II
Minimal Introduction to C++ - Part II
ย 
Determining The Barriers Faced By Novice Programmers
Determining The Barriers Faced By Novice ProgrammersDetermining The Barriers Faced By Novice Programmers
Determining The Barriers Faced By Novice Programmers
ย 
FLOSS Pilot Studies
FLOSS Pilot StudiesFLOSS Pilot Studies
FLOSS Pilot Studies
ย 
ID Unit Report 3
ID Unit Report 3ID Unit Report 3
ID Unit Report 3
ย 
Alapcae math activities 2014 ged test
Alapcae math activities 2014 ged testAlapcae math activities 2014 ged test
Alapcae math activities 2014 ged test
ย 
Organization strategies to increase development productivity
Organization strategies to increase development productivityOrganization strategies to increase development productivity
Organization strategies to increase development productivity
ย 
Biomes WebQuest
Biomes WebQuestBiomes WebQuest
Biomes WebQuest
ย 
WebQuest for Biomes
WebQuest for BiomesWebQuest for Biomes
WebQuest for Biomes
ย 
MLApproachToProgramming.ppt
MLApproachToProgramming.pptMLApproachToProgramming.ppt
MLApproachToProgramming.ppt
ย 
Ml approach toprogramming
Ml approach toprogrammingMl approach toprogramming
Ml approach toprogramming
ย 
Problem solving content
Problem solving contentProblem solving content
Problem solving content
ย 
problem_solving in physics
 problem_solving in physics problem_solving in physics
problem_solving in physics
ย 
e-asTTle Staff Meeting PowerPoint
e-asTTle Staff Meeting PowerPointe-asTTle Staff Meeting PowerPoint
e-asTTle Staff Meeting PowerPoint
ย 
E as t-tle adv pp
 E as t-tle adv pp E as t-tle adv pp
E as t-tle adv pp
ย 
MATH 107 Great Stories /newtonhelp.com
MATH 107 Great Stories /newtonhelp.comMATH 107 Great Stories /newtonhelp.com
MATH 107 Great Stories /newtonhelp.com
ย 
Specs design
Specs designSpecs design
Specs design
ย 
Combining General and Genre-Specific Approaches to L2 Writing Instruction
Combining General and Genre-Specific Approaches to L2 Writing InstructionCombining General and Genre-Specific Approaches to L2 Writing Instruction
Combining General and Genre-Specific Approaches to L2 Writing Instruction
ย 
Introduction to programming languages part 2
Introduction to programming languages   part 2Introduction to programming languages   part 2
Introduction to programming languages part 2
ย 
Face Detection Using MATLAB (SUD)
Face Detection Using MATLAB (SUD)Face Detection Using MATLAB (SUD)
Face Detection Using MATLAB (SUD)
ย 
AshwiniCV- SAP Basis
AshwiniCV- SAP BasisAshwiniCV- SAP Basis
AshwiniCV- SAP Basis
ย 

More from john6938

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

More from john6938 (20)

Martial artist's guide to research writing
Martial artist's guide to research writingMartial artist's guide to research writing
Martial artist's guide to research writing
ย 
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
ย 

Recently uploaded

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
ย 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
ย 
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
Payaamvohra1
ย 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
ย 
Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
ย 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
ย 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
ย 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
ย 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
ย 
Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.
IsmaelVazquez38
ย 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Kalna College
ย 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
ย 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
ย 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
Kalna College
ย 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
ย 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
ย 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
ย 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
ย 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
ย 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
ย 

Recently uploaded (20)

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
ย 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
ย 
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
ย 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
ย 
Observational Learning
Observational Learning Observational Learning
Observational Learning
ย 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
ย 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
ย 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
ย 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
ย 
Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.Bossa Nโ€™ Roll Records by Ismael Vazquez.
Bossa Nโ€™ Roll Records by Ismael Vazquez.
ย 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
ย 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
ย 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
ย 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
ย 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
ย 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
ย 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
ย 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
ย 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
ย 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
ย 

Pedagogic application of regular expressions

  • 1. John Blake Japan Advanced Institute of Science and Technology Pedagogic application of regular expressions /bbetweenW+(?:w+W+){1,2}?tob/gi;
  • 2. Overview 02 Introduction โ€ข Probabilistic parsing โ€ข Rule-based pattern matching โ€ข Regular expressions Pedagogic applications โ€ข Modality detector โ€ข Error detector โ€ข Other: tagged corpora, pronunciation of โ€œedโ€
  • 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. Rule-based pattern matching 06 There is a man. /bmanb/; There is a woman. /bwomanb/; Regular expressions (regexp|regex) The discrete words โ€œmanโ€ and โ€œwomanโ€ will be identified, generating a โ€œtrueโ€ result.
  • 7. Regular expressions (Regex) 07 e.g. /bmaybeb/gi; โ€“ escape (from normal characters) i โ€“ case insensitive b โ€“ boundary g โ€“ greedy 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
  • 8. Pedagogic applications 08 Modality detector Online error detectors - Common error detector (Morrall, 2000-14) - Corpus-based error detector (Blake, 2012-15) Other applications - Annotation highlighter - Ideas for pronunciation, grammar and vocab
  • 9. 09 Situation App. 1 Students graduate students, researchers Aim write research articles Problems lack of familiarity of genre, lack of language, lack of content.
  • 10. 10 Tentative language & approximation Type Examples Modal verbs may, might, would, can Lexical verbs seem, appear, suggest Modal adverbs perhaps, probably, possibly, Modal adjectives probable, possible, uncertain Modal nouns assumption, claim, possibility # Approximation 49% Almost a half, nearly 50%, less than 1 in 2 App. 1
  • 11. 11 Material mismatch Students from different faculties studying tentative language (hedging) and approximation in academic writing use generic materials prepared by teacher. App. 1
  • 12. 12 Lack of face validity Some students do not want to โ€œwaste timeโ€ dealing with materials not appropriate to their major. They expect materials tailored to their exact needs. App. 1
  • 14. 14 Solution: Modality detector Individualized instruction โ€ข Student selects appropriate text โ€ข Student inputs relevant text โ€ข Regex identifies hedges & approximation โ€ข Execute command labels & highlights App. 1
  • 15. 15 Warning: False positives More complex regex reduce false positives App. 1
  • 16. 16 Piles of unmarked homework Responding to written work takes too much time, and is repetitive since many students make the same surface-level mistakes. App. 2
  • 17. 17 No time to respond Teachers are expected to: โ€ข Identify the location of errors โ€ข Explain the errors (if necessary) โ€ข Correct the errors (if necessary) All of which take lots of time. App. 2
  • 18. 18 Solution: Error detector Identification Student inputs own work Regex identifies expected errors Explanation Execute command selects and displays prepared explanation Correction Student corrects work and submits improved version App. 2
  • 19. 19 Error classification App. 2 Type Description Accuracy factual and language errors Brevity too many words Clarity vague or ambiguous terms Objectivity emotive language Formality abbreviations, contractions, & informal terms An ethnographic survey of the literature on writing scientific research articles revealed five key criteria (Blake & Blake, 2015)
  • 21. 21 Specific example Error โ€ข One of the + singular noun Regex โ€ข /bone of theb/gi; Execute โ€ข Check that the phrase one of the is followed by a plural noun App. 2
  • 22. 22 False positives harnessed in learning process by forcing student engagement App. 2
  • 23. 23 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 App. 3
  • 24. 24 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 App. 3
  • 25. 25 Easy-to-read tags Introduction Purpose Method Results Discussion http://www.jaist.ac.jp/~johnb/Movehighlighter.html App. 3
  • 26. 26 Ideas for you and your students Pronunciation: Regular โ€œedโ€ โ€ข Regular โ€œedโ€ /t/, /d/, /id/ โ€ข th [voiced or voiceless] Grammar: โ€ข Tenses: e.g. perfect continuous: been + ing โ€ข Quantifiers : [U] much, little; [C] many, few; [U/C] lots of , a lot of Vocabulary: โ€ข Colours: red, blue crimson red, cobalt blue, โ€ข Body parts: hand, eyes, leg hand out, eye up, leg it
  • 27. 27 Regular โ€œedโ€ False positives: โ€ข learned /d/ /id/ Pron Preceeding sound Potential regex /id/ d, t /(d|t)edb/gi; /t/ voiceless consonants /(s|f)edb/gi; /d/ voiced consonants /(z|v)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
  • 28. 28 Pronunciation of โ€œthโ€ Pron Feature Potential regex /๐œน/ Voiced initial th /btha(n|t|) b/gi; /bthe(b|ir|m|re|se|y) b/gi; /bthisb/gi; /btho(se|ugh|) b/gi; /bthusb/gi; /๐œฝ/ Voiceless initial th /bth/gi; /t/ th pronounced as t /bthomas|thames|thyme/gi; Pronunciation of โ€œthโ€ can be predicted by the law that for function words the initial th is pronounced as a voiced sound.
  • 29. References 29 Blake, J. (2012, November 28-30). Corpus-based academic written error detector. Conference proceedings of the 20th International Conference on Computers in Education. Nanyang Technological University, Singapore. Blake, X. and Blake, J. (2015, January 29-31). Academic literacy: Mentor and mentee perspectives. Poster presented at 35th International Conference of ThaiTESOL, Bangkok, Thailand. Morrall, A. (2000-2014). Common Error Detector. [Online tool] http://www2.elc.polyu.edu.hk/cill/errordetector.htm
  • 30. Any questions, comments or suggestions? johnb@jaist.ac.jp