## What's New in CorpusSearch 2

### Contents of this chapter:

  changes to the query language
  additions to the query language
  new node boundary
  new search functions
  changes to coding
  new printing commands
  new capabilities
  discontinued functions

### changes to the query language

In previous versions of CorpusSearch, subqueries had to be appended one at a time, like this:

      query: ((((A function B)
             AND (C function D))
             AND (E function F))
             AND (G function H))

In CorpusSearch 2, subqueries can be appended with any logical combination of parentheses. The above query is more easily written:

      query: (A function B)
             AND (C function D)
             AND (E function F)
             AND (G function H)

Old-style queries still work.

### additions to the query language

In previous versions of CS, the only query conjunction was "AND". CorpusSearch 2 has added "OR" and "NOT".

### new node boundary

There is a new node-boundary option, $ROOT, which is a variable that stands for the root node of a matrix sentence (token), whatever its label may be. Even in cases where the root node has no label, it can be referred to with $ROOT.

### new search functions

new search functions include:

  Dominates
  iDomsMod
  hasSister
  isRoot
  sameIndex

These search functions have new algorithms:

  iPrecedes
  Precedes

Also, search functions that take an integer argument no longer have the argument jammed onto the end of the function name, but are written with a space before the argument. For example, instead of:

      (WRONG!) query: (CODING column2 q)

you should now write this:

      query: (CODING column 2 q)

These functions are affected:

  column
  domsWords
  domsWords<
  domsWords>
  iDomsNumber
  iDomsTotal
  iDomsTotal<
  iDomsTotal>

### new printing commands

  reformat_corpus
  print_only

### changes to coding

Coding is now performed once per boundary node, instead of once per sentence (token).

Also, the command "coding_query:" must now appear before the coding query.

### new capabilities

CorpusSearch 2 includes lexicon building, automated corpus revision, and local-frames production.

### discontinued functions

  iDoms_conj_switch: see iDomsMod
  anyPrecedes: see precedes
  print_complement: see NOT