The command to run Grew is: grew <subcommand> [<args>]

Available subcommands are:

Transform mode

In this mode, Grew apply a Graph Rewrinting System to a graph of a set of graphs.

The full command for this mode:

grew transform -grs <grs_file> -i <input_file> -o <output_file>

Required arguments for this mode are:


Optional argument is:

GTK interface

The command to run the GTK interface: grew gui <args>. It supposes that you have installed the grew_gui opam packages (see option 2 in Installation page).

Optional arguments:

Grep mode

This mode corresponds to the command line version of the Online graph matching tool. The command is:

grew grep -pattern <pattern_file> -node_id <id> -i <corpus_file>


The output is a list of lines, one for each occurrence of the pattern in the corpus.


With the following files:

pattern {
  V [cat=V];
  V -[a_obj]-> A;
  V -[de_obj]-> DE;

The command:

grew grep -pattern subcat.pat -node_id V -i

produces the following output:

annodis.er_00040	41
annodis.er_00240	12
annodis.er_00441	14
emea-fr-test_00438	19
emea-fr-test_00478	31
Europar.550_00496	14

This means that the pattern described in the file subcat.pat was found 6 times in the corpus, each line gives the sentence identifier and the position of node matched by the node V of the pattern.