<< Previous
page
Page 5 of 10
Next Page >>
Multiple Constraints
You can attach more than one constraint to a pattern by putting more
constraints on later lines. For example:
Notice that the second line is indented so that ending lines
up with starting. That indentation is necessary -- it tells
the system that ending is modifying Word, just like starting
does. Notice the light blue line connecting ending with Word.
This line indicates how the system is interpreting your indentation.
You don't have to draw the line yourself. Just indent, and lines
will be drawn automatically.
Try entering this pattern now. To insert a line break without
running the pattern, use Shift-Enter (hold down the Shift key
while pressing Enter). Be careful to reproduce the indentation.
Jared L. Cohon
Carnegie Mellon University
5000 Forbes Ave
Pittsburgh PA 15213
Charles M. Vest
Massachusetts Institute of Technology
77 Massachusetts Ave
Cambridge MA 02139
Notice that the pattern selects all words that start with the letter c
and end with the letter e. If you know logic, this is a
Boolean and of the two constraints.
A constraint can also modify the object of another constraint. For
example:
Enter this pattern now. You should see that it selects any sentence
containing a state name, where the state name must start with T, as
in Texas.
Note that it would be okay to put the second constraint, starting
"T", on the next line, as long as it is indented far enough that
it affects State instead of Sentence (as indicated by the
light blue line).
But if you indent the second line less, so that starting is
connected to Sentence instead of State, you'll get a
different meaning.
Try this pattern now, and notice that it selects sentences that
happen to contain any state (like New Jersey), but only if the
sentence itself begins with T.
<< Previous
page
Page 5 of 10
Next Page >>
Go to the LAPIS home
page.
Send comments or questions to Rob Miller, (rcm@lcs.mit.edu)
Copyright © 2003 - Massachusetts Institute of Technology. All
Rights Reserved.