net.sf.jlinkgrammar

## Class PPKnowledge

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

-     public class PPKnowledge
      extends java.lang.Object

  I also, unfortunately, want to propose a new type of domain. These would include everything that can be reached from the root word of the link, to the right, that is closer than the right word of the link. (They would not include the link itself.)

  In the following sentence, then, the "Urfl_Only Domain" of the G link would include only the "O" link:

            +-----G----+
            +---O--+   +-AI+
            |      |   |   |
            hitting dogs is fun.a

  In the following sentence it would include the "O", the "TT", the "I", the second "O", and the "A".

            +----------------G---------------+
            +-----TT-----+  +-----O-----+    |
            +---O---+    +-I+    +---A--+    +-AI+
            |       |    |  |    |      |    |   |
            telling people to do stupid things is fun.a

  This would allow us to judge the following:

  kicking dogs bores me

  kicking dogs kicks dogs

  explaining the program is easy

  explaining the program is running

  (These are distinctions that I thought we would never be able to make, so I told myself they were semantic rather than syntactic. But with domains, they should be easy.)

  Modifications

  3) when postprocessing a sentence, the links of each domain are placed in a set for quick lookup, ('contains one' and 'contains none')

  7) observation: the 'contains one' is, empirically, by far the most violated rule, so it should come first in applying the rules.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) PPRule[]` | `bounded_rules`
    `(package private) PPRule[]` | `connected_rules`
    `(package private) PPRule[]` | `contains_none_rules`
    `(package private) PPRule[]` | `contains_one_rules`
    `(package private) PPLinkset` | `domain_contains_links`
    `(package private) PPLinkset` | `domain_starter_links` handles to sets of links specified in knowledge file.
    `(package private) PPRule[]` | `form_a_cycle_rules`
    `(package private) PPLinkset` | `ignore_these_links`
    `(package private) PPLinkset` | `left_domain_starter_links`
    `(package private) PPLexTable` | `lt` Internal rep'n of sets of strings from knowledge file
    `(package private) PPLinkset` | `must_form_a_cycle_links`
    `(package private) int` | `n_bounded_rules`
    `(package private) int` | `n_connected_rules`
    `(package private) int` | `n_contains_none_rules`
    `(package private) int` | `n_contains_one_rules`
    `(package private) int` | `n_form_a_cycle_rules`
    `(package private) int` | `nStartingLinks`
    `(package private) java.lang.String` | `path` Name of file we loaded from
    `(package private) PPLinkset` | `restricted_links`
    `(package private) PPLinkset` | `set_of_links_starting_bounded_domain`
    `(package private) StartingLinkAndDomain[]` | `starting_link_lookup_table`
    `(package private) PPLinkset` | `urfl_domain_starter_links`
    `(package private) PPLinkset` | `urfl_only_domain_starter_links`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PPKnowledge(ParseOptions opts, java.lang.String dictname, java.lang.String path)` read knowledge from disk into PPKnowledge

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) static void` | `check_domain_is_legal(java.lang.String p)`

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

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

- - ### Field Detail

    - #### lt

          PPLexTable lt

      Internal rep'n of sets of strings from knowledge file

    - #### path

          java.lang.String path

      Name of file we loaded from

    - #### domain_starter_links

          PPLinkset domain_starter_links

      handles to sets of links specified in knowledge file. These constitute auxiliary data, necessary to implement the rules, below. See comments in post-process.c for a description of these.

    - #### urfl_domain_starter_links

          PPLinkset urfl_domain_starter_links

    - #### urfl_only_domain_starter_links

          PPLinkset urfl_only_domain_starter_links

    - #### domain_contains_links

          PPLinkset domain_contains_links

    - #### must_form_a_cycle_links

          PPLinkset must_form_a_cycle_links

    - #### restricted_links

          PPLinkset restricted_links

    - #### ignore_these_links

          PPLinkset ignore_these_links

    - #### left_domain_starter_links

          PPLinkset left_domain_starter_links

    - #### connected_rules

          PPRule[] connected_rules

    - #### form_a_cycle_rules

          PPRule[] form_a_cycle_rules

    - #### contains_one_rules

          PPRule[] contains_one_rules

    - #### contains_none_rules

          PPRule[] contains_none_rules

    - #### bounded_rules

          PPRule[] bounded_rules

    - #### n_connected_rules

          int n_connected_rules

    - #### n_form_a_cycle_rules

          int n_form_a_cycle_rules

    - #### n_contains_one_rules

          int n_contains_one_rules

    - #### n_contains_none_rules

          int n_contains_none_rules

    - #### n_bounded_rules

          int n_bounded_rules

    - #### set_of_links_starting_bounded_domain

          PPLinkset set_of_links_starting_bounded_domain

    - #### starting_link_lookup_table

          StartingLinkAndDomain[] starting_link_lookup_table

    - #### nStartingLinks

          int nStartingLinks

  - ### Constructor Detail

    - #### PPKnowledge

          public PPKnowledge(ParseOptions opts,
                     java.lang.String dictname,
                     java.lang.String path)
                      throws java.io.IOException

      read knowledge from disk into PPKnowledge
      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### check_domain_is_legal

          static void check_domain_is_legal(java.lang.String p)