<<

1

¢¡¤£¦¥¨§ © ¡¤§ ¤ £   

¡£¥ § © "!# "$¨§ %&('*)),+ %-/.10¦2340¦.1536.0879": :<; 9"= . 23>0?A@¢: :B6C

 

DE§ $"!#FG§ ¡¤H I$¨§JKLMI§ ¡ N

¢POQ RQTS

DE§ $"!#FG§ ¡¤H I$¨§J "!# "$¨§

'VUW= ¤U 5 =9"C¤36:08:X;YU[Z=?9".1\]\^.19_-/Z=¤-/` =¤9 ;a:19_%bc= 236CdZAe[7)f

ghKLMI§ ¡^£¦ _iH jG§k



l

N ¢mXnoHkqpr¡§ksi£ks!"I$¨§

't00¦.u%¦v ?5 .1B>Bxw]=340¦y = z.9 U#\^=¤0U{:<; 3>0¦?|3}C¤U#3>-/C y~czzC .B6.



~*0345 =¤9C¤34UW€y: ‚ y% ~czzC .B6. y%bc= 2=¤0

RS  ƒ RSJ„

\^.134B> .100¦. C . ?5 .1B>B6†Z=¤3>0‡8B4340¦? || C =

 Q Q Q

ˆ

K #‰£¦¡¤Š#kq‹

't00¦.u%¦v ?5 .1B>Bxw]=340ŒŽ7=¤9_%UW.19  1-/`

‘’Ž ¡£¥ § © c“u !"©1§ ¡

7J3}=¤9 9"= 7.1|B”%¦:10¦2. ?



•–§ —˜E£¦¡¤™k

?9".1\ \^.19_-/Z=¤-/`13>0?yz.9 U#3}.1Bxz.19C¤340¦?y-/Z.19 U1z.19"C¤3>0?yB}:1-/.1Bx=9 9":19 9 |B6= C y%bc= 236CdZ

2

ˆ

Iks #¡¤H © šœ›ž Ÿ¢¢¡4£¥¤ž§¦x¨ ©¡¥Yª«¢¬c­®£¯­¯° ­«¢±_¨J°#¢­¯°ž¤ž§¦x­¯£¯«¢¬M«¢±c¨8²¦¦x¨ ³´³µ¨ ¦

ª › §ª ¶¢¦c±¨«¢¦c·¹¸h¢Ÿ£®­¯›º©œ¨­¯¢Ÿr«¢¬º»,¨ ¦¨°#£¯¨ ¡”»,¨ ¦x­¯£¥¬_²¨ ¬cŸt°#›ž

¨ »(»(¡¥£¥ª1¨ °"£¯«¢¬E«¢±ž¡¯«¢ª1¨ ¡¢§¦¨¦x«¢¦c¦¨¼(¡¥­,½#­®¢¿¾–ÀÁÃÂÄ ÅÄTÆ ©œÇ#Ä È/°ž£¯­

£¥¬ °"¢¬cŸ ¢Ÿ ± «¢¦c¢É{»(¢¦¨£¥³P¢¬ž°¨¨ ¡¨ ¬_ŸrŸ¢§¤ž§¡¯«¢»(³´§¬ °¨¨ ¡”¸E«¢¦¨¶GÄ È/°

›c¨­(©¢¢¬º£¥³´»(¡4¢³´§¬ °"Ÿt£¥¬E¨Jª ›c¨ ¦¨° Ê ©œ¨­¯¢Ÿt±#¦x¨ ³´§¸E«¢¦¨¶GÄ š› 

¦¨­®¼(¡¥°#£¥¬_²oª › §ª ¶¢¦¨Ë·”ª¨ ¦¨Ì*›ž¢ª ¶Ë›_¨­°"¸E«Y©œ¨­®£¥ªÍª1«¢³P»,«¢¬ ¢¬ž°¨­®Ë¨

ª ›c¨ ¦¨°ž»,¨ ¦x­¯§¦¨ËÎ]Ì^Ï(˨ ¬cŸÐ¨Jª ›_¨ ¦¨°c­®ª1¨ ¬ ¬ž¢¦¨ËÑ,¢»,«¢¦¨°#ª ›c¨ ¦¨°¨Ä š›ž

»,¨ ¦x­¯§¦c¼,­¯¢­¨J©œ«¢°"°¨«¢³ Ê ¼(»Ò­¯°"¦x¨ °#¢²ÓGÄ È/°ž©¼(£¥¡ Ÿ­,¨­³P¼(ª ›

­¯°"¦¨¼(ª °#¼(¦¨t¨­°"›  ²¦¦x¨ ³P³Ô¨ ¦c£¥¬žª ¡¥¼,Ÿ¢£¥¬c²o¡¯«¢ª¨ ¡¢¢¦¨¦x«¢¦c¦¨¼(¡¥¢­

¨ ¡¥¡¯«¢¸E­aÄ À¦¨¦x«¢¦x­¨ ¦¨¿¦¨¢ª1«¢¦xŸ¢¢Ÿ £4¬h°#›žYª ›_¨ ¦¨°#˨ ¬_Ÿ °"› t­¯ª1¨ ¬ž¬ §¦

°#¦x¨ ¤¢¦x­®­(°#› ¿ª ›c¨ ¦¨°ž£¥¬E­®¨ ¦¨ª ›h±¨«¢¦c§¦¨¦x«¢¦x­° «Y©Y¦¨§»,«¢¦¨°#ŸÄ

šœ›ž Ÿ¢¢¡4£¥¤ž§¦x¨ ©¡¥Y£4¬ ª ¡¥¼,Ÿ¢¢­¨J°"­®°c²¦¦x¨ ³´³µ¨ ¦¨Ë¨J°#­®°cŸ¢£¥ª °#£¯«¢¬_¨ ¦¨ÓË

¨ ¬cŸÐ¨J°#¢­¯°ž°#¢É{°¨Ä š›ž ²¦¦x¨ ³´³µ¨ ¦*¨ ¬cŸt°#›ž Ÿ¢£¥ª °"£¯«¢¬c¨ ¦¨ÓP¨ ¦¨

£¥¬ ª ¡4¼,Ÿ¢Ÿt£¥¬h·¹ª1¨ ¦¨Ì^› ¢ª ¶A£4¬E¨Jª1«¢³P»(£¥¡¥Ÿt± «¢¦¨³ÔÄ ÕG«¢¦c°#›ž

ª1«¢¬ ¤¢¬ž£¥¢¬žª  «¢±ž»,«¢°#¢¬ž°#£¯¨ ¡”¼,­¯§¦x­¯Ë°"› ¢ÓP¨ ¦¨t¨ ¡¯­Ö« ¨ »(»(§¬cŸ¢Ÿt£¥¬

°#› §£¥¦*«¢¦¨£¯²¦£¥¬_¨ ¡¢±¨«¢¦¨³PË°#› ¿»(¦x«¢ª Ÿ¢¼(¦x¨ ¡¢Î–Ì^Ï×±¨«¢¦¨³Ô¨ ¡4£¯­¯³µÄ Ø

­¯¼(³P³Ô¨ ¦¨ÓP«¢± °"› Y©œ¨­®£¥ªu«¢»(§¦x¨ °#£¯«¢¬_­«¢±ž°#›ž£¯­± «¢¦¨³Ô¨ ¡¥£®­¯³Ù£¯­¨ ¡®­Ö«

» ¦x«¢¤ž£¯Ÿ¢¢Ÿr¨ ¡®«¢¬c²o¸h£¥°"›h°"› Y©œ¨­®£¥ªÍ»(¦¨£4¬ ª £¥»(¡4­,«¢± °#›ž «¢»(§¦x¨ °#£¯«¢¬

«¢± °#›žYª ›_¨ ¦¨°c­®ª1¨ ¬ ¬ž¢¦¨ËÑ,¢»,«¢¦¨°"ª ›c¨ ¦¨° Ä

·”ª1¨ ¦¨Ì^› §ª ¶³Ô¨ Ӎ©Y¦¨¼(¬º£¥¬h°"¸E«Y³µ«Ÿ¢­¯Ë§£¥°#›ž¢¦c£¥¬ž°#§¦x¨ ª °#£¥¤¢¡4ÓË

­¯§¬ °#§¬ ª ¿©ÓP­¯§¬ °#§¬ ª §Ë«¢¦c£¥¬h©œ¨ °"ª ›h¤£¯¨J°"› Y£4¬ °#§¦¨±¨¨ ª 

šœ¶ª ›ž¢ª ¶§¦xÄ šœ›_«­¯¿£¥¬ °"¢¦¨¢­¯°"Ÿt£¥¬h°"¦¨Ó£¥¬c²«¢¼(° ·¹ª1¨ ¦¨Ì^› §ª ¶

­¯›_« ¼(¡¯Ÿt°#¼(¦¨¬h° «YÎ]ÎÚ½[»(¢¦xÄT­®°¨¨ ¦¨©œ¨ ª ¶Û8¡4£¥¬c²Ä ¼(¼,ÄT­®Ç{± «¢¦*¨ ¬ ¨ ª ª1«¢¼(¬ °_«¢¬h°"› Y¡®«¢ª1¨ ¡¢ª1«¢³P»(¼(°#¢¦xÄ 3

A Test Version of a Grammar Checker for Swedish

Anna Sågvall Hein & Per Starbäck Department of Linguistics Uppsala University [email protected], [email protected]

1 Introduction Here we deliver a chart-based implementation of a grammar checker for Swedish intended for testing and grammar development. The checker, ScarCheck, applies a strategy of partial parsing and the application of local error rules (Sågvall Hein 1998). It has two basic components, a chart parser, UCP (Carlsson 1981, Sågvall Hein 1983), and a chart scanner, Reportchart (Starbäck 1999). The parser builds as much structure as the grammar, including local error rules, allows. Errors are recorded in the chart, and the scanner traverses the chart in search for errors to be reported. The deliverable includes a test grammar, a test dictionary, and a test text. The grammar and the dictionary are included in ScarCheck in a compiled form. For the convenience of the user, they are also appended in their uncompiled form, the procedural UCP formalism. A brief summary of the basic operations of this formalism is also provided. ScarCheck may run in two modes, either interactively, sentence by sentence, or in batch via the interface Tkchecker. Those interested in trying out ScarCheck in its interactive mode should turn to UU ([email protected]) for an account on the local computer.

2 Basic strategy

The checker applies a combined approach to grammar checking based on robust partial parsing, and the application of local error rules. Phrase constituents are analysed by means of robust rules that accept feature violation. Error rules handle structural errors at clause and sentence level. The error rules may operate on the results of the parsing process. They are formulated in terms of phrase categories, basic syntactic categories, lemmas, and morpho- syntactic features. All the rules are integrated in one grammar. Typically, a grammar rule covers both the correct and the incorrect case(s). The grammar rules are written in a state transition style. The chart parser uses a bottom-up strategy. This is in accordance with the partial nature of the parsing process; in the general case, there will be no edge spanning the whole chart. The grammar is formulated in a procedural formalism, and the rules are invoked from the grammar (Sågvall Hein 1983). For instance, NP rules are triggered at the recognition of categories that may appear as NP introducers. Rules designed to catch erroneously deleted finite verbs are triggered at the recognition of categories that may introduce clauses. Unification of feature structures is the basic operation for testing and assignment in the procedural formalism. Errors are recorded as features with values set in accordance with an error typology (Wedbjer-Rambell 1997) that was developed in the Scarrie project. 4

The chart scanner, Reportchart, traverses the chart in search for errors. Starting at the first vertex of the chart, it inspects the feature structure of the longest inactive edge. Possible errors are recorded in the error protocol, before the attention of the scanner is directed to the edges going out from the final vertex of the current edge. The process goes on to the end of the chart. Always, the scanner selects longer edges in favour of shorter ones. If two (or more) edges of the same length span the same sequence of vertices, and at least one of them is free from errors, no error is recorded in the protocol.

3 The UCP Formalism

Here we will give a brief intuitive presentation of the UCP formalism from the perspective of the user. For a more formal presentation, see Carlsson 1981.

UCP is a chart parser, and, accordingly, processing in UCP proceeds task by task. According to the fundamental law of chart parsing, a task is formed when an active edge meets an inactive one; the rule associated with the active edge is applied to the feature structure of the inactive edge outgoing from its end vertex. Successful rule application amounts to assigning features to the feature structure of the active edge. Once the rule is satisfied, the feature structure of the active edge is stored in the chart with a new inactive edge, its feature structure. The root attribute of the feature structure of the active edge is denoted & and that of the inactive edge is denoted *.

The UCP formalism consists of a number of operators. Some of them account for the insertion of new edges into the chart, and some of them are used for testing and assignment purposes. There are also a few meta operators that may be used for rule transparency and compactness.

UCP handles dictionary search, morphological analysis, and syntactic analysis in one and the same chart. Accordingly, the inactive edges are typed: char, morph.cat, word.cat, phr.cat.1 The same rule format is used in the dictionary and in the grammar.

General rule format

(define name.of.resource-entry unit.to.be.defined #u rule.body; #! inactive.filter; #! active.filter; )

The rule body is an obligatory part of a rule whereas the two filters are optional. The rule body is a sequence (Boolean 'and') of operations formed by means of the UCP operators. The inactive filter imposes restrictions upon the feature structure of the inactive edge for a task to be generated, and the active filter does the same thing with regard to the active edge. The inactive filter specifies that or those attributes of the inactive edge that have to be present for the rule to form a task with the edge. The active filter specifies that or those attributes in the active edge that have/have not to be present for the edge to form a task with an inactive edge. Boolean operators ('and', 'or', 'not') may be used in the formulation of the filters.

1 In ScarCheck, no morphological analysis is performed. Instead, a dictionary of word forms is used. 5

An example of a definition of an entry in the word form dictionary named form.dic.

(define form.dic-entry "skuggor" #u nn.entry('skugga.nn,'utr,'plur,'indef,'basic); #! char;)

The rule body in the example consists of a single operation, a subrule call with five atomic arguments. The rule is activated as part of the dictionary search process and applies to edges only as specified by the inactive filter. The subrule nn.entry is defined in the grammar as follows:

(define sve.gram-entry nn.entry #u end.of.word, <& word.cat>:=:'noun, <& lem> :=: ?1, <& gender> :=: ?2, <& numb> :=: ?3, <& form> :=: ?4, <& case> :=: ?5, majorprocess(np_noun), store.form; )

The sub rule nn.entry is defined in grammar sve.gram, and it has a rule body consisting of a sequence of nine operations. The inactive filter is inherited from the rule that called it.

The first operation, end.of.word, is a sub rule defined as follows:

(define sve.gram-entry end.of.word #u advance, (<* char :type>='sep /<* char :whitespace>='+); )

As the name indicates, end.of.word, tests for end of word. It does so by advancing the active edge one step to the next character of the input. If this is a separator or a white character, end.of.word succeeds, and the execution of the next operation of nn.entry takes place.

The end.of.word test is expressed as an dependent disjunction ('/'; Boolean 'or') of two operations. Both are formulated by means of the identity operator ('='). The left-hand side of the identity operation is an extended path-expression. Whereas <* char> retrieves the character value of the current inactive edge from its feature structure, <* char :type> goes one step further. It retrieves the value of the property type associated with the current character in the dictionary of characters. It takes on four different values, i.e. sep (for separator), vowel, cons or digit. whitespace is a property defined for separators only. It is used to keep apart separators with a print value from those without any. It takes on two values, '+' and '-'.

If end.of.word fails, the execution of nn.entry comes to end. For instance, if the input would be "skuggorna", dictionary look-up should fail for this entry.

6

For the input "skuggor" end.of.word succeeds and the execution of nn.entry continues with six unification operations. They are formulated in terms of path expressions ('< …>'), atoms ('noun), formal parameters ('?n'), and the unification operator (':=:').

The first unification operation assigns the value 'noun to the word cat attribute of the feature structure of the active edge. The following operations assign values to the same feature structure in accordance with the parameter values.

A noun has been found, and two actions need to be taken.

The feature structure of the active edge has to be stored in a new inactive edge in the chart. This is done by means of the store.form sub rule:

(define sve.gram-entry store.form #u ( <* char :whitespace>='+, store,advance /<* char :type>='sep, minorstore), process(form.dic); ) store inserts an inactive edge in the chart from the initial vertex of the current active edge to the final vertex of the current inactive edge. In other words, an edge inserted by store spans the current active edge and the current inactive edge. This is appropriate in cases where end of the word is signalled by a whitespace character. store will included it in the edge spanning the word. If, on the other hand, end of word is signalled by a separator such as etc., it should not be included in the edge representing the word but be represented by an edge of its own. This is the effect of minorstore. It inserts an inactive edge of the same span as the active edge. The two cases are expressed as an dependent disjunction of two sequences of operations. Dictionary search has to go on, and this is the effect of process(form.dic). process inserts an active edge from and to the final vertex of the current active edge. Its argument is form.dic, the name of the ScarCheck word form dictionary.

Further, a noun may introduce an NP, and for the recognition of such an NP an active edge with an appropriate NP-rule has to be inserted into the chart. This is done by means of the operation majorprocess(np_noun). The np_noun edge will form a task with the inactive edge representing the noun ("skuggor") and processing will go on.

The tasks are scheduled in an agenda from where they are selected for execution. Processing stops when the agenda is exhausted.

The example given above refers to dictionary look-up in a word form dictionary. Below we present a fragment of the syntactic grammar. For the sake of the presentation, it has been quite simplified. (The full version of the current test grammar is included in ScarCheck in its compiled form and may be found in Appendix A in the UCP format.) np-quant is invoked at the retrieval of pronouns which may appear as attributive quantifiers in NPs, such as någon [some, any], många [many]. The first operation of np_quant is a word category test. Then a dependent disjunction follows, in which the pronominal type of the pronoun is tested. After that several assignments are made to the active edge by means of unification. In the first unification operation the value np is assigned to the phrase category attribute of the active edge. An np introduced by a quantifier is indefinite, and the definite 7

attribute is accordingly set in the next operation. Number, gender, and form are set by means of the assign subrule. (It has one operation only, i.e. <& ?1> :=: <* ?1>.) The form attribute refers to the species of the head noun of the np. (It should be in the indefinite form.) This concludes the assignments to be made. A pronominal quantifier may appear as an NP on its own without a head noun, and, consequently, the NP, that has been recognised, so far, is stored. However, a head noun may follow, and an advancement to np.quant.noun is motivated. ______(define sve.gram-entry np_quant #u <* word.cat>='pron, (<* pron.type> = 'quant /<* pron.type> = 'indef), <& phr.cat>:=:'np <& def>:=:'indef, assign(numb), assign(gender), assign(form), store, advance(np.quant_noun));

#! word.cat;)

Figure 1: A simplified version of np_quant ______

(define sve.gram-entry np.quant_noun #u <* word.cat> = 'noun, (assign(numb) /<& err :new>:=:'gpnpag01), (assign(gender) /<& err :new>:=:'gpnpag02), (assign(form) /<& err :new>:=:'gpnpag03), assign(case), store;

#! word.cat;)

Figure 2: A simplified version of np.quant_noun ______

The first operation of np.quant_noun is a test for a noun. If the operation succeeds, the number feature of the active edge (the quantifier) is unified with the number feature of the inactive edge (the noun) by means of assign(numb). If the operation succeeds, the next operation in the sequence, i.e. assign(gender) will be executed. If, on the other hand, the value of the number feature of the quantifier disagrees with the value of the number feature of the noun, a number agreement feature has to be recorded. This is done by means of the operation <& err :new>:=:'gpnpag01. Errors are recorded under the err feature. However, since there may be more than one error in a constituent, a second error level is required. This is achieved 8

by means of the :new attribute. It enumerates new number attributes every time it is called starting by 1. The final operation of the np.quant_noun rule is storing the feature structure of the active edge (with or without up to three errors) as the feature structure of an inactive edge.

In the examples presented above, the majority of the UCP operators were introduced. Below we summarise them:

Chart building operators process(arg) inserts an active edge from and to the final vertex of the active edge; arg is the name of a dictionary or a grammar rule majorprocess(arg) inserts an active edge from and to the initial vertex of the active edge; arg is a grammar rule advance(arg) inserts an active edge from the initial vertex of the active edge to the final vertex of the inactive edge; arg is a subrule name; if it is left out, the next operation in the rule sequence will be executed store inserts an inactive edge from the initial vertex of the active edge to the final vertex of the inactive edge; it inherits its feature structure from the active edge minorstore inserts an inactive edge from the initial vertex of the active edge to the final vertex of the active edge; it inherits its feature structure from the active edge

Operators for test and assignment

Unification :=:

Equality =

Not not

Path <* val1 …valn> denotes the value of the attribute specified by the path from * to valn in the feature structure of the inactive edge

<* char :property> denotes the value of property associated with the character attribute of the inactive edge in the dictionary of characters

<* lem :property> denotes the value of property associated with the lemma attribute of the inactive edge in the dictionary of lemmas

9

<& val1 … valn> denotes the value of the attribute specified by the path from & to valn in the feature structure of the active edge

<& val1 … valn :new> generates a new integer attribute in the feature structure of the active edge starting by 1 and adding 1 with every new call

<& val1 … valn :last> denotes the value of the last attribute in the path specified by val1 to valn in the feature structure of the active edge

Nil nil a symbolic feature value that unifies with any other value

Atom 'atom a distinct symbolic feature value

Control operators

Sequence (op1 , op2 , … , opn) Boolean 'and'

Dependent disjunction (op1 / op2 / … /opn) Boolean 'or'

Independent disjunction (op1 // op2 // … //opn) parallel processing

If-then (if op1 then op2 else op3) condition

Subrule rulename('val1, 'val2, … 'valn) subrule call (with optional parameters)

True value continue always true

False value failure always false

4 How to Run ScarCheck

ScarCheck is implemented in Lisp and runs on the Unix platform. It is invoked by means of the command scarcheck, and function calls to the program are formulated as Lisp expressions.

The checker is called by means of the process command with the string to be examined as its first argument.

(p "string" (traceflag)) p is short for process; it invokes the checker with "string" as its first argument. The second argument traceflag sets the trace level of the parsing process. If it is left out no trace will be given. If it is set, the parser goes 10

into an interactive mode of the type specified by the trace flag, and the user has to respond by trace commands.

Available trace flags. ======CHART traces chart insertions. SCHEDULING traces agenda insertions. SELECTION traces selection of tasks. SEARCH traces dictionary search. RULEENTRY, RULEEXIT traces entry and exit for grammar rules. RULESTEP single-steps grammar rule execution.

TRACE commands. ====== empty line - continues. TYPE ... does (TYPE ...). EDIT ... does (EDIT ...). BT gives a backtrace of invoked grammar rules. ENV displays task's features and control stack. LISP enters LISP mode. SCROLL makes the trace scroll by itself. QUIT abandons the execution. TO Tracing is inhibited until is reached. + ... TRACE flags are switched on. - ... TRACE flags are switched off. ? displays flag status. ?? displays this text.

We will start the illustration of ScarCheck with a simple example without any trace.

>(p "mörka skuggor ") [dark shadows]

1 parse, 15 vertices. T > (reportchart)

This is an np and it is correct. Thus reportchart gives no message. We may look at the result of the analysis by means of the command (printresult):

> (printresult) mörka skuggor : (* = (PHR.CAT = NP NUMB = PLUR DEF = INDEF GENDER = UTR ATTR = (PHR.CAT = ADJP) CASE = BASIC))

OK We may also have a look at a graphical representation of the final chart by means of 11

(show):

> (show) 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15| .-m-.-ö-.-r-.-k-.-a-.-_-.-s-.-k-.-u-.-g-.-g-.-o-.-r-.-_-. .-MÖRK.AV------.-SKUGGA.NN------. .-ADJP------.-NP------. .-NP------. 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| 11| 12| 13| 14| 15|

>

By means of the type command we may also print single edges in the chart, specifying initial and final vertices. t as a fourth (optional) argument selects inactive edges only, e.g.

> (type chart 7 15 t)

7--15 Creator: 90 Features: (* = (PHR.CAT = NP NUMB = PLUR GENDER = UTR CASE = BASIC DEF = INDEF HEAD.FORM = <* DEF> HEAD = (WORD.CAT = NOUN)))

7--15 Creator: 78 Features: (* = (WORD.CAT = NOUN LEM = SKUGGA.NN GENDER = UTR NUMB = PLUR FORM = INDEF CASE = BASIC))

(15 VERTICES) >

Now, let's have a look at the same example with a species error:

> (p "mörka skuggorna")

1 parse, 17 vertices. T > (reportchart) FELTEXT: mörka skuggorna FEL: species agreement in premodifier - noun

> (pr) mörka skuggorna : (* = (PHR.CAT = NP NUMB = PLUR DEF = INDEF GENDER = UTR ATTR = (PHR.CAT = ADJP) ERR = (1 = GPNPAG03) CASE = BASIC))

OK

12

4.1 Tkchecker

It is loaded by means of the unix command tkchecker.2 The Filer buttton provides options for loading and checking a text file, for cleaning the window, and for exiting from tkchecker. Processing is done in batch. When checking a text, tkchecker highlights erroneous text segments (cf. Feltext). Grammatical errors are flashed red and missing words green. You make click a highlighted text segment, and tkchecker will present an error message in the window below the text window. Via the Märken button you may clean the checked text from flashings. The Parser button provides an option for loading a fixfile. The default name of the fixfile is scarcheckpatch.grm.

References

Carlsson, Mats, 1981, Uppsala Chart Parser 2: System Documentation Report No. UCDL-R-81-1. Uppsala University. Center for Computational Linguistics. [revised 1982]

2 Unfortunately, cannot provide access to tkchecker to external users. 13

Sågvall Hein, Anna, 1983. A Parser for Swedish. Status Report for Sve.Ucp. February 1983. Report No. UCDL-R-83-2. Uppsala University. Center for Computational Linguistics.

Starbäck, Per, 1999, ScarCheck – a Software for Word and Grammar Checking. This issue.

Wedbjer Rambell, Olga, 1998. Error Typology for Automatic Proof-reading Purposes. SCARRIE, Deliverable 2.1, version 1.1. Uppsala University. Department of Linguistics. 14

Appendix A: The dictionary and the grammar in the UCP formalism

;;;;;;;;;;;; file "scarcheck.grm")

;; (in-package "UCP")

(define application morph sve.gram)

(define grammar sve.gram)

;;;;;;;;;;;;;;;;; DICTIONARY SEARCH RULES ;;;;;;;;;;;;;;;;;;

(load "chardic.grm")

(define sve.gram-entry start.rule #u process(convert.case),fprocess.dic; #! char; ) ;; The first process.dic is special (define sve.gram-entry fprocess.dic #u :=:'+, process(form.dic,), advance.to.sep, advance.to.nonsep, process(process.dic); ) (define sve.gram-entry process.dic #u process(form.dic), advance.to.sep, advance.to.nonsep, process(process.dic); #! char; ) (define sve.gram-entry advance.to.sep #u (<* char :type>='sep, not <* char>='- /advance, advance.to.sep); ) (define sve.gram-entry advance.to.nonsep #u (<* char :type>='sep, advance, advance.to.nonsep /continue); ) (define sve.gram-entry end.of.word #u advance, (<* char :type>='sep /<* char :whitespace>='+); ) (define sve.gram-entry store.form #u (<* char :whitespace>='+, store,advance /<* char :type>='sep, minorstore), process(form.dic); )

;;;;;;;;;;;;;;;;;;;;;;; GENERAL SUBRULES ;;;;;;;;;;;;;;;;;;;;

(define sve.gram-entry assign #u <& ?1> :=: <* ?1>; ) (define sve.gram-entry assign.majorprocess #u majorprocess(?1); ) ;;;;;;;;;;;;;;;;;;;;;;; DICTIONARY ;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;; lexical insertion rules ;;;;;;;;;;;;;

15

(load "lexins.grm")

;;;;;;;;;;;;;;;;;;;;;;; dictionary entries ;;;;;;;;;;;;;;;;;;

(define dictionary form.dic (search-key #! char;) (forward-action #u advance;) (gathering-rule #u continue;))

(load "adjadvdic.grm") (load "conjdic.grm") (load "digitsdic.grm") (load "noundic.grm") (load "numdic.grm") (load "pnoundic.grm") (load "prepdic.grm") (load "prondic.grm") (load "sepdic.grm") (load "vbdic.grm") (load "phrdic.grm")

;;;;;;;;;;;;;;;;;;;;;;; PHRASE CONSTITUENT RULES

;;;;;;;;;;;;;;;;;;;;;;; advp and adjp ;;;;;;;;;;;;;;;;;;;;

(define sve.gram-entry advp #u <& phr.cat>:=:'advp, (<* word.cat>='adv /<* word.cat>='adj, <* a-form>='t,not <* adv>='-), <& first>:=:<*>, advance, ((<* word.cat>='adv /<* word.cat>='adj,<* a-form>='t, not <* adv>='-),<& second>:=:<*>,store /minorstore), assign.majorprocess(adjp_advp);

#! word.cat; ) (define sve.gram-entry adjp_adj #u <& phr.cat>:=:'adjp, (<* word.cat>='adj /<* word.cat>='part), <& adj1 word.cat>:=:<* word.cat>, assign(gender),assign(numb),assign(case), assign(a-form), store,assign.majorprocess(np_adjp), advance, ((<* word.cat> = 'conj,not <* subju> /<* word.cat> = 'sep, <* lem> = 'comma.sr), assign.majorprocess(adjp.coord_adjp) /<* word.cat> = 'adj, (if <& adj1 word.cat>='part,<& a-form>='a ,<* a-form>='t then failure else store), (assign(a-form) /<& err :new> :=: 'gpapag02), <& adj2 word.cat> :=: <* word.cat>, store, advance, <* word.cat> = 'adj, assign(def), assign(gender), assign(numb), assign(func), store);

#! word.cat; ) (define sve.gram-entry adjp_advp #u <& phr.cat>:=:'adjp, <* phr.cat>='advp,<& mod>:=:<*>, advance, 16

<* phr.cat>='adjp, <& head>:=:<*>, store;

#! phr.cat; ) (define sve.gram-entry adjp.coord_conj #u <* word.cat>:=:'conj, <& :new>:=:<*>, advance(adjp.coord_adjp);

#! word.cat; ) (define sve.gram-entry adjp.coord_adjp #u <* phr.cat> = 'adjp, not <* 1>, <& phr.cat> :=: 'adjp, <& :new> :=: <*>, (<& 3>, (<& 1 a-form>=<* a-form> /<& err :new>:=:'GPAPAG01), store /continue), advance(adjp.coord_conj);

#! phr.cat; ) ;;;;;;;;;;;;;;;;;; np rules ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define sve.gram-entry np_adjp #u <& phr.cat> :=: 'np, (<* phr.cat> = 'adjp /<* phr.cat> = 'vp.part), <* func> :=:'attr, <& numb>:=:<* numb>, <& def>:=:<* def>, <& def>:=:'indef, <& gender>:=:<* gender>, <& attr phr.cat>:=:<* phr.cat>, (<* err>,<& err :new>:=:<* err> /continue), advance(np.adjp_noun);

#! phr.cat; #! not poss and not quant and not det; ) (define sve.gram-entry np.adjp_noun #u <* word.cat> = 'noun, (assign(numb) / <& err :new>:=:'gpnpag01), (assign(gender) / <& err :new>:=:'gpnpag02), (<& def>:=:<* form> / <& err :new>:=:'gpnpag03), assign(case), store, advance(noun.tail);

#! word.cat; ) (define sve.gram-entry noun.tail #u (<& case>='gen, majorprocess(np_poss) /continue), (<* phr.cat>='pp,<& post.attr pp>:=:<*>,minorstore /<* phr.cat>='pnp, (<& numb>:=:<* numb> /<& err :new>:=:'GPNPAG08), store);

#! phr.cat or word.cat; ) (define sve.gram-entry np_det 17

#u <& phr.cat> :=: 'np, <* det.type> = 'det, <& det word.cat>:=:<* word.cat>, <& def>:=:'def, <& form>:=:<* form>, <& numb>:=:<* numb>, <& gender>:=:<* gender>, (<* first>='+, majorprocess(cl.decl) /continue), (advance(np.det_adjp.or.noun) //advance(np.det_quant) //advance(np.det_sel));

#! det.type; ) (define sve.gram-entry np.det_adjp.or.noun #u (<* phr.cat> = 'adjp, (<* err>,<& err :new>:=:<* err> /continue), (<& numb>:=:'sing, (<& def>:=:'indef,not <* a-form>='a/<& def>:=:'def) /<& numb>:=:'plur /<& err :new>:=:'GPNPAG03), <* func>:=:'attr, assign(numb), (assign(gender) /<& err :new>:=:'GPNPAG02), <& attr phr.cat> :=:<* phr.cat>, advance(np.det.adjp_noun) /<* word.cat> = 'noun, (assign(numb) /<& err :new>:=:'gpnpag01), (assign(gender) /<& err :new>:=:'gpnpag02), (assign(form) /<& err :new>:=:'gpnpag03), <& head word.cat>:=:<* word.cat>,store, (<& det word.cat>='art, advance(det.rel.tail) /continue));

#! word.cat or phr.cat; ) (define sve.gram-entry np.det.adjp_noun #u <* word.cat> = 'noun, (assign(numb) / <& err :new>:=:'gpnpag01), (assign(gender) / <& err :new>:=:'gpnpag02), (assign(form) / <& err :new>:=:'gpnpag03), assign(case), <& head word.cat> :=:<* word.cat>,store, (<& det word.cat>='art,not <& err :last>='gpnpag01, advance(det.rel.tail) /continue), (<& case>:=:'gen,assign.majorprocess(np_poss) /continue);

#! word.cat; ) (define sve.gram-entry np.det_quant #u (<& def>/<& def>:=:'indef), ((<* det.type> = 'quant /<* pron.type> = 'quant /<* pron.type> = 'indef /<* word.cat> = 'digits /<* phr.cat> = 'qp), assign(gender), (assign(numb) /<& err :new>:=:'gpnpag01), 18

<& quant word.cat>:=:<* word.cat>, (<* word.cat>='pron,store, advance(den.rel.tail) //advance(np.det_adjp.or.noun)));

#! word.cat or phr.cat; ) (define sve.gram-entry np.det_sel #u <& phr.cat> :=:'np, <* det.type>='select, assign(numb), <& def>:=:'def, <& sel word.cat>:=:<* word.cat>, advance(np.det_adjp.or.noun);

#! det.type; ) (define sve.gram-entry np_noun #u <* word.cat> = 'noun, <& phr.cat>:=:'np, <& numb> :=: <* numb>, (<& numb>:=:'sing //<& numb>:=:'plur), <& gender>:=:<* gender>, <& case>:=:<* case>, <& def>:=:<* form>, <& head.form>:=:<* form>, <& head word.cat>:=:<* word.cat>, store, (<* first>,assign.majorprocess(cl.decl) /continue), advance(noun.tail);

#! word.cat; #! not poss and not det and not quant;

) (define sve.gram-entry np_pnoun #u <* word.cat> = 'pnoun, <& gender>:=:<* gender>, <& numb>:=:'sing, <& case>:=:<* case>, <& phr.cat>:=:'pnp, store, advance, <* word.cat>='pnoun,store;

#! word.cat; ) (define sve.gram-entry np_poss #u <& phr.cat> :=: 'np, (<* phr.cat> = 'np, (<* case> = 'gen /<* 1 case>='gen), <& def> :=: 'def, (<* err>,<& err :new>:=:<* err> /continue), <& poss phr.cat> :=:<* phr.cat> /<* word.cat>='ps, <& numb>:=:<* numb>, <& gender> :=: <* gender>, <& poss word.cat> :=:<* word.cat>), (<* first>,assign.majorprocess(cl.decl) /continue), advance(np.poss_adjp.or.noun);

#! phr.cat or word.cat; ) 19

(define sve.gram-entry np.poss_adjp.or.noun #u <& phr.cat>:=:'np, <& poss>, (<* phr.cat>= 'adjp, <& attr phr.cat>:=:<* phr.cat>, <* func>:=:'attr, (<* def>:=:'def,<* numb>:=:<& numb> /<& err :new>:=:'gpnpag03), advance(np.poss.adjp_noun) //<* word.cat> = 'noun, (<& numb>:=:<* numb> /not <& err>,<& err :new>:=:'gpnpag01 /<& err>), (<& gender>:=:<* gender> /not <& err>,<& err :new>:=:'gpnpag02 /<& err>), (<& form>:=:<* form> /not <& err>,<& err :new> :=: 'gpnpag03 /<& err>), <& case>:=:<* case>, store), advance(noun.tail);

#! word.cat or phr.cat; ) (define sve.gram-entry np.poss.adjp_noun #u <* word.cat> = 'noun, <* form>:=:'indef, (<& numb>:=:<* numb> /<& err :new>:=:'gpnpag01), (<& gender>:=:<* gender> /<& err :last >='gpnpag01 /<& err :new>:=:'gpnpag02), <& case>:=:<* case>, store, advance(noun.tail);

#! word.cat; ) (define sve.gram-entry np_pron #u <* word.cat> = 'pron, not <* det.type>, <& phr.cat> :=: 'np, <& head word.cat>:=:<* word.cat>, assign(numb),assign(case),assign(gender),store, (<* case> = 'gen,assign.majorprocess(np_poss) /continue), (<* first>,assign.majorprocess(cl.decl) /continue), advance(den.rel.tail);

#! word.cat; ) (define sve.gram-entry den.rel.tail #u (<* word.cat>='pv,<* numb>='nil /<* word.cat>='pron,<* case>='subj), <& rel word.cat>:=:<* word.cat>, advance, <* word.cat>='verb, (<* inff>='fin,<* verb.type>='main, <& tense>:=:<* tense>, advance, <* word.cat>='verb,<* inff>='fin, <* verb.type>='main,<& tense>=<* tense>,minorstore /<* inff>='inf,<& err :new>:=:'gpvffv01, <& verb word.cat>:=:<* word.cat>,store); #! word.cat; ) 20

(define sve.gram-entry det.rel.tail #u (<* word.cat>='pv,<* numb>='nil /<* word.cat>='pron,<* case>='subj), <& rel word.cat>:=:<* word.cat>, (<& err :last>='gpnpag03,<& noerr :new>:=:'gpnpag03, minorstore /<& err :new>:=:'gpnpag04,minorstore), advance, <* word.cat>='verb, (<* inff>='fin,<* verb.type>='main, <& tense>:=:<* tense>, advance, <* word.cat>='verb,<* inff>='fin, <* verb.type>='main,<& tense>=<* tense>,minorstore /<* inff>='inf,<& err :new>:=:'gpvffv01,store);

#! word.cat; ) (define sve.gram-entry np_quant #u ((<* det.type> = 'quant /<* pron.type> = 'quant /<* pron.type> = 'indef /<* word.cat> = 'digits /<* phr.cat> = 'qp), <& phr.cat>:=:'np, <& quant word.cat>:=:<* word.cat>, <& def>:=:'indef, assign(numb),assign(gender),assign(form), store, (<* word.cat>='pron, advance(den.rel.tail) //advance(np.det_adjp.or.noun)));

#! word.cat or phr.cat; #! not det; ) (define sve.gram-entry np_sel #u <& phr.cat> :=:'np, <* det.type>='select, assign(numb), assign(gender), assign(form), <& def>:=:'def, <& sel word.cat>:=:<* word.cat>, advance(np.det_adjp.or.noun);

#! det.type; #! not det and det.type; ) (define sve.gram-entry np_tot #u <& phr.cat> :=:'np, <* det.type>='tot, assign(numb), assign(gender), assign(form), <& tot word.cat>:=:<* word.cat>, ((<& gender>='neutr/<& numb>='plur),store /continue), advance(np_noun);

#! det.type; ) ;;;;;;;;;;;;;;;; pp rules ;;;;;;;;;;;;;;;;;

(define sve.gram-entry pp_prep #u <* word.cat>='prep, <& phr.cat>:=:'pp, <& prep word.cat>:=:<* word.cat>, 21

advance(pp.prep_np);

#! word.cat; ) (define sve.gram-entry pp.prep_np #u <* phr.cat>='np, (<* case>='subj,<& err :new>:=:'gppcof01 /continue), <& pobj phr.cat>:=:<* phr.cat>, (<* err>,<& err :new>:=:<* err> /continue), (<* noerr>,<& noerr :new>:=:<* noerr> /continue), store;

#! phr.cat; ) ;;;;;;;;;;;;;;;;;; vp rules ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define sve.gram-entry vp_part #u adjp_adj;

#! word.cat; )

;;;;;;;;;;;;;;; LOCAL ERROR RULES ;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;; fragments at clause and sentence level

(define sve.gram-entry cl.decl #u <& phr.cat>:=:'cl.decl.frag, <* phr.cat>='np, (<* case>:=:'basic /<* case>:=:'subj), <& subj phr.cat>:=:<* phr.cat>, advance(vfin);

#! phr.cat; ) (define sve.gram-entry cl.expl #u <& phr.cat>:=:'cl.sub.frag, <* word.cat>='conj, <* subju>='+, <& subju word.cat>:=:<* word.cat>, advance(cl.expl_np);

#! subju; ) (define sve.gram-entry cl.expl_np #u <* phr.cat>='np, (<* case>:=:'basic/<* case>:=:'subj), <& subj phr.cat>:=:<* phr.cat>, advance(cl.expl.np_verb);

#! phr.cat; ) (define sve.gram-entry cl.expl.np_verb #u (<* inff>='fin /<& err :new>:=:'gpvffv01, <& verb>:=:'infinite, store);

#! inff; ) (define sve.gram-entry cl_imp #u <& phr.cat>:=:'cl.imp.frag, (<* inff>='sup /<* word.cat>='part,<* part.type>='past), 22

<& imp word.cat>:=:'verb, <& err :new>:=:'gpvfmf05, (advance(cl.imp_adv) //advance(cl.imp_np));

#! word.cat and first; ) (define sve.gram-entry cl.imp_adv #u <* word.cat>='adv, <& adv word.cat>:=:<* word.cat>, advance(cl.imp_np);

#! word.cat; ) (define sve.gram-entry cl.imp_np #u <* phr.cat>='np, <& obj phr.cat>:=:<* phr.cat>, store; #! phr.cat; ) (define sve.gram-entry cl_rel #u continue;

#! word.cat; ) (define sve.gram-entry vfin #u (<* phr.cat>='vp.frag,<& err :new>:=:<* err>, <& vp phr.cat>:=:<* phr.cat>,store /<* word.cat>='verb, <& verb word.cat>:=:<* word.cat>, (<* inff>='fin,<& err>,store/ (<* inff>='imp/<* inff>='inf,not <* diat>='pass), <& err :new>:=:'gpvffv01,store) /(<* word.cat>='adv,<& adv word.cat>:=:<* word.cat>, advance, <* word.cat>='noun,<& obj word.cat>:=:<* word.cat> /<* word.cat> = 'adj,<& adj word.cat>:=:<* word.cat>, advance, (<* word.cat>='ie/<* word.cat>='conj), <& conj word.cat>:=:'conj), <& err :new>:=:'gpvvmv01, minorstore);

#! word.cat or phr.cat; ) ;;;;;;;;;;;;;;;;; vp fragments ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define sve.gram-entry vpf #u <& phr.cat>:=:'vp.frag, <* inff>='fin, <& verb1 inff>:=:<* inff>, advance, <* inff>='fin, <& verb2 inff>:=:<* inff>, <& err :new>:=:'GPVFMF01, store;

#! inff; ) ;;;;;;;;;;;;;;;;; error codes and messages ;;;;;;;;;;;;;;;;;;;;;;;;;; (setq *error-acts* '(:VAL (GPNPAG01 . "number agreement in premodifier - noun") (GPNPAG02 . "gender agreement in premodifier - noun") (GPNPAG03 . "species agreement in premodifier - noun") (GPNPAG04 . "definite noun form instead of indefinite") (GPNPAG08 . "number agreement in noun with apposition") (GPNPAG13 . "gender agreement in premodifier - pnoun") (GPAPAG01 . "agreement in coordinated adjective phrases") 23

(GPAPAG02 . "agreement in parallel adjective phrases") (GPVFFV01 . "infinite verb instead of finite") (GPVVMV01 . "finite verb missing") (GPVFMF01 . "doubled verb in the finite form") (GPVFMF05 . "supine form instead of imperative") (GPVFMV04 . "preteritum + preteritum => preteritum + infinitiv") (GPPCOF01 . "subjective form => objective form")))

;;;;;;;;;; file "chardic.grm" ;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define sve.gram-entry convert.case #u if <* char :uc> then failure if <* char :lc> then <& char>:=:<* char :lc>, store else advance, process(convert.case); #! char; )

;;;;;;;;;;;;;;;;;;;; separators ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Space: (define character | | (type sep) (whitespace +)) ; TAB: (define character | | (type sep) (whitespace +)) ; : (define character | | (type sep) (whitespace +))

(define character \. (type sep)) (define character \? (type sep)) (define character \! (type sep)) (define character \: (type sep)) (define character \, (type sep) (lexcat \,)) (define character \- (type sep)) (define character \/ (type sep)) (define character \) (type sep))

;; Define equivalent properties of upper and lower case characters (define character-both-cases a (type vowel) (fr-ba back) (op-cl open)) (define character-both-cases e (type vowel) (fr-ba neutr) (op-cl hclosed)) (define character-both-cases i (type vowel) (fr-ba neutr) (op-cl closed)) (define character-both-cases o (type vowel) (fr-ba back) (op-cl hclosed)) (define character-both-cases u (type vowel) (fr-ba back) (op-cl-clsed)) (define character-both-cases y (type vowel) (fr-ba front) (op-cl closed)) (define character-both-cases å (type vowel) (fr-ba back) (op-cl hclosed)) (define character-both-cases ä (type vowel) (fr-ba front) (op-cl open)) (define character-both-cases ö (type vowel) (fr-ba front) (op-cl hclosed)) (define character-both-cases b (type cons) (mode stop) (place bilab) (voice +)) (define character-both-cases c (type cons) (mode stop) (voice -) (place vel)) (define character-both-cases d (type cons) (mode stop) (place dent) (voice +)) (define character-both-cases f (type cons) (mode fric) (place labdent) (voice -)) (define character-both-cases g (type cons) (mode stop) (place vel) (voice +)) (define character-both-cases h (type cons) (mode fric) (place lar) (voice -)) 24

(define character-both-cases j (type cons) (mode hvowel) (voice +)) (define character-both-cases k (type cons) (mode stop) (voice -) (place vel)) (define character-both-cases l (type cons) (mode liquid) (place dent) (sonor +) (voice +)) (define character-both-cases m (type cons) (mode nasal) (place bilab) (sonor +) (voice +)) (define character-both-cases n (type cons) (mode nasal) (place dent) (sonor +) (voice +)) (define character-both-cases p (type cons) (mode stop) (voice -) (place bilab)) (define character-both-cases q (type cons) (mode stop) (voice -) (place vel)) (define character-both-cases r (type cons) (mode liquid) (sonor +) (voice +)) (define character-both-cases s (type cons) (mode fric) (place dent) (voice -) (sibil +)) (define character-both-cases t (type cons) (mode stop) (voice -) (place dent)) (define character-both-cases v (type cons) (mode fric) (place labdent) (voice +)) (define character-both-cases w (type cons) (mode fric) (place labdent) (voice +)) (define character-both-cases x (type cons) (mode stop) (voice -) (place vel) (sibil +)) (define character-both-cases z (type cons) (mode fric) (place dent) (voice +) (sibil +))

;;; Define corresponding upper and lower case characters.

(define character A (lc \a)) (define character \a (uc A)) (define character B (lc \b)) (define character \b (uc B)) (define character C (lc \c)) (define character \c (uc C)) (define character D (lc \d)) (define character \d (uc D)) (define character E (lc \e)) (define character \e (uc E)) (define character F (lc \f)) (define character \f (uc F)) (define character G (lc \g)) (define character \g (uc G)) (define character H (lc \h)) (define character \h (uc H)) (define character I (lc \i)) (define character \i (uc I)) (define character J (lc \j)) (define character \j (uc J)) (define character K (lc \k)) (define character \k (uc K)) (define character L (lc \l)) (define character \l (uc L)) (define character M (lc \m)) (define character \m (uc M)) (define character N (lc \n)) (define character \n (uc N)) (define character O (lc \o)) (define character \o (uc O)) (define character P (lc \p)) (define character \p (uc P)) (define character Q (lc \q)) (define character \q (uc Q)) (define character R (lc \r)) (define character \r (uc R)) (define character S (lc \s)) (define character \s (uc S)) (define character T (lc \t)) (define character \t (uc T)) (define character U (lc \u)) (define character \u (uc U)) (define character V (lc \v)) (define character \v (uc V)) (define character W (lc \w)) (define character \w (uc W)) (define character X (lc \x)) (define character \x (uc X)) (define character Y (lc \y)) (define character \y (uc Y)) (define character Z (lc \z)) (define character \z (uc Z)) (define character Å (lc \å)) (define character \å (uc Å)) (define character Ä (lc \ä)) (define character \ä (uc Ä)) (define character Ö (lc \ö)) (define character \ö (uc Ö))

;;;;;;;;;;;;;;;;;; digits ;;;;;;;;;;;;;;;;;;;;;;;;;;; (define character \0 (type digit)) (define character \1 (type digit)) (define character \2 (type digit)) (define character \3 (type digit)) (define character \4 (type digit)) (define character \5 (type digit)) 25

(define character \6 (type digit)) (define character \7 (type digit)) (define character \8 (type digit)) (define character \9 (type digit))

;;;;;;; file "lexins.grm" ;;;;;;;;;;;;;;;;; lexical insertion rules ;;;;;;;;;;;;;;

(define sve.gram-entry ab.entry #u end.of.word, <& word.cat> :=:'adv, <& lem> :=: ?1, <& degree> :=: ?2, <& sadv> :=: ?3, assign.majorprocess(advp), store.form; ) (define sve.gram-entry al.entry #u end.of.word, <& word.cat> :=:'art, <& lem> :=:?1, <& gender> :=:?2, <& numb> :=:?3, <& def> :=:?4, <& form> :=:?5, <& det.type> :=:?6, (<& det.type>='quant,assign.majorprocess(np_quant) /<& det.type>='det,assign.majorprocess(np_det)), store.form; ) (define sve.gram-entry av.entry #u end.of.word, <& word.cat> :=: 'adj, <& lem> :=: ?1, <& gender> :=: ?2, <& numb> :=: ?3, <& form> :=: ?4, <& a-form> :=: ?5, <& degree> :=: ?6, <& case> :=: ?7, <& adv> :=: ?8, assign.majorprocess(adjp_adj), store.form, <& a-form>='t, assign.majorprocess(advp); ) (define sve.gram-entry avfler.entry #u end.of.word, <& word.cat> :=:'adj, <& lem> :=: ?1, <& gender> :=: ?2, <& numb> :=: ?3, <& degree> :=: ?4, <& det.type> :=: ?5, assign.majorprocess(np_quant), store.form; ) (define sve.gram-entry conj.entry #u end.of.word, <& word.cat> :=: 'conj, <& lem> :=: ?1, <& struc> :=: ?2, store.form; ) (define sve.gram-entry dt.entry #u end.of.word, <& word.cat> :=: 'digits, <& lem> :=: ?1, 26

<& numb> :=: ?2, assign.majorprocess(np_quant), store.form; ) (define sve.gram-entry nl.entry #u end.of.word, <& word.cat> :=: 'num, <& lem> :=: ?1, <& num.type> :=: ?2, <& numb> :=: ?3, (<& num.type>='card,<& det.type>:=:'quant, assign.majorprocess(np_quant) /<& det.type>:=:'select,assign.majorprocess(np_sel)), store.form; ) (define sve.gram-entry nn.entry #u end.of.word, <& word.cat>:=:'noun, <& lem> :=: ?1, <& gender> :=: ?2, <& numb> :=: ?3, <& form> :=: ?4, <& case> :=: ?5, assign.majorprocess(np_noun), store.form; ) (define sve.gram-entry pc.entry #u end.of.word, <& word.cat> :=: 'part, <& lem> :=: ?1, <& part.type> :=: ?2, <& gender> :=: ?3, <& numb> :=: ?4, <& form> :=: ?5, <& a-form> :=: ?6, <& case> :=: ?7, assign.majorprocess(vp_part), store.form; ) (define sve.gram-entry pd.entry #u end.of.word, <& word.cat> :=: 'pron, <& lem> :=: ?1, <& det.type> :=: ?2, <& form> :=: ?3, <& gender> :=: ?4, <& numb> :=: ?5, <& case> :=: ?6, (<& det.type>:=:'det,assign.majorprocess(np_det) /assign.majorprocess(np_quant)), store.form; ) (define sve.gram-entry pn.entry #u end.of.word, <& word.cat> :=: 'pron, <& lem> :=: ?1, <& gender> :=: ?2, <& numb> :=: ?3, <& case> :=: ?4, assign.majorprocess(np_pron), store.form; ) (define sve.gram-entry pnattr.entry #u end.of.word, <& word.cat> :=:'pron, <& lem> :=: ?1, <& gender> :=: ?2, <& numb> :=: ?3, 27

<& form> :=: ?4, <& case> :=: ?5, <& det.type> :=: ?6, (<& det.type>='quant,assign.majorprocess(np_quant) /<& det.type>='tot,assign.majorprocess(np_tot) /<& det.type>='det,assign.majorprocess(np_det)), store.form; ) (define sve.gram-entry pnoun.entry #u end.of.word, <& word.cat> :=: 'pnoun, <& lem> :=: ?1, <& gender> :=: ?2, <& case> :=: ?3, assign.majorprocess(np_pnoun), store.form; ) (define sve.gram-entry pp.entry #u end.of.word, <& word.cat> :=: 'prep, <& lem> :=: ?1, assign.majorprocess(pp_prep), store.form; ) (define sve.gram-entry ps.entry #u end.of.word, <& word.cat> :=: 'ps, <& lem> :=: ?1, <& gender> :=: ?2, <& numb> :=: ?3, assign.majorprocess(np_poss), store.form; ) (define sve.gram-entry pv.entry #u end.of.word, <& word.cat> :=: 'pv, <& lem> :=: ?1, <& gender> :=: ?2, <& numb> :=: ?3, <& case> :=: ?4, assign.majorprocess(cl_rel), store.form; ) (define sve.gram-entry subju.entry #u end.of.word, <& word.cat> :=: 'conj, <& lem> :=: ?1, <& subju> :=: '+, assign.majorprocess(cl.expl), store.form; ) (define sve.gram-entry vb.entry #u end.of.word, <& word.cat> :=: 'verb, <& lem> :=: ?1, <& diat> :=: ?2, <& inff> :=: ?3, <& tense> :=: ?4, <& verb.type> :=: ?5, (<& inff>:=:'fin,assign.majorprocess(vpf) /<& inff>:=:'sup,<& first>,assign.majorprocess(cl_imp) /continue), store.form; )

;;;;;;;;;; file "adjadvdic.grm" (define form.dic-entry "akut" #u ab.entry('akut.ab,'pos,'-) 28

// av.entry('akut.av,'neutr,'sing,'indef,'-,'pos,'basic,'+); ) (define form.dic-entry "eget" #u av.entry('eget.av,'neutr,'sing,'indef,'-,'pos,'basic,'nil); ) (define form.dic-entry "ekonomiska" #u av.entry('ekonomisk.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "eventuell" #u av.entry('eventuell.av,'utr,'sing,'indef,'t,'pos,'basic,'-); ) (define form.dic-entry "eventuellt" #u av.entry('eventuell.av,'neutr,'sing,'indef,'t,'pos,'basic,'-) //ab.entry('eventuellt.ab,'pos,'+); ) (define form.dic-entry "faktiskt" #u av.entry('faktisk.av,'neutr,'sing,'indef,'t,'pos,'basic,'-) //ab.entry('faktiskt.ab,'pos,'+); ) (define form.dic-entry "faktiska" #u av.entry('faktisk.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "långa" #u av.entry('lång.av,'nil,'nil,'nil,'a,'pos,'basic,'-); ) (define form.dic-entry "mörka" #u av.entry('mörk.av,'nil,'nil,'nil,'a,'pos,'basic,'-); ) (define form.dic-entry "nya" #u av.entry('ny.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "nödvändigt" #u av.entry('nödvändig.av,'neutr,'sing,'indef,'t,'pos,'basic,'-); ) (define form.dic-entry "personliga" #u av.entry('personlig.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "praktiska" #u av.entry('praktisk.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "psykologisk" #u av.entry('psykologisk.av,'utr,'sing,'indef,'-,'pos,'basic,'nil); ) (define form.dic-entry "psykologiska" #u av.entry('psykologisk.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "rullstolsbundna" #u av.entry('rullstolsbunden.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "rullstolsbundne" #u av.entry('rullstolsbunden.av,'utr,'sing,'def,'-,'pos,'basic,'nil); ) (define form.dic-entry "saracensk" #u av.entry('saracensk.av,'utr,'sing,'indef,'-,'pos,'basic,'nil); ) (define form.dic-entry "saracenska" #u av.entry('saracensk.av,'nil,'nil,'nil,'a,'pos,'basic,'nil,'nil); ) (define form.dic-entry "slutgiltiga" #u av.entry('slutgiltig.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "stora" #u av.entry('stor.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "stort" #u av.entry('stor1.av,'neutr,'sing,'indef,'t,'pos,'basic,'+); ) (define form.dic-entry "större" 29

#u av.entry('stor1.av,'nil,'nil,'nil,'nil,'comp,'basic,'nil); ) (define form.dic-entry "svenska" #u av.entry('svensk.av,'nil,'nil,'nil,'a,'pos,'basic,'nil); ) (define form.dic-entry "tidiga" #u av.entry('tidig.av,'nil,'nil,'def,'a,'pos,'basic,'nil); ) ;;;;;;;;;;;;;;; adverbs ;;;;;;;;;;;;;;;; (define form.dic-entry "här" #u ab.entry('här.ab,'pos,'-); ) (define form.dic-entry "aldrig" #u ab.entry('aldrig.ab,'pos,'+); ) (define form.dic-entry "inte" #u ab.entry('inte.ab,'pos,'+); ) (define form.dic-entry "förmodligen" #u ab.entry('förmodligen.ab,'pos,'+); ) (define form.dic-entry "kanske" #u ab.entry('kanske.ab,'pos,'+); ) (define form.dic-entry "mest" #u ab.entry('mer.ab,'sup,'-); ) (define form.dic-entry "också" #u ab.entry('också.ab,'pos,'+); ) (define form.dic-entry "säkert" #u ab.entry('säkert.ab,'pos,'+); ) (define form.dic-entry "dock" #u ab.entry('dock.ab,'pos,'+); ) (define form.dic-entry "även" #u ab.entry('även.ab,'pos,'+); ) (define form.dic-entry "sedan" #u ab.entry('även.ab,'pos,'-); ) (define form.dic-entry "utan" #u ab.entry('utan.ab,'pos,'-); ) (define form.dic-entry "kanske inte" #u ab.entry ('kanske+inte.ab,'pos,'+); )

;;;;;;;;;; file "conjdic.grm")

;;;;;;;;;;;;;;;; conjunctions ;;;;;;;;;;;;; (define form.dic-entry "och" #u conj.entry('och.cn, 'simp); ) (define form.dic-entry "så" #u conj.entry('så.cn, 'simp); ) (define form.dic-entry "såväl" #u conj.entry('såväl.cn, 'comp1); ) ;;;;;;;;;;;;;;;; subjunctions ;;;;;;;;;;; (define form.dic-entry "att" #u end.of.word, <& lem> :=: 'att.ie, <& word.cat> :=: 'ie //subju.entry('att.sn); ) 30

(define form.dic-entry "om" #u pp.entry('om.pp) //subju.entry('om.sn); ) ;;;;;;;;;;;;;;;;;; file "digitsdic.grm"

;;;;;;;;;;;;;; digits ;;;;;;;;;;;;;; (define form.dic-entry "13" #u dt.entry('13.dt,'plur); ) (define form.dic-entry "50" #u dt.entry('50.dt,'plur); ) (define form.dic-entry "1994" #u dt.entry('1994.dt,'plur); ) ;;;;;;;;;;;;;;;;; file "noundic.grm" (define form.dic-entry "arbetsmarknad" #u nn.entry('arbetsmarknad.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "aggression" #u nn.entry('aggression.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "beskeden" #u nn.entry('besked.nn,'neutr,'plur,'def,'basic); ) (define form.dic-entry "beskedet" #u nn.entry('besked.nn,'neutr,'sing,'def,'basic); ) (define form.dic-entry "dag" #u nn.entry('dag.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "dagen" #u nn.entry('dag.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "ekonomi" #u nn.entry('ekonomi.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "folk" #u nn.entry('folk.nn,'neutr,'nil,'indef,'basic); ) (define form.dic-entry "förändring" #u nn.entry('förändring.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "kollega" #u nn.entry('kollega.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "krigföring" #u nn.entry('krigföring.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "maskinerna" #u nn.entry('maskin.nn,'utr,'plur,'def,'basic); ) (define form.dic-entry "maten" #u nn.entry('mat.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "mittfältsstrateg" #u nn.entry('mittfältsstrateg,'utr,'sing,'indef,'basic); ) (define form.dic-entry "medlingarna" #u nn.entry('medling.nn,'utr,'plur,'def,'basic); ) (define form.dic-entry "motor" #u nn.entry('motor.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "musik" #u nn.entry('musik.nn,'utr,'sing,'indef,'basic); ) 31

(define form.dic-entry "människor" #u nn.entry('människa.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "namn" #u nn.entry('namn.nn,'neutr,'nil,'indef,'basic); ) (define form.dic-entry "område" #u nn.entry('område.nn,'neutr,'sing,'indef,'basic); ) (define form.dic-entry "områden" #u nn.entry('område.nn,'neutr,'plur,'indef,'basic); ) (define form.dic-entry "områdena" #u nn.entry('område.nn,'neutr,'plur,'def,'basic); ) (define form.dic-entry "privatiseringen" #u nn.entry('privatisering.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "radiostation" #u nn.entry('radiostation.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "reklam" #u nn.entry('reklam.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "segerfest" #u nn.entry('segerfest.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "siffrorna" #u nn.entry('siffra.nn,'utr,'plur,'def,'basic); ) (define form.dic-entry "sjukdomsinsikt" #u nn.entry('sjukdomsinsikt.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "skuggor" #u nn.entry('skugga.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "skuggorna" #u nn.entry('skugga.nn,'utr,'plur,'def,'basic); ) (define form.dic-entry "slit" #u nn.entry('slit.nn,'neutr,'sing,'indef,'basic); ) (define form.dic-entry "sommar" #u nn.entry('sommar.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "sommaren" #u nn.entry('sommar.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "soppar" #u nn.entry('sopp.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "sång" #u nn.entry('sång.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "sårbarhet" #u nn.entry('sårbarhet.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "traktorerna" #u nn.entry('traktor.nn,'utr,'plur,'def,'basic); ) (define form.dic-entry "tro" #u vb.entry('tro.vb,'act,'inf,'nil,'main) // vb.entry('tro.vb,'act,'imp,'nil,'main) // nn.entry('tro.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "utrikesminister" #u nn.entry('utrikesminister.nn,'utr,'sing,'indef,'basic); ) 32

(define form.dic-entry "vara" #u nn.entry('vara.nn,'utr,'sing,'indef,'basic) // vb.entry('acceptera.vb,'act,'inf,'nil,'cop); ) (define form.dic-entry "vintertimmarnas" #u nn.entry('vintertimme.nn,'utr,'plur,'def,'gen); ) (define form.dic-entry "1700-talen" #u nn.entry('1700-tal.nn,'neutr,'plur,'def,'basic); ) (define form.dic-entry "1700-talet" #u nn.entry('1700-tal.nn,'neutr,'sing,'def,'basic); ) (define form.dic-entry "1800-talen" #u nn.entry('1800-tal.nn,'neutr,'plur,'def,'basic); ) (define form.dic-entry "1800-talet" #u nn.entry('1800-tal.nn,'neutr,'sing,'def,'basic); ) (define form.dic-entry "behov" #u nn.entry('behov.nn,'neutr,'nil,'indef,'basic); ) (define form.dic-entry "flotta" #u nn.entry('flotta.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "förberedelser" #u nn.entry('förberedelse.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "kommunerna" #u nn.entry('kommun.nn,'utr,'plur,'def,'basic); ) (define form.dic-entry "miljarder" #u nn.entry('miljard.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "miljarderna" #u nn.entry('miljard.nn,'utr,'plur,'def,'basic); ) (define form.dic-entry "möte" #u nn.entry('möte.nn,'neutr,'sing,'indef,'basic); ) (define form.dic-entry "soppan" #u nn.entry('soppa.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "situp" #u nn.entry('situp.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "situps" #u nn.entry('situp.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "möjligheter" #u nn.entry('möjlighet.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "gäspningar" #u nn.entry('gäspning.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "styrkor" #u nn.entry('styrka.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "kantater" #u nn.entry('kantat.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "kuriosa" #u nn.entry('kuriosum.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "beteenden" #u nn.entry('beteende.nn,'neutr,'plur,'indef,'basic); ) (define form.dic-entry "kopplingar" 33

#u nn.entry('koppling.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "koppling" #u nn.entry('koppling.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "kommentarer" #u nn.entry('kommentar.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "vittnen" #u nn.entry('koppling.nn,'neutr,'plur,'indef,'basic); ) (define form.dic-entry "datorer" #u nn.entry('dator.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "företag" #u nn.entry('företag.nn,'neutr,'nil,'indef,'basic); ) (define form.dic-entry "företrädare" #u nn.entry('företrädare.nn,'utr,'nil,'indef,'basic); ) (define form.dic-entry "försök" #u nn.entry('försök.nn,'neutr,'nil,'indef,'basic); ) (define form.dic-entry "konsekvenser" #u nn.entry('konsekvens.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "kvinnorna" #u nn.entry('kvinna.nn,'utr,'plur,'def,'basic); ) (define form.dic-entry "jordbakterier" #u nn.entry('jordbakterie.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "banor" #u nn.entry('bana.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "dagisplatser" #u nn.entry('dagisplats.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "rådet" #u nn.entry('råd.nn,'neutr,'nil,'def,'basic); ) (define form.dic-entry "sparbeting" #u nn.entry('sparbeting.nn,'neutr,'nil,'indef,'basic); ) (define form.dic-entry "sparbetinget" #u nn.entry('sparbeting.nn,'neutr,'nil,'def,'basic); ) (define form.dic-entry "öl" #u nn.entry('öl.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "telegram" #u nn.entry('telegram.nn,'neutr,'nil,'indef,'basic); ) (define form.dic-entry "år" #u nn.entry('år.nn,'neutr,'nil,'indef,'basic); ) (define form.dic-entry "flottan" #u nn.entry('flotta.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "kvinnan" #u nn.entry('kvinna.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "polisen" #u nn.entry('polis.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "tisdagen" #u nn.entry('tisdag.nn,'utr,'sing,'def,'basic); ) 34

(define form.dic-entry "utredningen" #u nn.entry('utredning.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "anläggningskostnader" #u nn.entry('anläggningskostnad.nn,'utr,'plur,'indef,'basic); ) (define form.dic-entry "kvällen" #u nn.entry('kväll.nn,'utr,'sing,'def,'basic); ) (define form.dic-entry "lagens" #u nn.entry('lag1.nn,'utr,'sing,'def,'gen); ) (define form.dic-entry "namnet" #u nn.entry('namn.nn,'neutr,'sing,'def,'basic); ) (define form.dic-entry "arm" #u nn.entry('arm.nn,'utr,'sing,'indef,'basic); ) (define form.dic-entry "avseende" #u nn.entry('avseende.nn,'neutr,'sing,'indef,'basic); ) (define form.dic-entry "fel" #u nn.entry('fel.nn,'neutr,'sing,'indef,'basic); )

;;;;;;;;;;;;;;;;;;;;;; file "numdic.grm" ;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;; numerals ;;;;;;;;;;;;;;;; (define form.dic-entry "första" #u nl.entry('första.nl,'ord,'nil); ) (define form.dic-entry "sju" #u nl.entry('sju.nl,'card,'plur); ) (define form.dic-entry "tio" #u nl.entry('tio.nl,'card,'plur); )

;;;;;;;;;;;;;;;;; file "pnoundic.grm" ;;;;;;;;;;;;;;;;; proper nouns ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define form.dic-entry "Anders" #u pnoun.entry('Anders.pm,'utr,'basic); ) (define form.dic-entry "Kristina" #u pnoun.entry('Kristina.pm,'utr,'basic); ) (define form.dic-entry "Mrs" #u pnoun.entry('Mrs.pm,'utr,'nil); ) (define form.dic-entry "Thage G" #u pnoun.entry('Thage_G.pm,'utr,'basic); ) (define form.dic-entry "Albright" #u pnoun.entry('Albright.pm,'utr,'basic); ) (define form.dic-entry "Björk" #u pnoun.entry('Björk.pm,'utr,'basic); ) (define form.dic-entry "Clinton" #u pnoun.entry('Clinton.pm,'utr,'basic); ) (define form.dic-entry "Gimo" #u pnoun.entry('Gimo.pm,'neutr,'basic); ) (define form.dic-entry "Helsingfors" #u pnoun.entry('Helsingfors.pm,'neutr,'basic); ) (define form.dic-entry "Jeltsin" #u pnoun.entry('Jeltsin.pm,'utr,'basic); 35

) (define form.dic-entry "Pettersson" #u pnoun.entry('Pettersson.pm,'utr,'basic); ) (define form.dic-entry "Primakov" #u pnoun.entry('Primakov.pm,'utr,'basic); ) (define form.dic-entry "Västerås" #u pnoun.entry('Västerås.pm,'neutr,'nil); ) ;;;;;;;;;;;;;;;;; file "prepdic.grm" ;;;;;;;;;;;;;;;;;;;; prepositions ;;;;;;;;;;;;;;;;;;; (define form.dic-entry "av" #u pp.entry('av.pp); ) (define form.dic-entry "beträffande" #u pp.entry('beträffande.pp); ) (define form.dic-entry "efter" #u pp.entry('efter.pp); ) (define form.dic-entry "för" #u pp.entry('för.pp); ) (define form.dic-entry "förutom" #u pp.entry('förutom.pp); ) (define form.dic-entry "genom" #u pp.entry('genom.pp); ) (define form.dic-entry "innan" #u pp.entry('innan.pp); ) (define form.dic-entry "i" #u pp.entry('i.pp); ) (define form.dic-entry "i samband med" #u pp.entry('i_samband_med.pp); ) (define form.dic-entry "med" #u pp.entry('med.pp); ) (define form.dic-entry "på" #u pp.entry('på.pp); ) (define form.dic-entry "till" #u pp.entry('till.pp); ) (define form.dic-entry "under" #u pp.entry('genom.pp); ) (define form.dic-entry "vid" #u pp.entry('vid1.pp); )

;;;;;;;;;;;;;;;;; file "prondic.grm"

;;;;;;;;;;;;;;;;; articles and pronouns (define form.dic-entry "en" #u al.entry('en.al,'utr,'sing,'indef,'indef,'quant); ) (define form.dic-entry "ett" #u al.entry('en.al,'neutr,'sing,'indef,'indef,'quant); ) (define form.dic-entry "den" #u al.entry('den.al,'utr,'sing,'def,'def,'det) //pn.entry('den.pn,'utr,'sing,'basic); ) 36

(define form.dic-entry "det" #u al.entry('den.al,'neutr,'sing,'def,'def,'det) //pn.entry('det.pn,'neutr,'sing,'basic); ) (define form.dic-entry "de" #u al.entry('den.al,'nil,'plur,'def,'def,'det) //pn.entry('de.pn,'nil,'plur,'subj); ) (define form.dic-entry "jag" #u pn.entry('jag.pn,'utr,'sing,'subj); ) (define form.dic-entry "mig" #u pn.entry('jag.pn,'utr,'sing,'obj); ) (define form.dic-entry "du" #u pn.entry('du.pn,'utr,'sing,'subj); ) (define form.dic-entry "dig" #u pn.entry('du.pn,'utr,'sing,'obj); ) (define form.dic-entry "vi" #u pn.entry('vi.pn,'utr,'plur,'subj); ) (define form.dic-entry "dem" #u pn.entry('de.pn,'utr,'plur,'obj); ) (define form.dic-entry "man" #u pn.entry('man.pn,'utr,'sing,'subj); ) (define form.dic-entry "den här" #u pd.entry('den_här.pd,'det,'def,'utr,'sing,'basic); ) (define form.dic-entry "det här" #u pd.entry('det_här.pd,'det,'def,'neutr,'sing,'basic); ) (define form.dic-entry "de här" #u pd.entry('den_här.pd,'det,'def,'nil,'plur,'basic); ) (define form.dic-entry "detta" #u pd.entry('denna.pd,'det,'indef,'neutr,'sing,'basic); ) (define form.dic-entry "någon" #u pd.entry('någon.pd,'quant,'indef,'utr,'sing,'basic); ) (define form.dic-entry "något" #u pd.entry('någon.pd,'quant,'indef,'neutr,'sing,'basic); ) (define form.dic-entry "några" #u pd.entry('någon.pd,'quant,'indef,'utr,'plur,'basic); ) (define form.dic-entry "han" #u pn.entry('han.pn,'utr,'sing,'subj); ) (define form.dic-entry "honom" #u pn.entry('han.pn,'utr,'sing,'obj); ) (define form.dic-entry "hans" #u ps.entry('hans.ps,'nil,'nil); ) (define form.dic-entry "hon" #u pn.entry('hon.pn,'utr,'sing,'subj); ) (define form.dic-entry "henne" #u pn.entry('hon.pn,'utr,'sing,'obj); ) (define form.dic-entry "hennes" #u ps.entry('hennes.ps,'nil,'nil); ) 37

(define form.dic-entry "deras" #u ps.entry('deras.ps,'nil,'nil); ) (define form.dic-entry "sina" #u ps.entry('sin.ps,'nil,'plur); ) (define form.dic-entry "sin" #u ps.entry('sin.ps,'utr,'sing); ) (define form.dic-entry "sitt" #u ps.entry('sin.ps,'neutr,'sing); ) (define form.dic-entry "som" #u pv.entry('som.pv,'nil,'nil,'basic); ) (define form.dic-entry "alla" #u pnattr.entry('alla.pn,'nil,'plur,'nil,'basic,'tot); ) (define form.dic-entry "flera" #u avfler.entry('fler.av,'nil,'plur,'comp,'quant) //pnattr.entry('flera.pn,'nil,'plur,'indef,'basic,'quant); ) (define form.dic-entry "många" #u pnattr.entry('mången.pn,'nil,'plur,'indef,'basic,'quant); ) (define form.dic-entry "inget" #u pnattr.entry('ingen.pn,'neutr,'sing,'indef,'basic,'quant); ) ;;;;;;;;;;;;;;;;;;;;;; file "sepdic.grm"

;;;;;;;;;;;;;;; separators ;;;;;;;;;;;;;;;;;;;;;;;; (define form.dic-entry "," #u <& lem>:=:'comma.sr, <& word.cat>:=:'sep, advance, store.form; ) ;;;;;;;;;;;;;;;;;;;;;; file "vbdic.grm"

;;;;;;;;;;;;;;;;;;;;;; verbs ;;;;;;;;;;;;;;;;;;;;;;; (define form.dic-entry "acceptera" #u vb.entry('acceptera.vb,'act,'inf,'nil,'main) // vb.entry('acceptera.vb,'act,'imp,'nil,'main); ) (define form.dic-entry "accepterade" #u vb.entry('acceptera.vb,'act,'fin,'past,'main) // pc.entry('accepterad.pc,'past,'nil,'nil,'nil,'a,'basic); ) (define form.dic-entry "besegrade" #u vb.entry('besegra.vb,'act,'fin,'past,'main) // pc.entry('besegrad.pc,'past,'nil,'nil,'nil,'a,'basic); ) (define form.dic-entry "börja" #u vb.entry('börja.vb,'act,'inf,'nil,'main) // vb.entry('börja.vb,'act,'imp,'nil,'main); ) (define form.dic-entry "dricka" #u vb.entry('dricka.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "genomföras" #u vb.entry('genomföra.vb,'pass,'inf,'nil,'main); ) (define form.dic-entry "genomfördes" #u vb.entry('genomföra.vb,'pass,'fin,'past,'main) // pc.entry('genomfördes.pc,'past,'nil,'nil,'nil,'a,'gen); ) (define form.dic-entry "drabbades" #u vb.entry('drabba.vb,'pass,'past,'main) 38

// pc.entry('drabbad.pc,'past,'nil,'nil,'nil,'a,'gen); ) (define form.dic-entry "handla" #u vb.entry('handla.vb,'act,'inf,'nil,'main) // vb.entry('handla.vb,'act,'imp,'nil,'main); ) (define form.dic-entry "saknade" #u vb.entry('sakna.vb,'act,'fin,'past,'main) // pc.entry('saknad.pc,'past,'nil,'nil,'nil,'a,'basic); ) (define form.dic-entry "starta" #u vb.entry('starta.vb,'act,'inf,'nil,'main) // vb.entry('starta.vb,'act,'imp,'nil,'main); ) (define form.dic-entry "vänta" #u vb.entry('vänta.vb,'act,'inf,'nil,'main) // vb.entry('vänta.vb,'act,'imp,'nil,'main); ) (define form.dic-entry "väntade" #u vb.entry('vänta.vb,'act,'fin,'past,'main) // pc.entry('väntad.pc,'past,'nil,'nil,'nil,'a,'basic); ) (define form.dic-entry "betänk" #u vb.entry('betänka.vb,'act,'imp,'nil,'main);)

(define form.dic-entry "betänkt" #u vb.entry('betänka.vb,'act,'sup,'nil,'main) //pc.entry('betänkt.pc,'past,'sing,'neutr,'indef,'t,'basic); ) (define form.dic-entry "använda" #u vb.entry('använda,'act,'inf,'nil,'main) //pc.entry('använd.pc,'past,'nil,'nil,'nil,'a,'basic); ) (define form.dic-entry "använder" #u vb.entry('använda,'act,'fin,'pres,'main); ) (define form.dic-entry "fästa" #u vb.entry('fästa.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "tillkommer" #u vb.entry('tillkomma.vb,'act,'fin,'pres,'main); ) (define form.dic-entry "kommer" #u vb.entry('komma.vb,'act,'fin,'pres,'main); ) (define form.dic-entry "präglas" #u vb.entry('präglas.vb,'pass,'fin,'pres,'main) //vb.entry('präglas.vb,'pass,'inf,'nil,'main); ) (define form.dic-entry "är" #u vb.entry('vara.vb,'act,'fin,'pres,'cop); ) (define form.dic-entry "blev" #u vb.entry('bli.vb,'act,'fin,'past,'cop);)

(define form.dic-entry "bytte" #u vb.entry('byta.vb,'act,'fin,'past,'main);)

(define form.dic-entry "fäste" #u vb.entry('fästa.vb,'act,'fin,'past,'main);)

(define form.dic-entry "hörde" #u vb.entry('höra.vb,'act,'fin,'past,'main);)

(define form.dic-entry "finns" #u vb.entry('finnas.vb,'act,'fin,'pres,'main);)

(define form.dic-entry "sa" 39

#u vb.entry('säga.vb,'act,'fin,'past,'main);)

(define form.dic-entry "tror" #u vb.entry('tro.vb,'act,'fin,'pres,'main); ) (define form.dic-entry "tänka" #u vb.entry('tänka.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "var" #u vb.entry('vara.vb,'act,'fin,'past,'cop) //vb.entry('vara.vb,'act,'imp,'nil,'cop)// ab.entry('var.ab,'-,'+) //pnattr.entry('var.pn,'utr,'sing,'nom,'indef,'det); ) (define form.dic-entry "avskedade" #u vb.entry('avskeda.vb,'act,'fin,'past,'main) //pc.entry('avskedad.pc,'past,'nil,'nil,'nil,'a,'basic); ) (define form.dic-entry "få" #u vb.entry('få.vb,'act,'inf,'nil,'mod) // vb.entry('få.vb,'act,'imp,'nil,'mod); ) (define form.dic-entry "får" #u vb.entry('få.vb,'act,'fin,'pres,'mod); ) (define form.dic-entry "blir" #u vb.entry('bli.vb,'act,'fin, 'pres,'cop); ) (define form.dic-entry "bli" #u vb.entry('bli.vb,'act,'inf,'nil,'cop) // vb.entry('bli.vb,'act,'imp,'nil,'cop); ) (define form.dic-entry "fortsätta" #u vb.entry('fortsätta.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "bära" #u vb.entry('bära.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "nöja" #u vb.entry('nöja.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "göra" #u vb.entry('göra.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "säga" #u vb.entry('säga.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "förenade" #u vb.entry('förena.vb,'act,'fin,'past,'main) // pc.entry('förenad.pc,'past,'nil,'nil,'nil,'a,'basic); ) (define form.dic-entry "ha" #u vb.entry('ha.vb,'act,'inf,'nil,'aux) // vb.entry('ha.vb,'act,'imp,'nil,'aux); ) (define form.dic-entry "har" #u vb.entry('ha.vb,'act,'fin,'pres,'aux); ) (define form.dic-entry "hade" #u vb.entry('ha.vb,'act,'fin,'past,'aux); ) (define form.dic-entry "haft" #u vb.entry('ha.vb,'act,'sup,'nil,'aux); ) (define form.dic-entry "kommit" #u vb.entry('komma.vb,'act,'sup,'nil,'main); ) (define form.dic-entry "liknande" 40

#u pc.entry('liknande.pc,'pres,'nil,'nil,'nil,'nil,'basic); ) (define form.dic-entry "saknat" #u vb.entry('sakna.vb,'act,'sup,'nil,'main); ) (define form.dic-entry "skyllt" #u vb.entry('skylla.vb,'act,'sup,'nil,'main); ) (define form.dic-entry "trodde" #u vb.entry('tro.vb,'act,'fin,'past,'main); ) (define form.dic-entry "träffat" #u vb.entry('träffa.vb,'act,'sup,'nil,'main); ) (define form.dic-entry "visade" #u vb.entry('visa.vb,'act,'fin,'past,'main) // pc.entry('visad.pc,'past,'nil,'nil,'nil,'a,'basic); ) (define form.dic-entry "börjar" #u vb.entry('börja.vb,'act,'fin,'pres,'main); ) (define form.dic-entry "handlar" #u vb.entry('handla.vb,'act,'fin,'pres,'main); ) (define form.dic-entry "existerar" #u vb.entry('existera.vb,'act,'fin,'pres,'main); ) (define form.dic-entry "uppleva" #u vb.entry('uppleva.vb,'act,'inf,'nil,'main); ) (define form.dic-entry "upptrappad" #u pc.entry('upptrappad.pc,'past,'utr,'sing,'indef,'-,'basic); ) (define form.dic-entry "ser" #u vb.entry('se.vb,'act,'fin,'pres,'main); ) (define form.dic-entry "kan" #u vb.entry('kunna.vb,'act,'fin,'pres,'mod); ) (define form.dic-entry "ska" #u vb.entry('skola.vb,'act,'fin,'pres,'mod); ) (define form.dic-entry "skulle" #u vb.entry('skola.vb,'act,'fin,'past,'mod); )

;;;;;;;;;;;;;;;; file "phrdic.grm"

;;;;;;;;;;;;;; phrases (define form.dic-entry "ett tiotal" #u end.of.word, <& phr.cat>:=:'qp, assign.majorprocess(np_quant), store.form; ) 41

Appendix B: The Demonstration Text

Gäspningar och liknande beteenden skulle ha en koppling till såväl aggression som sårbarhet.

Gäspningar och liknande beteenden skulle ha en kopplingar till såväl aggression som sårbarhet.

Kristina visade detta genom att göra en situp.

Kristina visade detta genom att göra en situps.

Så jag får nöja mig med ett telegram och säga att den här dagen trodde jag aldrig att jag skulle få uppleva för 50 år sedan.

Så jag får nöja mig med ett telegram och säga att de här dagen trodde jag aldrig att jag skulle få uppleva för 50 år sedan.

Bära sina skuggor

Bära sin skuggor

Ska den här soppan vara

Ska den här soppar vara

Efter förberedelser av sin nya utrikesminister, Mrs Albright, som hade ett möte med sin kollega Primakov, har den rullstolsbundne Clinton träffat Jeltsin i Helsingfors.

Efter förberedelser av sina nya utrikesminister, Mrs Albright, som hade ett möte med sin kollega Primakov, har den rullstolsbundne Clinton träffat Jeltsin i Helsingfors.

Det slutgiltiga beskedet

Det slutgiltiga beskeden

Under 1700-talet och det tidiga 1800-talet

Under 1700-talet och det tidiga 1800-talen

Thage G Pettersson har skyllt på sin företrädare Anders Björk.

Thage G Pettersson har skyllt på sina företrädare Anders Björk.

En eventuell segerfest får vänta.

En eventuellt segerfest får vänta.

De slutgiltiga siffrorna

42

Det slutgiltiga siffrorna

De första medlingarna i Västerås genomfördes 1994.

Det första medlingarna i Västerås genomfördes 1994.

Folk väntade förmodligen på de större maskinerna och traktorerna

Folk väntade förmodligen på det större maskinerna och traktorerna

De många mörka vintertimmarnas slit

Det många mörka vintertimmarnas slit

Deras förenade styrkor besegrade en saracensk flotta

Deras förenade styrkor besegrade en saracenska flotta

Förutom de sju miljarderna ska kommunerna även få

Förutom de sju miljarder ska kommunerna även få

Någon förändring av det sparbetinget blir det dock inte.

Någon förändring av det sparbeting blir det dock inte.

De kanske mest personliga områden vi

De kanske mest personliga områden

Saknade faktiska och praktiska möjligheter att

Saknade faktiskt och praktiska möjligheter att

En upptrappad psykologisk krigföring

En upptrappad psykologiska krigföring

De präglas alla av detta

De är präglas alla av detta

Det bytte dock namn i samband med den första privatiseringen under Thatcherepoken.

Det blev bytte dock namn i samband med den första privatiseringen under Thatcherepoken.

Polisen hörde flera vittnen under kvällen och utredningen kommer att fortsätta under tisdagen.

43

Polisen har hörde flera vittnen under kvällen och utredningen kommer att fortsätta under tisdagen.

Lagens långa arm fäste dock inget avseende vid detta.

Lagens långa arm fästa dock inget avseende vid detta.

Han blir den mittfältsstrateg som Gimo saknat.

Han bli den mittfältsstrateg som Gimo saknat.

De avskedade kvinnorna får rådet att starta eget.

De avskedade kvinnorna få rådet att starta eget.

Det blir sång, musik

Det bli sång, musik

Det handlar inte om 13 datorer utan ett tiotal.

Det handla inte om 13 datorer utan ett tiotal.

Det finns många som använder namnet

Det finns många som använda namnet

Om människor börjar tro på en förändring

Om människor börja tro på en förändring

Betänk också de anläggningskostnader som tillkommer.

Betänkt också de anläggningskostnader som tillkommer.

Man kanske inte har behov av

Man kanske inte behov av

Det är nödvändigt att tänka i nya banor.

Det nödvändigt att tänka i nya banor.