Parallel embedded system design lab 이청용 Chapter 2 (2.6~2.7)

Slides:



Advertisements
Similar presentations
This Time Whitespace and Input/Output revisited The Programming cycle Boolean Operators The “if” control structure LAB –Write a program that takes an integer.
Advertisements

Chapter 2, Part 1: An interpreter architecture for C-like languages Xinming (Simon) Ou CIS 505: Programming Languages Kansas State University Fall 2010.
Chapter 2: Using Objects Part 1. To learn about variables To understand the concepts of classes and objects To be able to call methods To learn about.
6b.1 Pattern Matching. 6b.2 We often want to find a certain piece of information within the file, for example: Pattern matching 1.Find all names that.
LING/C SC/PSYC 438/538 Lecture 8 Sandiway Fong. Adminstrivia.
Geography 465 Assignments, Conditionals, and Loops.
(a) (b) (c) (d). What is (1,2,3)  (3,4,2)? (a) (1, 2, 3, 4) (b) (1,2)  (3,4) (c) (1,3,4,2) (d) (3,1)  (4,2)
The Scanner Class and Formatting Output Mr. Lupoli.
Regex Wildcards on steroids. Regular Expressions You’ve likely used the wildcard in windows search or coding (*), regular expressions take this to the.
More on Regular Expressions Regular Expressions More character classes \s matches any whitespace character (space, tab, newline etc) \w matches.
Modern JavaScript Develop And Design Instructor’s Notes Chapter 10 – Working with Forms Modern JavaScript Design And Develop Copyright © 2012 by Larry.
Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,
Chapter 1 Working with strings. Objectives Understand simple programs using character strings and the string library. Get acquainted with declarations,
Regular Expressions Regular expressions are a language for string patterns. RegEx is integral to many programming languages:  Perl  Python  Javascript.
Post-Module JavaScript BTM 395: Internet Programming.
Lab5 Please submit the lab before you leave Please include at a minimum your name, the date, and the lab- program number at the top of the program as a.
By: Andrew Cory. Grouping Things & Hierarchical Matching Grouping characters – ( and ) Allows parts of a regular expression to be treated as a single.
Overview A regular expression defines a search pattern for strings. Regular expressions can be used to search, edit and manipulate text. The pattern defined.
Module 6 – Generics Module 7 – Regular Expressions.
Regular Expressions What is this line all about? while (!($search =~ /^\s*$/)) { It’s a string search just like before, but with a huge twist – regular.
©Brooks/Cole, 2001 Chapter 9 Regular Expressions.
CSC207 – Software Design Final Preparation. Structure of Exam Descriptive Qs. –5 each 4 marks Code understanding –1 for 10 marks Analysis / Implementation.
Pattern Matching II. Greedy Matching When dealing with quantifiers, Perl’s pattern matcher is by default greedy. For example, –$_ = “Bob sat next to the.
CSC 2720 Building Web Applications PHP PERL-Compatible Regular Expressions.
LING/C SC/PSYC 438/538 Lecture 8 Sandiway Fong. Adminstrivia Homework 4 not yet graded …
Regular Expressions Pattern and String Matching in Text.
Chapter 6(6.5~) Concordance lines and corpus linguistics Parallel embedded system design lab 이청용.
Compiler Construction By: Muhammad Nadeem Edited By: M. Bilal Qureshi.
Introduction to variables Assigning the Value of One Variable to Another The Right-hand Side of an Assignment Statement Can be an Expression Expressions.
REGULAR EXPRESSIONS 1 DAY 6 - 9/08/14 LING 3820 & 6820 Natural Language Processing Harry Howard Tulane University.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. ADVANCED.
Programming Fundamentals. Today’s Lecture Multidimensional Arrays Arrays as Class Member Data Arrays of Objects C-Strings.
JavaScript VARIABLES AND DATA TYPES. OUTPUT WITHOUT ALERT OR FORM CONSOLE.LOG();
Chapter 2 print / println String Literals Escape Characters Variables / data types.
Introduction to Programming the WWW I CMSC Winter 2004 Lecture 13.
Michael Kovalchik CS 265, Fall  Parenthesis group parts of expressions together  “/CS265|CS270/” => “/CS(265|270)/”  Groups can be nested  “/Perl|Pearl/”
A FIRST BOOK OF C++ CHAPTER 14 THE STRING CLASS AND EXCEPTION HANDLING.
Chapter 4: Variables, Constants, and Arithmetic Operators Introduction to Programming with C++ Fourth Edition.
Strings in Python String Methods. String methods You do not have to include the string library to use these! Since strings are objects, you use the dot.
Chapter 3 – Describing Syntax CSCE 343. Syntax vs. Semantics Syntax: The form or structure of the expressions, statements, and program units. Semantics:
Chapter 18 The HTML Tag
Regular Expressions.
String Methods Programming Guides.
Infix to postfix conversion
Regular Expressions in Pearl - Part II
What does it mean? Notes from Robert Sebesta Programming Languages
Chapter 3: I/O Management
3-2: Solving Systems of Equations using Substitution
SAS in Data Cleaning.
With Assignment Operator
6.5 Solving Open Sentences involving Absolute Value
3-2: Solving Systems of Equations using Substitution
Solving Systems of Equations using Substitution
Chapter 10 Image Segmentation.
Simplifying Algebraic Expressions
LING/C SC/PSYC 438/538 Lecture 12 Sandiway Fong.
3-2: Solving Systems of Equations using Substitution
Class Examples.
Embedded PHP in HTML 5 & Strings in PHP
Matcher functions boolean find() Attempts to find the next subsequence of the input sequence that matches the pattern. boolean lookingAt() Attempts to.
LING/C SC/PSYC 438/538 Lecture 13 Sandiway Fong.
LING/C SC/PSYC 438/538 Lecture 11 Sandiway Fong.
String Processing 1 MIS 3406 Department of MIS Fox School of Business
String Processing 1 MIS 3406 Department of MIS Fox School of Business
Introduction to Computer Science
3-2: Solving Systems of Equations using Substitution
Understanding Variables
string functions isspace() – used to check the string is space x= “ "
Substituting into Algebraic Equations
An Intro to Regex in R Alan Wu.
Presentation transcript:

Parallel embedded system design lab 이청용 Chapter 2 (2.6~2.7)

2.6 First attempt at extracting sentences

2.6.1 sentence segmentation

2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences $target =‘(.)’ regular expression

2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences $target = ‘(\.)’ just character

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

2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences $target =‘([MD]rs?\.)’

2.6 First attempt at extracting sentences sentence segmentation for a Christmas Carol $target =‘([?!])’ [output2-11] $target =‘([?!][\s\’”,]*[a-z])’ [output2-12] $target =‘([?!] [\s\’”,]*[A-Z])’ [output2-13]

2.6.2 sentence segmentation for a Christmas Carol 2.6 First attempt at extracting sentences Output 2.14

2.6 First attempt at extracting sentences Leftmost greediness and sentence segmentation All regexes start at the leftmost character /(10+)/ “ ” => “100” Output 2.15

2.6 First attempt at extracting sentences Leftmost greediness and sentence segmentation

2.6 First attempt at extracting sentences Leftmost greediness and sentence segmentation -= decreases the variable on the left

2.6 First attempt at extracting sentences 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

2.6 First attempt at extracting sentences Leftmost greediness and sentence segmentation

2.7 Regex odds and ends Match variables and backreferences

2.7 Regex odds and ends Regular expression operators and their output

2.7 Regex odds and ends Regular expression operators and their output Just counting number of lower(insensitive)

2.7 Regex odds and ends Regular expression operators and their output

2.7 Regex odds and ends Lookaround

2.7 Regex odds and ends Lookaround

2.7 Regex odds and ends Lookaround