Search Regexb

download Search Regexb

of 2

Transcript of Search Regexb

  • 7/27/2019 Search Regexb

    1/2

    Ingls Autmtica y Electrotecnia E.T.S.I.I. Segundo cuatrimestre

    Using Regular expressions for searching with AntConc.

    If you are interested in regular expressions and their use you can get the basics at:

    http://en.wikipedia.org/wiki/Regular_expression and http://docs.python.org/lib/re-syntax.html

    You need to use the software AntConc in the Software folder. Any of the versions will do. Thissoftware does not need any installation. It will run by double clicking on its icon.

    For doing all the searches with the regular expressions click on the menu File and select the

    option Open Dir. From there move to either the cartas&memos directory or the text_gen.Remember that the first directory only contains texts of letters and memoranda and the

    second one contains all types of texts and contains more than 1 million words. As a

    convention, to indicate a blank space between characters I will use _ (underscore).

    Now, below and between Files Processed and the button Start, tick on the box Regex.

    This enables the search using the regular expressions that you are going to type for reviewingthe grammar. By clicking on the blue lettering of the results you are taken to the full text. By

    clicking on the Concordancer tab you are taken back to the list of examples.

    You can find some examples of use of tverbs with the following patterns (

    grasp_grasp[/ed|ing|s/]+_hold _/hold|holds|holding|held|/+_(some of the meanings are different from the onelearnt in unit 1

    seize_seize[a-z]+_(the meaning in this case will be either confiscar or retener)there are no other examples of the verbs meaning hold. You can try similar patterns with otherverbs from the unit vocabulary.Try the following comparison patterns separating each element with a blank space:

    _ as _[a-z]+ _ as _ _ not as _ [a-z]+ _ as _ _ just as _ [a-z]+ _ as _

    Prof. Ismael Arinas Pelln DLACT search_regex.pdf 1

  • 7/27/2019 Search Regexb

    2/2

    Ingls Autmtica y Electrotecnia E.T.S.I.I. Segundo cuatrimestre

    _ same _ [a-z]+ _ as _ _ [a-z]+er _ than _ _ more _ [a-z]+ _ than _

    _ less _ [a-z]+ _ than _ _ [a-z]+est _ _ [/our|the/]+ _ [a-z]+est _

    For the last six patterns you may obtain many examples without an adjective for comparing.Pay attention to the meaning. The last pattern will give you a couple of wrong examples.

    Try to find the other comparative expressions without the regular expressions (remember to tickoff the regex function for these searches without a pattern).

    Unit 1: try searching the vocabulary without the patterns (nouns, adjectives, adverbs) and with

    the patterns (verbs). (for regular patterns look at the pattern for grasp, and for irregular at thepattern for hold).

    (number) out of (number)_ (0-9)+ _ out of _ (0-9)+_

    (number) in (number)_ (0-9)+ _ in (0-9)+ _

    Example of a search with a verb followed by an infinitive:_ aim[/s|ed|ing/]+ _ to _Example of a search with a verb followed by a noun / pronoun and an infinitive:

    _ cause _ [a-z]+ _ to _ (use as many [a-z]+ as you need to represent words in between)Example of verbs followed by ing:_consider[a-]+ _ [a-z]+ing _Check without patterns those verbs which may take both types of infinitive.

    Unit 4: see if you can find examples of the unit vocabulary without patterns and see if they

    have words which typically combine with them.

    Example of command verb:_ insist[/s|ed|ing]+ _ that _try searches with adjectives (advisable to, desirable to, important to, etc.)Example of a search with possible: (without patters type possible for)

    Example of a search with may / might: (without patterns type the verbs and select thoseexamples that are subjunctive in Spanish).

    Examples of searches with hypothetical conditions:_ [I|i]+f _ [a-z]+ _ [a-z]+ _ [a-z]+ed _select from the examples obtained those which correspond to the If + subject + verb in thesimple past structure. And make sure the Spanish translation corresponds to a subjunctive.For examples with time subordinate sentences make your searches without patterns and usingtime connectors (as soon as, when, while, before, after, etc.) Notice that some of the time

    connectors have other meanings and therefore some of the examples will be irrelevant.Check which relevant examples are with the subjunctive in Spanish.With should you will get 2750 examples (searching without a pattern). Find possible patternsthat reduce the number of irrelevant examples.

    Example of consequence search:_ so _ [a-z]+ _ that __ such a _ [a-z]+ _ [a-z]+ _ that _The rest of consequence searches can be carried out without patterns.

    Unit 9: For searching conditional sentences corresponding to the patterns found in unit 9 you

    can try_ [I|i]+f _as the present does not have a typical ending. Then select those exampleswhich correspond to the structures explained in this unit.

    Prof. Ismael Arinas Pelln DLACT search_regex.pdf 2