Unni Cathrine Eiken February 2005

Unni Cathrine Eiken February 2005 Unni Cathrine Eiken February 2005

10.04.2013 Views

function checks if there are any members in the array ekstra. If so, the main predicate and this extra attribute are stored in the array hovedpred. If there is nothing stored in ekstra, the main predicate is simply stored in the array hovedpred. finnARG1(); Returns the semantic form of argument 1 and stores it in the array ARG1. First the arrays ARGxep, ARGxverdi, ep and ARGx are emptied and subsequently set to the corresponding argument 1 values. Then finnARGx() is called. finnARGx(); Generalized function that finds the EP where the semantic form of the argument in question is stored, calls finnARGxsemform() and returns the semantic form. For ARG1 the actions are as follows: Goes through each member in ARG1ep. If the first member of ARG0ep is EP, the entry on the same index in ARG1verdi is stored as ARGx. Goes through each member in ARG1verdi. If ARGx matches an entry in ARG1verdi, the entry on the same index in ARG0ep is retrieved and stored in the array ep. finnARGxsemform() is called. finnARGxsemform(); Generalized function that finds the semantic form of the argument in question. For ARG1 the actions are as follows: Find semantic form of double predicates, if there are any: The variable epARGx is set to the first member of the array ep (this array holds the indexes of EPs where the semantic form of ARGx is stored). Goes through the array index (holds pointers to semantic forms of double arguments), if an entry matches epARGx as EP, the index pointer is retrieved and stored in the array ARGxind. Goes through semform, if an entry matches epARGx as EP, it is removed from the array. If there are any entries in ARGxind, each member is looked at. If an entry matches an entry in ARG0verdi, the entry on the same index in ARG0ep is added to the array liste. The array semform is gone through, if an entry matches an entry from liste as EP, the semantic form is retrieved and stored in the array ARGx. Else find the semantic form of the argument in question: Goes through semform , if an entry matches epARGx as EP the semantic form is retrieved and stored in the array ARGx. If the element stored in ARGx matches ‘named’, the proper noun must be found. The array navn is searched for a pattern with epARGx as EP. The semantic form is retrieved and stored in the array ARGx. The contents of the array ARGx is stored in the array ARG1. The contents of ARG1 is in finnHoved() stored as HovedARG1. 90

finnARG2(); This function has exactly the same performance as finnARG1(), only with correspondingly different variable and array names. The contents of ARG2 is in finnHoved() stored as HovedARG2. fjernEP(); Removes elements from the arrays ARG1ep, ARG1verdi, ARG2ep and ARG2verdi if they belong to the main EP. Goes through ARG1ep and ARG2ep. If the first member of ARG0ep matches the entry, the entry and the entry on the same index in the value-array is removed. The first entry in ARG0ep and ARG0verdi is subsequently removed. sjekkEkstra(); Checks if there are more predicate-argument structures to be found, calls finnResten() if there are. Goes through ARG1ep and ARG2ep trying to match each element in ARG0ep. If there is a match, there exists a predicate with a belonging argument and finnResten() is called. finnResten(); Finds the remaining predicate-argument structures. Calls the following (sub)functions: finnPred(); finnARG1(); finnARG2(); fjernEP(); sjekkEkstra(); lagStruktur(); Creates the predicate-argument structures as printed to the output file. If HovedARG1 or HovedARG2 contains more than one element, each element is printed with predicate and argument 2. Else, hovedpred,HovedARG1 and HovedARG2 are printed to file, separated by commas. 91

function checks if there are any members in the array ekstra. If so, the main predicate and<br />

this extra attribute are stored in the array hovedpred.<br />

If there is nothing stored in ekstra, the main predicate is simply stored in the array<br />

hovedpred.<br />

finnARG1();<br />

Returns the semantic form of argument 1 and stores it in the array ARG1. First the arrays<br />

ARGxep, ARGxverdi, ep and ARGx are emptied and subsequently set to the corresponding<br />

argument 1 values. Then finnARGx() is called.<br />

finnARGx();<br />

Generalized function that finds the EP where the semantic form of the argument<br />

in question is stored, calls finnARGxsemform() and returns the semantic form.<br />

For ARG1 the actions are as follows:<br />

Goes through each member in ARG1ep. If the first member of ARG0ep is EP, the<br />

entry on the same index in ARG1verdi is stored as ARGx. Goes through each<br />

member in ARG1verdi. If ARGx matches an entry in ARG1verdi, the entry on the<br />

same index in ARG0ep is retrieved and stored in the array ep.<br />

finnARGxsemform() is called.<br />

finnARGxsemform();<br />

Generalized function that finds the semantic form of the argument in<br />

question.<br />

For ARG1 the actions are as follows:<br />

Find semantic form of double predicates, if there are any:<br />

The variable epARGx is set to the first member of the array ep (this array<br />

holds the indexes of EPs where the semantic form of ARGx is stored).<br />

Goes through the array index (holds pointers to semantic forms of double<br />

arguments), if an entry matches epARGx as EP, the index pointer is<br />

retrieved and stored in the array ARGxind. Goes through semform, if an<br />

entry matches epARGx as EP, it is removed from the array.<br />

If there are any entries in ARGxind, each member is looked at. If an entry<br />

matches an entry in ARG0verdi, the entry on the same index in ARG0ep is<br />

added to the array liste. The array semform is gone through, if an entry<br />

matches an entry from liste as EP, the semantic form is retrieved and<br />

stored in the array ARGx.<br />

Else find the semantic form of the argument in question:<br />

Goes through semform , if an entry matches epARGx as EP the semantic<br />

form is retrieved and stored in the array ARGx. If the element stored in<br />

ARGx matches ‘named’, the proper noun must be found. The array navn is<br />

searched for a pattern with epARGx as EP. The semantic form is retrieved<br />

and stored in the array ARGx.<br />

The contents of the array ARGx is stored in the array ARG1.<br />

The contents of ARG1 is in finnHoved() stored as HovedARG1.<br />

90

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!