Constraining family entries via features

Help
Jean
2010-12-28
2013-04-08
  • Jean

    Jean - 2010-12-28

    Hello,

    I'm trying to implement two different entries for the part-of-speech Det(erminer) in German: One for the definite and one for the indefinite article as they impose different constraints on the inflection type of subsequent words (definite article is followed by weakly inflected words while the indefinite article is followed by mixed inflected words) . This is what I came up with so far:

    feature {
        CASE<2>: nom gen dat acc;
        PERS<2>: 1st 2nd 3rd;
        NUM<2>: sg pl;
        GEN<2>: masc fem neut;
        DEF<2>: def indef;
        INFL<2>: weak strong mixed;
        TENSE<E>: past pres;
        SEM-NUM<X:NUM>: sg-X pl-X;
        ontology: sem-obj {
            phys-obj {
                animate-being {
                    person
                    animal }
                thing }
            situation {
                change {
                    action }
                state }
        };
    }
    rule {
        no typeraise;
    }
    word d:Det {
        der: def nom sg masc;
        .
        .
        .
    }
    word e:Det {
        ein:   indef nom sg masc;
        .
        .
        .
    }
    def sg-noun(Stem, Case, Gen, Pred, Class) {
        word Stem:N (pred=Pred class=Class) {
            *: 3rd sg sg-X Case Gen;
        }
    }
    sg-noun(Kurs,  nom, masc, rate, thing)
    .
    .
    .
    family Det(indexRel=det) {
        entry: np<2>[X, PERS=3rd, DEF=def]    /^ n<2>[X, INFL=weak];
        entry: np<2>[X, PERS=3rd, DEF=indef] /^ n<2>[X, INFL=mixed];
    }
    

    Given this, I get two parses for each article, that is both entries apply to "ein" as well as to "der" since the value of DEF gets overwritten. Is there any other way of achieving this except the one where I treat definite and indefinite articles as belonging to two different part-of-speeches?

    Greets,

    Jean

     
  • Michael White

    Michael White - 2011-01-04

    Hello Jean

    You get two parses here because for better or worse, a design decision was made early on to use feature overwriting rather than unification in lexical instantiation (better b/c overwriting is more efficient, worse b/c it's less intuitive).

    Generally in designing openccg grammars it won't pay to worry too much about minimizing the number of families.  With the dot ccg approach to defining grammars, it should be possible to minimize the redundancy involved in having separate families for the two kinds of determiners by defining string macros/functions that capture what's in common.

    -Mike

     
  • Jean

    Jean - 2011-01-18

    Thank you, Mike, this is interesting. How then do you express constraints which would be difficult to express on the level of family definitions? Say for instance I want intransitive verbs to be finite but control verbs to come with non-finite complements. Intuitively, I would do that by introducing a feature vform and constraint the families accordingly. However, since verbs need to specify their vform values, any such value specified on the family level will be overwritten and thus useless.

    Do you see my problem? I apologize if I'm missing something very crucial here, I'm still quite new to (Open)CCG.

    Thanks again for any help,

    Jean

     
  • Michael White

    Michael White - 2011-01-19

    Hi Jean

    Not sure I fully understand the question, but I can suggest you look at the 'worldcup' grammar in openccg/grammars/worldcup/.  There you'll see examples involving phrases like 'persuaded to support'.  Below I've shown illustrative bits of the morph.xml file, where macros are used to make eg 'support' have a non-finite vform.  A control verb like 'persuaded' subcategories for an infinitival verb phrase, as shown in tccg (where the 'to'-infinitival changes the vform from non-fin to inf, which is not shown).  If you look at lexicon.xml, you'll see that the vform is fin(ite) by default on the result s cat (with id=1), but the @nonfin macro overwrites this value for bare verbs.  Importantly though, note that the @nonfin macro does not change the vform feature for the subcategorized verb phrase.

    Hope this helps,
    -Mike

      <entry word="support" pos="V" macros="@nonfin"/>
    ...
      <entry pos="V" word="persuade" macros="@nonfin"/>
      <entry pos="V" word="persuades" stem="persuade" macros="@pres @+3rd-agr @sg-agr"/>
      <entry pos="V" word="persuaded" stem="persuade" macros="@past"/>
    ...
      <macro name="@nonfin">
        <fs id="1" attr="vform" val="non-fin"/>
      </macro>
      <macro name="@finite">
        <fs id="1">
          <feat attr="vform" val="fin"/>
        </fs>
      </macro>
    tccg> :f vform
    tccg> persuaded
    2 parses found.
    Parse 1: s<1>{vform=fin}\np<2>{}/(s{vform=inf}\.np<3>{})/<(s{vform=VFORM6}/.(s<4>{vform=VFORM6}\.np<
    3>{}))
    Parse 2: s<5>{vform=fin}\np<6>{}/(s{vform=inf}\.np<7>{})/<np<7>{}
    tccg> support
    2 parses found.
    Parse 1: s<1>{vform=non-fin}\np<2>{}/(s{vform=VFORM6}/.(s<3>{vform=VFORM6}\.np<4>{}))
    Parse 2: s<5>{vform=non-fin}\np<6>{}/np<7>{}
    
     

Log in to post a comment.