26.12.2013 Views

A computational grammar and lexicon for Maltese

A computational grammar and lexicon for Maltese

A computational grammar and lexicon for Maltese

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.5.2 Binding of runtime tokens<br />

Binding is a solution to the fact that (i) GF does not allow gluing suffixes to tokens at runtime,<br />

<strong>and</strong> (ii) storing hundreds or thous<strong>and</strong>s of inflection <strong>for</strong>ms in a table becomes very inefficient<br />

in terms of the time <strong>and</strong> space required to compile to PGF. This solution works by introducing<br />

a special bind token &+ in between tokens which should be linearised as a single word during<br />

unlexing. This process of unlexing is deterministic <strong>and</strong> simple.<br />

However, the lexing process — which requires the re-insertion of the bind token between<br />

stems <strong>and</strong> suffixes — can be problematic. Since this lexing must occur as a pre-processing step<br />

be<strong>for</strong>e input to the runtime, the lexer must essentially work without any access to the <strong>grammar</strong><br />

rules defined in the GF modules. This means that without re-implementing potentially large<br />

parts of the morphological rules in an discrete lexer, ambiguities may arise. In <strong>Maltese</strong> <strong>for</strong><br />

example, the suffix -u may be an enclitic pronoun indicating possession on a noun, e.g. qalbu<br />

(‘his heart’), as well as a regular conjugational ending of a verb: e.g. talbu (‘they prayed’). The<br />

<strong>for</strong>mer is composed of the stem qalb <strong>and</strong> the pronominal suffix -u, which should be lexed into<br />

tokens ["qalb","&+","u"]. However a naïve external lexer may also try to lex talbu in the same<br />

way, which would be incorrect.<br />

Thus is it clear that any lexing process must have at least some knowledge of the <strong>grammar</strong><br />

itself, although the current GF implementation has no real support <strong>for</strong> this. As a result, without<br />

further developments in the runtime, this resource <strong>grammar</strong> is of very limited use <strong>for</strong> parsing.<br />

The same is true of other resource <strong>grammar</strong>s which using this binding solution.<br />

2.5.3 Pattern matching on runtime strings<br />

The inability to pattern match or per<strong>for</strong>m any query operations on strings at runtime can have<br />

a big effect on the design of a <strong>grammar</strong>. This becomes especially evident when stem changes<br />

occur during affixation, often referred to as S<strong>and</strong>hi. In <strong>Maltese</strong> <strong>for</strong> example, the verb fetħet<br />

(‘she opened’) undergoes a vowel change from e → i when suffixed by an enclitic pronoun -<br />

hom to become fetħithom (‘she opened them’). The joining of verb stems <strong>and</strong> suffixes occurs at<br />

the syntax level, <strong>for</strong> example in the ComplSlash function from the VerbMlt module. Yet by this<br />

point it is too late to analyse the verb stem <strong>and</strong> per<strong>for</strong>m any required vowel changes. Instead,<br />

all possible verb stems must be computed within the morphological paradigm <strong>and</strong> stored in<br />

its inflection table. The selection of the correct stem must then be based on some other criteria,<br />

such as parameter values.<br />

2.5.4 Non-existent <strong>for</strong>ms<br />

Partial functions<br />

All functions in GF must be total; <strong>for</strong> example, if the function PassV2 has type signature V2 -><br />

VP then it must be defined <strong>for</strong> any term of type V2. It is possible to imagine situations where<br />

no passive verb phrase can be constructed out of a certain 2-place verb. Yet it is not possible to<br />

implement PassV2 in such a way that it may only defined <strong>for</strong> some terms of type V2. This could<br />

44

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

Saved successfully!

Ooh no, something went wrong!