net.sf.jlinkgrammar

## Class ParseOptions

- java.lang.Object
- - net.sf.jlinkgrammar.ParseOptions

-     public class ParseOptions
      extends java.lang.Object

  ParseOptions keeps a set of state variables regarding user choices. A parse option is associated with each sentence and each linkage. It is important to keep track of which parse option instance object is being referenced in any given situation.

  Here's how the default values are initialized

  - verbosity = 5;
  - linkage_limit = 100;
  - disjunct_cost = GlobalBean.MAX_DISJUNCT_COST;
  - min_null_count = 0;
  - max_null_count = 0;
  - null_block = 1;
  - islands_ok = false;
  - cost_model = new VDALCostModel();
  - short_length = 6;
  - all_short = false;
  - twopass_length = 30;
  - max_sentence_length = 70;
  - resources = new Resources();
  - display_short = true;
  - display_word_subscripts = true;
  - display_link_subscripts = true;
  - display_walls = false;
  - display_union = false;
  - allow_null = true;
  - echo_on = false;
  - batch_mode = false;
  - screen_width = 79;
  - display_on = true;
  - display_postscript = false;
  - display_constituents = 0;
  - display_bad = false;
  - display_links = false;
  - out = System.out;
  - input = System.in;

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) class` | `ParseOptions.BooleanSetter`
    `static interface` | `ParseOptions.Setter`
    `(package private) class` | `ParseOptions.Switch`
    `(package private) static class` | `ParseOptions.UserCommand`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `all_short` If true, there can be no connectors that are exempt
    `boolean` | `allow_null` true if we allow null links in parsing
    `boolean` | `batch_mode` if true, process sentences non-interactively
    `java.util.Comparator<LinkageInfo>` | `cost_model` For sorting linkages in post_processing
    `(package private) ParseOptions.Switch[]` | `default_switches`
    `int` | `disjunct_cost` Max disjunct cost to allow default 10000
    `boolean` | `display_bad` if true, bad linkages are displayed
    `int` | `display_constituents` if true, output treebank-style constituent structure
    `boolean` | `display_link_subscripts` as in "Ss" as opposed to "S"
    `boolean` | `display_links` if true, a list o' links is printed out
    `boolean` | `display_on` if true, output graphical linkage diagram
    `boolean` | `display_postscript`
    `boolean` | `display_short`
    `boolean` | `display_union` print squashed version of linkage with conjunction?
    `boolean` | `display_walls` set true to display walls default = true.
    `boolean` | `display_word_subscripts` as in "dog.n" as opposed to "dog"
    `boolean` | `echo_on` true if we should echo the input sentence
    `java.io.InputStream` | `input` Set the input reader
    `boolean` | `islands_ok` If true, then linkages with islands (separate component of the link graph) will be generated (default=false)
    `int` | `linkage_limit` The maximum number of linkages processed default 10000
    `int` | `max_null_count` The maximum number of null links to allow
    `int` | `max_sentence_length` max_sentence_length = 70 Where is this used? Can't find a reference to it in the code!
    `int` | `min_null_count` The minimum number of null links to allow default 0
    `int` | `null_block` consecutive blocks of this many words are considered as one null link (default=1)
    `java.io.PrintStream` | `out` Set the output writer
    `Resources` | `resources` For deciding when to "abort" the parsing
    `int` | `screen_width` width of screen for displaying linkages
    `int` | `short_length` Links that are limited in length can be no longer than this.
    `int` | `twopass_length` min length for two-pass post processing
    `(package private) static ParseOptions.UserCommand[]` | `user_command`
    `int` | `verbosity` Level of detail to give about the computation default 0

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParseOptions()` Here's where the values are initialized verbosity = 5; linkage_limit = 100; disjunct_cost = GlobalBean.MAX_DISJUNCT_COST; min_null_count = 0; max_null_count = 0; null_block = 1; islands_ok = false; cost_model = new VDALCostModel(); short_length = 6; all_short = false; twopass_length = 30; max_sentence_length = 70; resources = new Resources(); display_short = true; display_word_subscripts = true; display_link_subscripts = true; display_walls = false; display_union = false; allow_null = true; echo_on = false; batch_mode = false; screen_width = 79; display_on = true; display_postscript = false; display_constituents = 0; display_bad = false; display_links = false; out = System.out; input = System.in;

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clean_up_string(java.lang.StringBuffer s)`
    `(package private) boolean` | `is_numerical_rhs(java.lang.String s)`
    `void` | `issue_special_command(java.lang.String line, Dictionary dict)`
    `void` | `left_print_string(java.lang.String s, java.lang.String t)`
    `(package private) boolean` | `parse_options_get_all_short_connectors()`
    `boolean` | `parse_options_get_allow_null()`
    `boolean` | `parse_options_get_batch_mode()`
    `int` | `parse_options_get_disjunct_cost()`
    `boolean` | `parse_options_get_display_bad()`
    `int` | `parse_options_get_display_constituents()`
    `boolean` | `parse_options_get_display_links()`
    `boolean` | `parse_options_get_display_on()`
    `boolean` | `parse_options_get_display_postscript()`
    `boolean` | `parse_options_get_display_union()`
    `boolean` | `parse_options_get_display_walls()`
    `boolean` | `parse_options_get_echo_on()`
    `boolean` | `parse_options_get_islands_ok()`
    `int` | `parse_options_get_linkage_limit()`
    `int` | `parse_options_get_max_null_count()`
    `int` | `parse_options_get_max_sentence_length()`
    `int` | `parse_options_get_min_null_count()`
    `int` | `parse_options_get_null_block()`
    `int` | `parse_options_get_screen_width()`
    `int` | `parse_options_get_short_length()`
    `int` | `parse_options_get_verbosity()`
    `void` | `parse_options_reset_resources()`
    `void` | `parse_options_set_all_short_connectors(boolean val)`
    `void` | `parse_options_set_allow_null(boolean dummy)`
    `void` | `parse_options_set_batch_mode(boolean dummy)`
    `void` | `parse_options_set_cost_model_type(ParseOptions opts, int cm)`
    `void` | `parse_options_set_disjunct_cost(int dummy)`
    `void` | `parse_options_set_display_bad(boolean dummy)`
    `void` | `parse_options_set_display_constituents(ParseOptions opts, int dummy)`
    `void` | `parse_options_set_display_links(boolean dummy)`
    `void` | `parse_options_set_display_on(boolean dummy)`
    `void` | `parse_options_set_display_postscript(boolean dummy)`
    `void` | `parse_options_set_display_union(boolean dummy)`
    `void` | `parse_options_set_display_walls(boolean dummy)`
    `void` | `parse_options_set_echo_on(boolean dummy)`
    `void` | `parse_options_set_islands_ok(boolean dummy)`
    `void` | `parse_options_set_linkage_limit(int dummy)`
    `void` | `parse_options_set_max_null_count(int val)`
    `void` | `parse_options_set_max_sentence_length(int dummy)`
    `void` | `parse_options_set_min_null_count(int val)`
    `void` | `parse_options_set_null_block(int dummy)`
    `void` | `parse_options_set_screen_width(int dummy)`
    `void` | `parse_options_set_short_length(int short_length)`
    `void` | `parse_options_set_verbosity(int dummy)`
    `void` | `print_expression(Exp n)`
    `(package private) void` | `print_time(java.lang.String s)`
    `(package private) void` | `print_total_time()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### verbosity

          public int verbosity

      Level of detail to give about the computation default 0

    - #### linkage_limit

          public int linkage_limit

      The maximum number of linkages processed default 10000
      See Also:
        `Sentence.parse(int, ParseOptions)`

    - #### disjunct_cost

          public int disjunct_cost

      Max disjunct cost to allow default 10000
      See Also:
        `GlobalBean.MAX_DISJUNCT_COST`

    - #### min_null_count

          public int min_null_count

      The minimum number of null links to allow default 0
      See Also:
        `Sentence.sentence_parse(ParseOptions)`

    - #### max_null_count

          public int max_null_count

      The maximum number of null links to allow
      See Also:
        `default 0`

    - #### null_block

          public int null_block

      consecutive blocks of this many words are considered as one null link (default=1)
      See Also:
        `Sentence.count(int, int, Connector, Connector, int, ParseOptions)`

    - #### islands_ok

          public boolean islands_ok

      If true, then linkages with islands (separate component of the link graph) will be generated (default=false)
      See Also:
        `Sentence.count(int, int, Connector, Connector, int, ParseOptions)`

    - #### twopass_length

          public int twopass_length

      min length for two-pass post processing

    - #### max_sentence_length

          public int max_sentence_length

      max_sentence_length = 70 Where is this used? Can't find a reference to it in the code!

    - #### short_length

          public int short_length

      Links that are limited in length can be no longer than this. Default = 6

    - #### all_short

          public boolean all_short

      If true, there can be no connectors that are exempt

    - #### cost_model

          public java.util.Comparator<LinkageInfo> cost_model

      For sorting linkages in post_processing

    - #### resources

          public Resources resources

      For deciding when to "abort" the parsing

    - #### display_short

          public boolean display_short

    - #### display_word_subscripts

          public boolean display_word_subscripts

      as in "dog.n" as opposed to "dog"

    - #### display_link_subscripts

          public boolean display_link_subscripts

      as in "Ss" as opposed to "S"

    - #### display_walls

          public boolean display_walls

      set true to display walls default = true.

    - #### display_union

          public boolean display_union

      print squashed version of linkage with conjunction?

    - #### allow_null

          public boolean allow_null

      true if we allow null links in parsing

    - #### echo_on

          public boolean echo_on

      true if we should echo the input sentence

    - #### batch_mode

          public boolean batch_mode

      if true, process sentences non-interactively

    - #### screen_width

          public int screen_width

      width of screen for displaying linkages

    - #### display_on

          public boolean display_on

      if true, output graphical linkage diagram

    - #### display_postscript

          public boolean display_postscript

    - #### display_constituents

          public int display_constituents

      if true, output treebank-style constituent structure

    - #### display_bad

          public boolean display_bad

      if true, bad linkages are displayed

    - #### display_links

          public boolean display_links

      if true, a list o' links is printed out

    - #### input

          public java.io.InputStream input

      Set the input reader

    - #### out

          public java.io.PrintStream out

      Set the output writer

    - #### default_switches

          ParseOptions.Switch[] default_switches

    - #### user_command

          static ParseOptions.UserCommand[] user_command

  - ### Constructor Detail

    - #### ParseOptions

          public ParseOptions()

      Here's where the values are initialized
      - verbosity = 5;
      - linkage_limit = 100;
      - disjunct_cost = GlobalBean.MAX_DISJUNCT_COST;
      - min_null_count = 0;
      - max_null_count = 0;
      - null_block = 1;
      - islands_ok = false;
      - cost_model = new VDALCostModel();
      - short_length = 6;
      - all_short = false;
      - twopass_length = 30;
      - max_sentence_length = 70;
      - resources = new Resources();
      - display_short = true;
      - display_word_subscripts = true;
      - display_link_subscripts = true;
      - display_walls = false;
      - display_union = false;
      - allow_null = true;
      - echo_on = false;
      - batch_mode = false;
      - screen_width = 79;
      - display_on = true;
      - display_postscript = false;
      - display_constituents = 0;
      - display_bad = false;
      - display_links = false;
      - out = System.out;
      - input = System.in;

  - ### Method Detail

    - #### parse_options_set_cost_model_type

          public void parse_options_set_cost_model_type(ParseOptions opts,
                                               int cm)

    - #### parse_options_set_verbosity

          public void parse_options_set_verbosity(int dummy)

    - #### parse_options_get_verbosity

          public int parse_options_get_verbosity()

    - #### parse_options_set_linkage_limit

          public void parse_options_set_linkage_limit(int dummy)

    - #### parse_options_get_linkage_limit

          public int parse_options_get_linkage_limit()

    - #### parse_options_set_disjunct_cost

          public void parse_options_set_disjunct_cost(int dummy)

    - #### parse_options_get_disjunct_cost

          public int parse_options_get_disjunct_cost()

    - #### parse_options_set_min_null_count

          public void parse_options_set_min_null_count(int val)

    - #### parse_options_get_min_null_count

          public int parse_options_get_min_null_count()

    - #### parse_options_set_max_null_count

          public void parse_options_set_max_null_count(int val)

    - #### parse_options_get_max_null_count

          public int parse_options_get_max_null_count()

    - #### parse_options_set_null_block

          public void parse_options_set_null_block(int dummy)

    - #### parse_options_get_null_block

          public int parse_options_get_null_block()

    - #### parse_options_set_islands_ok

          public void parse_options_set_islands_ok(boolean dummy)

    - #### parse_options_get_islands_ok

          public boolean parse_options_get_islands_ok()

    - #### parse_options_set_short_length

          public void parse_options_set_short_length(int short_length)

    - #### parse_options_get_short_length

          public int parse_options_get_short_length()

    - #### parse_options_set_all_short_connectors

          public void parse_options_set_all_short_connectors(boolean val)

    - #### parse_options_get_all_short_connectors

          boolean parse_options_get_all_short_connectors()

    - #### parse_options_set_max_sentence_length

          public void parse_options_set_max_sentence_length(int dummy)

    - #### parse_options_get_max_sentence_length

          public int parse_options_get_max_sentence_length()

    - #### parse_options_set_echo_on

          public void parse_options_set_echo_on(boolean dummy)

    - #### parse_options_get_echo_on

          public boolean parse_options_get_echo_on()

    - #### parse_options_set_batch_mode

          public void parse_options_set_batch_mode(boolean dummy)

    - #### parse_options_get_batch_mode

          public boolean parse_options_get_batch_mode()

    - #### parse_options_set_allow_null

          public void parse_options_set_allow_null(boolean dummy)

    - #### parse_options_get_allow_null

          public boolean parse_options_get_allow_null()

    - #### parse_options_set_screen_width

          public void parse_options_set_screen_width(int dummy)

    - #### parse_options_get_screen_width

          public int parse_options_get_screen_width()

    - #### parse_options_set_display_on

          public void parse_options_set_display_on(boolean dummy)

    - #### parse_options_get_display_on

          public boolean parse_options_get_display_on()

    - #### parse_options_set_display_postscript

          public void parse_options_set_display_postscript(boolean dummy)

    - #### parse_options_get_display_postscript

          public boolean parse_options_get_display_postscript()

    - #### parse_options_set_display_constituents

          public void parse_options_set_display_constituents(ParseOptions opts,
                                                    int dummy)

    - #### parse_options_get_display_constituents

          public int parse_options_get_display_constituents()

    - #### parse_options_set_display_bad

          public void parse_options_set_display_bad(boolean dummy)

    - #### parse_options_get_display_bad

          public boolean parse_options_get_display_bad()

    - #### parse_options_set_display_links

          public void parse_options_set_display_links(boolean dummy)

    - #### parse_options_get_display_links

          public boolean parse_options_get_display_links()

    - #### parse_options_set_display_walls

          public void parse_options_set_display_walls(boolean dummy)

    - #### parse_options_get_display_walls

          public boolean parse_options_get_display_walls()

    - #### parse_options_set_display_union

          public void parse_options_set_display_union(boolean dummy)

    - #### parse_options_get_display_union

          public boolean parse_options_get_display_union()

    - #### parse_options_reset_resources

          public void parse_options_reset_resources()

    - #### clean_up_string

          public void clean_up_string(java.lang.StringBuffer s)

    - #### issue_special_command

          public void issue_special_command(java.lang.String line,
                                   Dictionary dict)

    - #### print_time

          void print_time(java.lang.String s)

    - #### print_total_time

          void print_total_time()

    - #### is_numerical_rhs

          boolean is_numerical_rhs(java.lang.String s)

    - #### left_print_string

          public void left_print_string(java.lang.String s,
                               java.lang.String t)

    - #### print_expression

          public void print_expression(Exp n)