Download presentation
Presentation is loading. Please wait.
Published byAnna Jordan Modified over 8 years ago
1
Parallel embedded system design lab 이청용 Chapter 2 (2.6~2.7)
2
2.6 First attempt at extracting sentences
3
2.6.1 sentence segmentation
4
2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences $target =‘(.)’ regular expression
5
2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences $target = ‘(\.)’ just character
6
2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences $target = /(\.[\s\’”,]*[a-z])/. White space ‘ “ and lower case
7
2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences $target =‘([MD]rs?\.)’
8
2.6 First attempt at extracting sentences 2.6.2 sentence segmentation for a Christmas Carol $target =‘([?!])’ [output2-11] $target =‘([?!][\s\’”,]*[a-z])’ [output2-12] $target =‘([?!] [\s\’”,]*[A-Z])’ [output2-13]
9
2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences Output 2.14
10
2.6 First attempt at extracting sentences 2.6.3 Leftmost greediness and sentence segmentation All regexes start at the leftmost character /(10+)/ “10010000” => “100” Output 2.15
11
2.6 First attempt at extracting sentences 2.6.3 Leftmost greediness and sentence segmentation
12
2.6 First attempt at extracting sentences 2.6.3 Leftmost greediness and sentence segmentation -= decreases the variable on the left
13
2.6 First attempt at extracting sentences 2.6.3 Leftmost greediness and sentence segmentation Recognizing white space through $buffer Checking either if the next character is capital letter of the end of string Storing last part of the string
14
2.6 First attempt at extracting sentences 2.6.3 Leftmost greediness and sentence segmentation
15
2.7 Regex odds and ends 2.7.1 Match variables and backreferences
16
2.7 Regex odds and ends 2.7.2 Regular expression operators and their output
17
2.7 Regex odds and ends 2.7.2 Regular expression operators and their output Just counting number of lower(insensitive)
18
2.7 Regex odds and ends 2.7.2 Regular expression operators and their output
19
2.7 Regex odds and ends 2.7.3 Lookaround
20
2.7 Regex odds and ends 2.7.3 Lookaround
21
2.7 Regex odds and ends 2.7.3 Lookaround
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.