Title: Logic, Language and Learning
1Logic, Language and Learning
Chapter 8 Morphology Luc De Raedt (Following
Covington)
2Outline
- Todays lecture- morphology
3Morphology
4Introduction (1)
- Morphology how words are formed from components
(morphemes) - Consists of two processes inflection and
derivation - Inflection creating the various forms of each
word - Create -gt created or creating
5Introduction (1)
- Derivation creating new words from pre-existing
words often of different syntactic categories - Create -gt creation
- Contrast to syntax in most languages morphology
is finite! - Thus, one could simply list all possible forms in
computer implementations.
6Introduction (2)
- Irregularitychild - children,corpus - corpora,
etc. - Practical questionHow many rules? How many
facts? - Trade-off
7Introduction (3)
- Morphologically complex words can be broken up
into several meaningful units called morphs. - dogs dogs dishes dishes undoing
undoing unrealities unrealitys - If two morphs are equivalent, then they are
allomorphs of the same morpheme (e.g. s of dogs
and es of dishes are allomorphs of the English
plural morpheme).
8Introduction (4)
- English words zero or more prefixes, followed by
root, followed by zero or more suffixes - untouchables untouchables
- Focus here on English- a morphological parser
in Prolog- two-level morphology
9A Morphological Parser in Prolog
10A morphological parser for English inflection (1)
11A morphological parser for English inflection (2)
12Morphographemic rules
- Final e deletion if suffix begins with a
vowelrakeing rakingrakeed raked - y-to-i rule final y changes to i before any
suffix that does not begin with icarryed
carriedbut carrying carrying and
delayeddelayed - s-to-es rule suffix s, on both nouns and verbs,
appears as es after s, z, x, sh, ch, and after y
which has changed to igrasss grasses, dishs
dishes - Final consonant doubling single final consonant
doubles before any suffix that begins with a
vowelgrabedgrabbed, bigerbigger
13Lexical look-up by letter trees (tries) (1)
14Lexical look-up by letter trees (tries) (2)
- ltree(?Tree) Stores the lexicon as a
letter tree.ltree( b, a, r, k, bark,
c, a, r, r, y, carry,
t, cat, e, g, o, r,
y, category, d, e, l, a, y,
delay, h, e, l, p, help,
o, p, hop, e,
hope, q, u, a, r, r, y,
quarry, i, z, quiz,
o, t, e, quote ).
15Use of ltree (1)
- mparse(Word,-Result) Retrieves morph.
description of Word (a charlist).mparse(Word,Res
ult) - ltree(T), find_word(Word,T,Result).
find_word(Word,Tree,-LexEntry) Finds Word
in Tree retrieving LexEntry.find_word(HT,Tree
,LexEntry) - find_branch(H,Tree,SubTree),
find_word(T,SubTree,LexEntry).find_word(,LexE
ntry_,LexEntry) - \ (LexEntry __).
16Use of ltree (2)
- find_branch(Letter,Tree,-LexEntry) Given
a letter and a tree, returns the appropriate
(unique) subtree. Deterministic.find_branch(Let
ter,LetterLexEntry_,LexEntry) - !.
Found it there is only one.find_branch(Letter,
L__,_) - Letter _at_lt L, !, fail. Went
past where it should be don't search any
further.find_branch(Letter,_Rest,LexEntry)
- find_branch(Letter,Rest,LexEntry).
Haven't found it yet, so advance to next branch.
17Some English inflectional endings
18Revised letter tree with more information
19Morphological parser (1)
20Morphological parser (2)
21Morphological parser (3)
22Morphological parser (4)
23Two-Level Morphology
24Introduction (1)
- Morphographemics relationship between underlying
form and surface form - Underlying form listed in lexicon
- Surface form actually occurring
25Introduction (1)
- Morphographemic rules map from underlying form to
surface form - From quizs to quiz-es to quizzes
- Often, the morphological parser has to "deal with
elements that aren't there" (e.g., e-deletion)
26Introduction (2)
- Needed morphological parser that is guided by
the lexicon - Problem of string comparison step through
surface form, letter by letter, and
simultaneously step through the underlying form
given by one of the rules - u n r a k e e d
u n 0 r a k 0 0 e d
27Two-level morphology
- (Koskenniemi, 1983), implemented in KIMMO system
by (Karttunen, 1983) - Key insights- multi-level rules can be
combined- most rules are independent and can
operate in parallel- each rule can be
implemented efficiently as a
deterministic finite-state transducer
28 Finite-state transducer
for final e-deletion
Rule e0 ltgt CC _ 0 VV Map into XY
underlying X corresponds to surface Y
29Finite state transducer in Prolog (1)
- To test ?- transduce(1,State,r,a,k,e,,e,d,S
urface). state(Old,-New,?Undl,?Surf)
Allows moving from state Old to state New by
accepting Undl and Surf characters.state(1,2,C,C
) - \ vowel(C), !.state(1,1,X,X).state(2,3,e,0
) - !.state(2,2,C,C) - \ vowel(C),
!.state(2,1,X,X).state(3,4,,0).state(4,5,V,V)
- vowel(V).state(5,1,X,X).
30Finite state transducer in Prolog (2)
- final_state(?N) - N is a state in which
the transducer can stop.final_state(1).final_st
ate(2).final_state(5). vowel(V) - V is a
vowel.vowel(a). vowel(e). vowel(i).
vowel(o). vowel(u). vowel(y).
transduce(Start,Finish,UndlString,SurfString)tra
nsduce(Start,Finish,UUndlString,SSurfString)
- state(Start,Next,U,S), transduce(Next,Fini
sh,UndlString,SurfString).transduce(Start,Start,
,) - final_state(Start).