net.sf.jlinkgrammar

## Class GlobalBean

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

-     public class GlobalBean
      extends java.lang.Object

  This is a hacked construct. This bean holds several constructs and variables needed across the entire link grammar program. This should be a parent and all link grammar objects should derive from it. That way we better encapsulate the variables.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `AND_type`
    `static java.lang.String` | `ANDABLE_CONNECTORS_WORD` Defins the name of a special string in the dictionary.
    `static int` | `BAD_WORD` the indiction in a word field that this connector cannot be used -- is obsolete.
    `static int` | `batch_errors`
    `static int` | `BOTH_LABEL` to connect the "both" to the following "and"
    `static int` | `BUILDEXPR`
    `static char` | `CLOSE_BRACKET`
    `static int` | `COMMA_LABEL` to hook the comma to the following "and"
    `static char` | `COMMENT_CHAR` input lines beginning with this are ignored
    `static int` | `CONNECTOR_type`
    `static int` | `CType_CLOSE`
    `static int` | `CType_OPEN`
    `static int` | `CType_WORD`
    `static java.lang.String` | `DEFAULTPATH`
    `static int` | `DICTPARSE`
    `static int` | `DISPLAY_MAX`
    `static int` | `DOWN_priority`
    `static java.lang.String` | `ED_WORD` Defins the name of a special string in the dictionary.
    `static int` | `EITHER_LABEL` to connect the "either" to the following "or"
    `static int` | `GENTLE` These parameters tell power_pruning, to tell whether this is before or after generating and disjuncts.
    `static int` | `HT_SIZE`
    `static java.lang.String` | `HYPHENATED_WORD` Defins the name of a special string in the dictionary.
    `static java.lang.String` | `ING_WORD` Defins the name of a special string in the dictionary.
    `static int` | `input_char`
    `static boolean` | `input_pending`
    `static int` | `INTERNALERROR`
    `static java.lang.String` | `LEFT_WALL_DISPLAY` the string to use to show the wall
    `static java.lang.String` | `LEFT_WALL_SUPPRESS` If this connector is used on the wall, then suppress the display of the wall bogus name to prevent ever suppressing
    `static java.lang.String` | `LEFT_WALL_WORD` Defins the name of a special string in the dictionary.
    `static int` | `LINE_LIMIT`
    `static int` | `LINKSET_DEFAULT_SEED`
    `static int` | `LINKSET_MAX_SETS`
    `static int` | `LINKSET_SEED_VALUE`
    `static int` | `LINKSET_SPARSENESS`
    `static java.lang.String` | `lperrmsg`
    `static int` | `lperrno`
    `static java.lang.String` | `LY_WORD` Defins the name of a special string in the dictionary.
    `static int` | `MAX_DISJUNCT_COST` Max disjunct cost to allow
    `static int` | `MAX_HEIGHT`
    `static int` | `MAX_LINE` maximum number of chars in a sentence
    `static int` | `MAX_LINKS` This is the maximum number of links allowed.
    `static int` | `MAX_PATH_NAME` file names (including paths) should not be longer than this
    `static int` | `MAX_SENTENCE` maximum number of words in a sentence
    `static int` | `MAX_STRIP`
    `static int` | `MAX_TOKEN_LENGTH` maximum number of chars in a token
    `static int` | `MAX_WORD` maximum number of chars in a word
    `static int` | `MAXCONSTITUENTS`
    `static int` | `MAXINPUT`
    `static int` | `MAXSUBL`
    `static int` | `NEGATIVECOST` This is a hack that allows one to discard disjuncts containing connectors whose cost is greater than given a bound.
    `static int` | `NEITHER_LABEL` to connect the "neither" to the following "nor"
    `static char` | `NO_LABEL`
    `static int` | `NO_WORD`
    `static int` | `NOCUTOFF` no connector will have cost this high
    `static int` | `NODICT`
    `static int` | `NORMAL_LABEL` the labels >= 0 are used by fat links while -1 is used for normal connectors
    `static int` | `NOT_LABEL` to connect the "not" to the following "but"
    `static int` | `NOTINDICT`
    `static int` | `NOTONLY_LABEL` to connect the "not" to the following "only"
    `static java.lang.String` | `NUMBER_WORD` Defins the name of a special string in the dictionary.
    `static char` | `OPEN_BRACKET`
    `static ParseOptions` | `opts`
    `static int` | `OR_type`
    `static char` | `PARSE_WITH_DISJUNCT_COST_GT_0`
    `static java.lang.String` | `PL_PROPER_WORD` Defins the name of a special string in the dictionary.
    `static java.lang.String` | `POSTPROCESS_WORD` Defins the name of a special string in the dictionary.
    `static int` | `PP_FIRST_PASS`
    `static int` | `PP_LEXER_MAX_LABELS`
    `static int` | `PP_MAX_DOMAINS`
    `static int` | `PP_MAX_UNIQUE_LINK_NAMES` just needs to be approximate
    `static int` | `PP_SECOND_PASS`
    `static java.lang.String` | `PROPER_WORD` Defins the name of a special string in the dictionary.
    `static java.lang.String` | `RIGHT_WALL_DISPLAY` the string to use to show the wall
    `(package private) static java.lang.String` | `RIGHT_WALL_SUPPRESS` Supress if this connector is used on the wall
    `static java.lang.String` | `RIGHT_WALL_WORD` Defins the name of a special string in the dictionary.
    `static int` | `RTSIZE` size of random table for computing the hash functions.
    `static int` | `RUTHLESS`
    `static java.lang.String` | `S_WORD` Defins the name of a special string in the dictionary.
    `static int` | `SEPARATE`
    `static int` | `SHORT_LEN`
    `static int` | `STAT_calls_to_equality_test`
    `static int` | `STAT_N_disjuncts` keeping statistics
    `static int` | `THIN_priority`
    `static char` | `UNGRAMMATICAL`
    `static java.lang.String` | `UNKNOWN_WORD` Defins the name of a special string in the dictionary.
    `static java.lang.String` | `UNLIMITED_CONNECTORS_WORD` Defins the name of a special string in the dictionary.
    `static int` | `UNLIMITED_LEN`
    `static int` | `UP_priority`
    `static int` | `VDAL` CostModel sort by Violations, Disjunct cost, And cost, Link cost
    `static int` | `WORDFILE`
    `static int` | `WType_NONE`
    `static int` | `WType_PTYPE`
    `static int` | `WType_QDTYPE`
    `static int` | `WType_QTYPE`
    `static int` | `WType_STYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GlobalBean()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `batch_process_some_linkages(int label, Sentence sent, ParseOptions opts)`
    `static int` | `fget_input_char(java.io.InputStream in, ParseOptions opts)`
    `static boolean` | `fget_input_string(java.lang.StringBuffer input_string, java.io.InputStream in, java.io.PrintStream out, ParseOptions opts)`
    `static void` | `left_append_string(java.lang.StringBuffer string, java.lang.String s, java.lang.String t)` Prints s then prints the last |t|-|s| characters of t.
    `static void` | `process_some_linkages(Sentence sent, ParseOptions opts)`
    `static boolean` | `special_command(java.lang.StringBuffer input_string, Dictionary dict)`
    `static int` | `strip_off_label(java.lang.StringBuffer input_string)`
    `static int` | `there_was_an_error(int label, Sentence sent, ParseOptions opts)`

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

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

- - ### Field Detail

    - #### NEGATIVECOST

          public static final int NEGATIVECOST

      This is a hack that allows one to discard disjuncts containing connectors whose cost is greater than given a bound. This number plus the cost of any connectors on a disjunct must remain negative, and this number multiplied times the number of costly connectors on any disjunct must fit into an integer.
      See Also:
        Constant Field Values

    - #### NOCUTOFF

          public static final int NOCUTOFF

      no connector will have cost this high
      See Also:
        Constant Field Values

    - #### LEFT_WALL_DISPLAY

          public static final java.lang.String LEFT_WALL_DISPLAY

      the string to use to show the wall
      See Also:
        Constant Field Values

    - #### LEFT_WALL_SUPPRESS

          public static final java.lang.String LEFT_WALL_SUPPRESS

      If this connector is used on the wall, then suppress the display of the wall bogus name to prevent ever suppressing
      See Also:
        Constant Field Values

    - #### RIGHT_WALL_DISPLAY

          public static final java.lang.String RIGHT_WALL_DISPLAY

      the string to use to show the wall
      See Also:
        Constant Field Values

    - #### RIGHT_WALL_SUPPRESS

          static final java.lang.String RIGHT_WALL_SUPPRESS

      Supress if this connector is used on the wall
      See Also:
        Constant Field Values

    - #### LEFT_WALL_WORD

          public static final java.lang.String LEFT_WALL_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### RIGHT_WALL_WORD

          public static final java.lang.String RIGHT_WALL_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### POSTPROCESS_WORD

          public static final java.lang.String POSTPROCESS_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### ANDABLE_CONNECTORS_WORD

          public static final java.lang.String ANDABLE_CONNECTORS_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### UNLIMITED_CONNECTORS_WORD

          public static final java.lang.String UNLIMITED_CONNECTORS_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### PROPER_WORD

          public static final java.lang.String PROPER_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### PL_PROPER_WORD

          public static final java.lang.String PL_PROPER_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### HYPHENATED_WORD

          public static final java.lang.String HYPHENATED_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### NUMBER_WORD

          public static final java.lang.String NUMBER_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### ING_WORD

          public static final java.lang.String ING_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### S_WORD

          public static final java.lang.String S_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### ED_WORD

          public static final java.lang.String ED_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### LY_WORD

          public static final java.lang.String LY_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### UNKNOWN_WORD

          public static final java.lang.String UNKNOWN_WORD

      Defins the name of a special string in the dictionary.
      See Also:
        Constant Field Values

    - #### MAX_PATH_NAME

          public static final int MAX_PATH_NAME

      file names (including paths) should not be longer than this
      See Also:
        Constant Field Values

    - #### MAX_WORD

          public static final int MAX_WORD

      maximum number of chars in a word
      See Also:
        Constant Field Values

    - #### MAX_LINE

          public static final int MAX_LINE

      maximum number of chars in a sentence
      See Also:
        Constant Field Values

    - #### MAX_SENTENCE

          public static final int MAX_SENTENCE

      maximum number of words in a sentence
      See Also:
        Constant Field Values

    - #### MAX_LINKS

          public static final int MAX_LINKS

      This is the maximum number of links allowed. It cannot be more than 254, because I use word MAX_SENTENCE+1 to indicate that nothing can connect to this connector, and this should fit in one byte (if the word field of a connector is an (unsigned char)
      See Also:
        Constant Field Values

    - #### MAX_TOKEN_LENGTH

          public static final int MAX_TOKEN_LENGTH

      maximum number of chars in a token
      See Also:
        Constant Field Values

    - #### MAX_DISJUNCT_COST

          public static final int MAX_DISJUNCT_COST

      Max disjunct cost to allow
      See Also:
        Constant Field Values

    - #### DOWN_priority

          public static final int DOWN_priority

      See Also:
        Constant Field Values

    - #### UP_priority

          public static final int UP_priority

      See Also:
        Constant Field Values

    - #### THIN_priority

          public static final int THIN_priority

      See Also:
        Constant Field Values

    - #### NORMAL_LABEL

          public static final int NORMAL_LABEL

      the labels >= 0 are used by fat links while -1 is used for normal connectors
      See Also:
        Constant Field Values

    - #### UNLIMITED_LEN

          public static final int UNLIMITED_LEN

      See Also:
        Constant Field Values

    - #### SHORT_LEN

          public static final int SHORT_LEN

      See Also:
        Constant Field Values

    - #### NO_WORD

          public static final int NO_WORD

      See Also:
        Constant Field Values

    - #### OR_type

          public static final int OR_type

      See Also:
        Constant Field Values

    - #### AND_type

          public static final int AND_type

      See Also:
        Constant Field Values

    - #### CONNECTOR_type

          public static final int CONNECTOR_type

      See Also:
        Constant Field Values

    - #### GENTLE

          public static final int GENTLE

      These parameters tell power_pruning, to tell whether this is before or after generating and disjuncts. GENTLE is before RUTHLESS is after.
      See Also:
        Constant Field Values

    - #### RUTHLESS

          public static final int RUTHLESS

      See Also:
        Constant Field Values

    - #### PP_LEXER_MAX_LABELS

          public static final int PP_LEXER_MAX_LABELS

      See Also:
        Constant Field Values

    - #### VDAL

          public static final int VDAL

      CostModel sort by Violations, Disjunct cost, And cost, Link cost
      See Also:
        Constant Field Values

    - #### HT_SIZE

          public static final int HT_SIZE

      See Also:
        Constant Field Values

    - #### RTSIZE

          public static final int RTSIZE

      size of random table for computing the hash functions. must be a power of 2
      See Also:
        Constant Field Values

    - #### NODICT

          public static final int NODICT

      See Also:
        Constant Field Values

    - #### DICTPARSE

          public static final int DICTPARSE

      See Also:
        Constant Field Values

    - #### WORDFILE

          public static final int WORDFILE

      See Also:
        Constant Field Values

    - #### SEPARATE

          public static final int SEPARATE

      See Also:
        Constant Field Values

    - #### NOTINDICT

          public static final int NOTINDICT

      See Also:
        Constant Field Values

    - #### BUILDEXPR

          public static final int BUILDEXPR

      See Also:
        Constant Field Values

    - #### INTERNALERROR

          public static final int INTERNALERROR

      See Also:
        Constant Field Values

    - #### LINKSET_SPARSENESS

          public static final int LINKSET_SPARSENESS

      See Also:
        Constant Field Values

    - #### LINKSET_MAX_SETS

          public static final int LINKSET_MAX_SETS

      See Also:
        Constant Field Values

    - #### LINKSET_DEFAULT_SEED

          public static final int LINKSET_DEFAULT_SEED

      See Also:
        Constant Field Values

    - #### PP_FIRST_PASS

          public static final int PP_FIRST_PASS

      See Also:
        Constant Field Values

    - #### PP_SECOND_PASS

          public static final int PP_SECOND_PASS

      See Also:
        Constant Field Values

    - #### MAXINPUT

          public static final int MAXINPUT

      See Also:
        Constant Field Values

    - #### DISPLAY_MAX

          public static final int DISPLAY_MAX

      See Also:
        Constant Field Values

    - #### COMMENT_CHAR

          public static final char COMMENT_CHAR

      input lines beginning with this are ignored
      See Also:
        Constant Field Values

    - #### UNGRAMMATICAL

          public static final char UNGRAMMATICAL

      See Also:
        Constant Field Values

    - #### PARSE_WITH_DISJUNCT_COST_GT_0

          public static final char PARSE_WITH_DISJUNCT_COST_GT_0

      See Also:
        Constant Field Values

    - #### NO_LABEL

          public static final char NO_LABEL

      See Also:
        Constant Field Values

    - #### BAD_WORD

          public static final int BAD_WORD

      the indiction in a word field that this connector cannot be used -- is obsolete.
      See Also:
        Constant Field Values

    - #### PP_MAX_DOMAINS

          public static final int PP_MAX_DOMAINS

      See Also:
        Constant Field Values

    - #### LINKSET_SEED_VALUE

          public static final int LINKSET_SEED_VALUE

      See Also:
        Constant Field Values

    - #### PP_MAX_UNIQUE_LINK_NAMES

          public static final int PP_MAX_UNIQUE_LINK_NAMES

      just needs to be approximate
      See Also:
        Constant Field Values

    - #### LINE_LIMIT

          public static final int LINE_LIMIT

      See Also:
        Constant Field Values

    - #### DEFAULTPATH

          public static final java.lang.String DEFAULTPATH

      See Also:
        Constant Field Values

    - #### MAX_STRIP

          public static final int MAX_STRIP

      See Also:
        Constant Field Values

    - #### MAX_HEIGHT

          public static final int MAX_HEIGHT

      See Also:
        Constant Field Values

    - #### COMMA_LABEL

          public static final int COMMA_LABEL

      to hook the comma to the following "and"
      See Also:
        Constant Field Values

    - #### EITHER_LABEL

          public static final int EITHER_LABEL

      to connect the "either" to the following "or"
      See Also:
        Constant Field Values

    - #### NEITHER_LABEL

          public static final int NEITHER_LABEL

      to connect the "neither" to the following "nor"
      See Also:
        Constant Field Values

    - #### NOT_LABEL

          public static final int NOT_LABEL

      to connect the "not" to the following "but"
      See Also:
        Constant Field Values

    - #### NOTONLY_LABEL

          public static final int NOTONLY_LABEL

      to connect the "not" to the following "only"
      See Also:
        Constant Field Values

    - #### BOTH_LABEL

          public static final int BOTH_LABEL

      to connect the "both" to the following "and"
      See Also:
        Constant Field Values

    - #### MAXCONSTITUENTS

          public static final int MAXCONSTITUENTS

      See Also:
        Constant Field Values

    - #### MAXSUBL

          public static final int MAXSUBL

      See Also:
        Constant Field Values

    - #### OPEN_BRACKET

          public static final char OPEN_BRACKET

      See Also:
        Constant Field Values

    - #### CLOSE_BRACKET

          public static final char CLOSE_BRACKET

      See Also:
        Constant Field Values

    - #### CType_OPEN

          public static final int CType_OPEN

      See Also:
        Constant Field Values

    - #### CType_CLOSE

          public static final int CType_CLOSE

      See Also:
        Constant Field Values

    - #### CType_WORD

          public static final int CType_WORD

      See Also:
        Constant Field Values

    - #### WType_NONE

          public static final int WType_NONE

      See Also:
        Constant Field Values

    - #### WType_STYPE

          public static final int WType_STYPE

      See Also:
        Constant Field Values

    - #### WType_PTYPE

          public static final int WType_PTYPE

      See Also:
        Constant Field Values

    - #### WType_QTYPE

          public static final int WType_QTYPE

      See Also:
        Constant Field Values

    - #### WType_QDTYPE

          public static final int WType_QDTYPE

      See Also:
        Constant Field Values

    - #### batch_errors

          public static int batch_errors

    - #### input_pending

          public static boolean input_pending

    - #### input_char

          public static int input_char

    - #### opts

          public static ParseOptions opts

    - #### lperrno

          public static int lperrno

    - #### lperrmsg

          public static java.lang.String lperrmsg

    - #### STAT_N_disjuncts

          public static int STAT_N_disjuncts

      keeping statistics

    - #### STAT_calls_to_equality_test

          public static int STAT_calls_to_equality_test

  - ### Constructor Detail

    - #### GlobalBean

          public GlobalBean()

  - ### Method Detail

    - #### left_append_string

          public static void left_append_string(java.lang.StringBuffer string,
                                java.lang.String s,
                                java.lang.String t)

      Prints s then prints the last |t|-|s| characters of t. if s is longer than t, it truncates s.

    - #### strip_off_label

          public static int strip_off_label(java.lang.StringBuffer input_string)

    - #### special_command

          public static boolean special_command(java.lang.StringBuffer input_string,
                                Dictionary dict)

    - #### batch_process_some_linkages

          public static void batch_process_some_linkages(int label,
                                         Sentence sent,
                                         ParseOptions opts)

    - #### there_was_an_error

          public static int there_was_an_error(int label,
                               Sentence sent,
                               ParseOptions opts)

    - #### process_some_linkages

          public static void process_some_linkages(Sentence sent,
                                   ParseOptions opts)
                                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### fget_input_char

          public static int fget_input_char(java.io.InputStream in,
                            ParseOptions opts)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### fget_input_string

          public static boolean fget_input_string(java.lang.StringBuffer input_string,
                                  java.io.InputStream in,
                                  java.io.PrintStream out,
                                  ParseOptions opts)
                                           throws java.io.IOException

      Throws:
        `java.io.IOException`