Why Choose Irish
Inflectional Morphology?
I
have chosen to work in the area of Irish morphology for many reasons.
One reason is even more evident while typing
up this script, that is, there is no option for Irish spell checking on this
word processor. Some may argue that Irish is a dead language, but if all of the country’s official documents are published in both
Irish and English, there must be some need to hold on to our native language.
Secondly, morphology is a very interesting
branch of linguistics. Computational Morphology played a significant role
during my second year of studies. With the material I had covered in Michael
Covington’s Natural Language Processing for Prolog Programmers, it was obvious
which angle I should take in implementing Irish Morphology.
The
project concentrates on the design of a morphological analyser that reads and
recognises various Irish verb forms. The Irish Language is full of irregularity
with regards to morphology. Many irregular verb forms would need to be stored
in the dictionary of a spell-checker. However, there are many regular Irish
verbs which have the same spelling
rules for various tenses. By computationally implementing morphological
processes, all regular verb forms need not be listed and memory space can be
saved.
This project material is not solely centered
on work with spell-checking, but is developed in such a way that it is a
grounding for grammar-checking, Natural Language Parsing, and Machine
Translation.
Throughout the
project I have made references to various authors. To save space and
repetition, I have given each author a reference number and indicated these in
the bibliography.
The project is
divided into two main topics, an overview of Irish morphology and an overview
of Two-Level Morphology. The first topic is subdivided into analyses of Present
and Future Tenses. The second combines the idea of Two-Level Morphology with
Irish Spelling Rules.
An
Overview of Irish Morphology
Morphology is the area of linguistics, which
attempts to describe the regularities in word structure. The underlying belief
is that a single word can be viewed as made up of one or more smaller units of
meaning, called morphemes. (Adapt. Ref. 3).
The Irish Verbal System is based on a systematical morphological process.
The “stem”
or “root” is the main morpheme of a
word – it supplies the main meaning of the word. In Irish, the stem of the verb
is its form in the 2nd person, singular, Imperative Mood.
Inflectional morphology governs this verbal system. This process creates
various forms of each word (singular and plural, present and past tense etc.);
in this case the words are verbs. The
category of the word is not changed in the process.
As Inflectional Morphology is concerned with
the combination of the stem with a grammatical morpheme, we can see how infixes
and various suffixes can change the tense of a verb.
Fig. A: Dún – close
Dúnfaidh (mé) – (I) will close
The –faidh
and the –aim morphemes are recurrent
elements of the Irish verb structure. Just by knowing the stem we can predict
the different forms. However, they occur only in combination with other
morphemes. They are therefore known as “bound
morphemes”.
“Allomorphs”
of a single morpheme are variants of a morpheme that have the same grammatical
function but a different form. There are many allomorphs which mark tense and
person in Irish. With most verb forms , the conjugated verb needs a subject mé
(I), tú (you), sé (he), sí (she), sibh (you pl), siad (they).
Fig. B: The
morpheme -faidh indicates ‘future tense’ in Irish, but so also
does -fidh,
-faimid and –fimid.
The different forms vary with both the
subject and the root.
i.e. -faimid (1st person, plural / broad root)
In
the present tense, the allomorphs –aim,
-ann, -aimid, -im, -eann, -imid have different grammatical functions.
Fig C: –aim
and –im are more closely linked as they mark the subject, in this
case
1st person, plural.
-aimid and –imid have the same similarities,
not only indicating that they are morphemes of the present tense but also that
the subject is 1st person, plural.
In order to create spelling rules, we must
identify broad vowels (a/o/u) from slender vowels (e/i). If the final vowel in
the stem is broad, it is known as a broad stem, and if the final vowel is
slender, it is a slender stem.
Morphotactics plays a large part in Irish Inflection. It involves knowing which morphemes are allowed to combine with each other to form valid words (Ref 3). This is important in Irish because a slender suffix, added to a broad stem, would not form a valid word, even though it might ‘sound’ correct.
Fig. D: *Brisaim
The correct form is Brisim. [I break] - (both forms are pronounced in
exactly the same way.)
As with many languages, there are both regular and irregular verbs in Irish. For the purpose of simplicity and clarity in both explanation and implementation, I will deal solely with Regular verbs in both the present tense and future tense.
The Present Tense
There are six possible suffixes to form the present tense with the imperative form as the stem. There are two categories – broad and slender. If the final vowel in the stem is broad, a broad suffix is chosen, and if the final vowel in the stem is slender, a slender suffix is chosen.
Fig.
E: Broad Slender
-aim -im 1st person, singular
-ann -eann 2nd,
3rd person, singular and plural
-aimid -imid 1st person, plural
E.g. Verb stem = rith (to run)
Tense = present
(slender) rithim
– I run
ritheann
tú – you run
ritheann
sé – he runs
ritheann sí – she runs
rithimid – we run
ritheann sibh – you run (pl)
ritheann siad – they run
The Future Tense
The rules are similar in the future tense. The same stems are used but the suffixes change. The two categories remain with the same rules applicable:
Fig
F: Broad Slender
-faidh
-fidh 1st , 2nd, 3rd person, singular/ 2nd
,3rd person plural
-faimid -fimid 1st person, plural
E.g. Verb stem = glan (to clean)
Tense = future
(broad) glanfaidh
mé – I will clean
glanfaidh
tú – you will clean
glanfaidh
sé – he will clean
glanfaidh
sí – she will clean
glanfaimid
– we will clean
glanfaidh
sibh – you will clean
glanfaidh
siad – they will clean
Fig
G:
These verbs are examples of straightforward
segmentation.
The information given is (i) Tense and (ii)
Person
If (Tense = present) and (Person = 1st singular)
-
we have two choices of suffix, :
(broad) -aim or (slender) –im
The stem is “rith”, the
final vowel is slender “i”, so the slender suffix is chosen:
‘-im’.
Result: rith + im
rithim - I run
There can be complications for the
segmentation process, however. Minor spelling alterations may be necessary at
the boundaries between morphemes. These changes are noted by use of
morphographemics or spelling rules. For instance, spelling rules tell us that igh is deleted from the end of relevant
verbs before a suffix is added.
It is worth noting, especially with regards
to further development in this area, that most other verb tenses in Irish
undergo inflectional processes similar to the two tenses I have chosen here.
i.e. Imperfect Tense , Conditional Tense, Imperative Tense.
Overview
of Two-Level Morphology
In computer implementation, processes such as spell checking and parsing can be made simpler with the use of Two-Level Morphology. Rather than listing every form of each word in the lexicon, instead we can save space by listing the stem along with its morphological rules and thus have smaller dictionaries. For example, we can list only the stem of the verb rather than all the conjugated forms. Computational Lexicons are usually structured with a list of each of the stems and affixes of the language together with morphotactic rules that tell us how they should combine.
(Ref. 2) In Irish, most word formation processes are recursive. In other words, just by knowing the stem, we can predict the other forms of the word.
For straightforward morphological
segmentation, English inflection can be implemented using concatenation rules
that work forward, starting with the root and the suffix, and then deriving the
correct form.
However, Irish inflection is a little more
complex. Not only does the suffix depend on the regularity of the verb and its
tense, but also on the final vowel in the stem, whether it is broad or slender.
There are also complications for the
segmentation process in that minor spelling alterations occur at the boundaries
between morphemes. This is referred to as graphotactics or morphographemics in
Computational Morphology. (Ref. 3) Morphographemics deals traditionally with
the relationship between Underlying and Surface forms. This analysis has three
levels: Underlying, Surface and Intermediate (the level in between). (Ref. 1)
That is because the initial vowel in the suffix cannot be deleted until the igh is deleted first.
| | | | |
| | | |
D ó 0 0 0 0 a n n
| | | | |
| | | |
D ó 0 0 0 0 0 n n
The rules must be restricted so that only the
Underlying and Surface Levels are needed, and not the Intermediate Level.
Two-Level Morphology first proposed by
Koskenniemi (1983) and implemented by Kartunnen (1983) in the computer program
KIMMO. Two-level Morphology represents a word as a correspondence between a
lexical level, which represents a simple concatenation of morphemes making up a
word, and the surface level, which represents the actual spelling of the final
word. (Jurafsky)
In the same way as Michael Covington (1994) -
(Ref. 1) has demonstrated for English Morphology, I have expressed the Irish
spelling rules in KIMMO’s framework..
E.g.
Rule (1): (Vs:0 ó Vs:Vs Vb:Vb ___ +:0)
The rule reads as Vs:0 (underlying slender vowel Vs corresponds to surface null)
occurs if and only if preceded by a Vs:Vs (slender vowel) and then a Vb:Vb
(broad vowel) and followed by +:0 (morpheme boundary corresponding to surface
null). (Adapt. Ref. 1)
The
two-level rules are compiled into the finite-state transducer form. Due to the
fact
that
there are only two levels in this
transducer, these problems will be easier to
solve.
There are two tapes; one representing the characters in the lexical /
underlying
representation
of morphemes and the other representing the characters in the surface
form.
The transducer maps between the lexical symbols and the surface symbols via a
Finite
State Automaton. (Adapt. Ref. 2)
Lexical
Form d ó i g h + i m ( I burn)
Lexical
Tape d ó i g h + i m
Surface
Tape d ó 0 0 0 0 i m
Surface
Form d ó i m
Lexical Form s
i ú i l + f a i d h [sé] ([he] will walk)
Lexical
Tape s i ú i l + f a i d h
Surface
Tape s i ú 0 l 0 f a i d h
Surface
Form s i ú l f a i d h
These spelling rules apply to the regular
verbs in the future and present tense.
Some of these spelling rules operate from
left to right and others from right to left.
‘0’ denotes a null character in the surface
form and ‘+’ marks a morpheme boundary.
(1) Where a verb stem
has three successive vowels - slender, broad, slender, the final slender vowel
is deleted before the suffix choice is made.
(Vs:0
ó Vs:Vs Vb:Vb ___ +:0 ) Vs= i , Vb= a, o, u
(2) For all verbs
ending in igh , the igh is deleted before a suffix is added.
(i:0 g:0
h:0 ó X:X ___ +:0 ) X= any letter
(3) For verbs ending
in áil, áin, úir and óil, the final ‘i’ is deleted before a suffix is added.
(i:0 ó Vbf:Vbf ___ R:R
+:0) Vbf
= á, ó, ú , R = l, n, r
(4) For verbs ending
in igh , if the final vowel is broad
following the ‘igh – deletion’, and
the suffix begins with a broad vowel, that vowel is deleted.
(Vb:0 ó Vb:Vb +:0 ___)
(5) If, following ‘igh – deletion’, the final letter is u or a just one consonant, í is inserted before the suffix is
added.
(+: í ó {u|C} ___ +:0 ( a lexical ‘+’ corresponds to a surface
‘í’ when it follows
either ‘u’ or a Consonant and is followed by a morpheme
boundary.))
- If the suffix starts with ‘a’ , the ‘a’ is replaced by ‘o’.
(a:o ó u:u ___ +:0;
C:C ___ +:0)
- Rules (1), (2), (3) and (5) operate from right to left. (The form of the suffix determines the form of the first morpheme.)
- Rule (5) operates from left to right. (The form of the first morpheme determines the form of the suffix.)
The simplest way to model the processes
involved, is with a Finite State Transition Network (FSTN). It clearly shows
the step by step manipulation of the verbs.
The FSTN consists of a finite set of states
(one of which is designated an initial state, and some of which are designated
final states), a finite set of complex symbols composed of an input-output pair
a:b,( input alphabet: output alphabet), and
a transition function which indicates
for each pair of state and an input symbol, a successor state and a sequence of
zero or more elements of the output alphabet.
(Adapt. Ref. 2)
In
this project, I am only concerned with spell checking as opposed to parsing.
Therefore the FSTN will be automated with a Finite State Transducer as a
recogniser. It will take pairs of strings as input and will output “accept” if the surface form is a
legitimate Irish verb form, and “fail” if
it is not. There is no lexicon associated with this automaton. The FSTN assumes
that the verbs given as input data are regular and in Group A, B, or C in the
first conjugation.
Even though the verb spell checking could be
carried out in a simpler way using Perl
as
the programming language (especially on the algorithm in Fig G), the Two-Level
Transducer
implementation is important for further development of Irish verb parsing. In
parsing, we want to work backward taking the surface form and identifying
the
stem and suffix. Working backward from the surface level to the underlying
level
can
create problems as so many rules can produce ambiguity. The morphological
analyser
often has to deal with elements that aren’t there, or appear in quite different
forms
than are listed in the lexicon. If, when given a word such as dófaidh, how can
the
form dóigh, be identified as the stem, and how can the parser recognise the
final
igh that doesn’t appear in the
surface level?
(Refs. 4 and 5)
The majority of Irish verbs are regular. In
the regular verb group there are two
Conjugations.
I have concentrated only on the first conjugation, which includes:
(A)
Verbs with stems of one syllable not ending in igh
(B)
Verbs with stems of one syllable ending in igh
(C)
Verbs of more than one syllable ending in áil, áin, óil, úir
Group A:
(Verbs with stems of one syllable not ending in igh)
can fág las póg síl tuig
cíor féach léim rith snámh
creid fill lig ruaig spreag
(Verbs with stems
of one syllable ending in igh)
báigh crúigh glaoigh ligh suigh
buaigh dóigh guigh léigh
cráigh fuaigh nigh luigh
Group C
(Verbs with two
syllables ending in áil, áin, úir, óil)
bacáil gearáin sabháil tairneáil vótáil
ceiliúir marcáil soinseáil taispeáin
cniotáil robáil sparáil tionóil
I have designed FSTNs for each separate
group. Each FSTN accepts the Present and
Future
tenses of all the verbs in the group and ensures that the correct suffix is
used.
The
first transducer has 10 states, the second has 21 states and the third has 9
states.
The
states are linked by arcs. The transducer steps from one state to another by
accepting
a pair of underlying and surface characters indicated on the arc. It must
start
in state 1 and finish in one of the states designated as the final state.
The
input data for these FSTNs should be:
-
the Initial State
-
the Final State
-
Verb stem + Suffix
-
The expected Surface Form / Variable
The output data should be
-
the correctly spelled conjugated form of the verb.
-
Yes / no (accept / fail)
Transducers can also be described by a state-transition table. I have
shown this in
Fig H. which corresponds to the FSTN for Group A.
Fig. H
|
State | ó:ó Vb: Vb C:C
+:0 f:f a:a
Vs:Vs i:0 u:u
other stop? |
|
1 | 3
2 yes |
|
2 | 3
7 2
yes |
|
3 | 3 4 7 no |
|
4 |
4 5
no |
|
5 | 6
no |
|
6 |
1 yes |
|
7 | 3 9 7 8
no |
|
8 |
3 no |
|
9 |
9 10 no |
|
10 | 10 6 no |
(Ref. 1)
Should we feed the transducer the strings:
T ó g + a n n
| | |
| | | |
T ó g 0 a n n
This is what should happen:
-
Start in state 1
-
Accept t:t (matches ‘other’ arc); go to state 2
-
Accept ó:ó (broad vowel) ; go to state 3
-
Accept g:g (a consonant); go to state 4
-
Accept +:0 and go to state 5
-
Accept a:a and go to state 6
-
Accept n:n (matches ‘other’ arc); go to state 1
-
Accept n:n (matches ‘other’ arc); go to state 2
-
Encounter end of word. Stopping at state 2 is possible , so the word is
accepted
Bibliography
Reference
1- Natural Language Processing for Prolog Programmers: M. Covington,
Prentice Hall 1994
Reference
2 - Speech and Language Processing:
D. Jurafsky & J.H. Martin, Prentice Hall
2000
Reference
3 - Computational Morphology:
Graeme
D. Ritchie, Graham Russell,
Alan W. Black & Stephen G. Pulman,
MIT
1992
Reference
4 – Briathra Na
Gaeilge :
Déalgán ó Murchú & Pádraig ó Murchú, Folens
Reference
5 – Gearrchúrsa
Gramadaí:
Brian
Mac Giolla Phádraig,
Longman Brún agus ó Nualláin, Teor.
state(1,3,ó,ó):- !. % state(start,finish,input,output)
state(1,2,X,X).
state(2,2,C,C):- \+ vowel(C), !.
state(2,3,Vb,Vb):- vowel_b(Vb), !. % accept only broad vowel
state(2,7,Vs,Vs):- vowel_s(Vs), !. % accept only slender vowel
state(2,2,X,X).
state(3,4,C,C):- \+ vowel(C), !. % no vowels, i.e. consonant only
state(3,7,Vs,Vs):- vowel_s(Vs), !.
state(3,3,Vb,Vb):- vowel_b(Vb).
state(4,5,+,0):- !. % morpheme boundary corresponds to null
state(4,4,C,C):- \+ vowel(C).
state(5,5,f,f). % default pair, maps to itself
state(5,6,a,a).
state(6,1,X,X).
state(7,9,C,C):- \+vowel(C), !.
state(7,7,Vs,Vs):- vowel_s(Vs), !.
state(7,8,u,u).
state(8,3,i,0).
state(9,10,+,0):- !.
state(9,9,C,C):- \+vowel(C).
state(10,10,f,f):- !.
state(10,6,Vs,Vs):- vowel_s(Vs).
final_state(1).
final_state(2).
vowel(a). vowel(e). vowel(i). vowel(o). vowel(u).
vowel(á). vowel(é). vowel(í). vowel(ó). vowel(ú).
vowel_b(a). vowel_b(á). vowel_b(o). vowel_b(ó).
vowel_b(u). vowel_b(ú). % list of broad vowels
vowel_s(e). vowel_s(i). vowel_s(í). % list of slender vowels
transduce(Start,Start, [], []):-
final_state(Start).
transduce(Start, Finish, [U|UndlString], [S|SurfString]):-
state(Start, Next, U, S), \+(S=0),
transduce(Next, Finish, UndlString, SurfString).
transduce(Start, Finish, [U|UndlString], Surface):-
state(Start, Next, U, 0),
transduce(Next, Finish, UndlString, Surface).
Script started on Thu 18 Oct 2001 04:26:25 PM IST tlynn.cl4@lg27-183:> prolog
booting SICStus...please wait
SICStus 2.1 #6: Thu Oct 3 16:38:59 GMT 1996
| ?- [-'groupa.pl'].
{consulting /users/cl4/tlynn.cl4/prolog/groupa.pl...}
{/users/cl4/tlynn.cl4/prolog/groupa.pl consulted, 0 msec 6080 bytes}
yes
| ?- transduce(1, Fin, [b,r,i,s,+,f,i,d,h], What).
Fin = 2,
What = [b,r,i,s,f,i,d,h] ? ;
no
| ?- transduce(1, 2, [b,r,i,s,+,f,a,i,d,h], What).
no
| ?- transduce(1, Fin, [t,o,g,+,a,n,n], What).
Fin = 2,
What = [t,o,g,a,n,n] ? ;
no
| ?- transduce(1, Fin, [t,o,g,+,e,a,n,n], What).
no
| ?- transduce(1, Fin, [s,i,u,i,l,+,a,n,n], What).
Fin = 2,
What = [s,i,u,l,a,n,n] ? ;
no
| ?- transduce(1, Fin, [s,i,u,i,l,+,e,a,n,n], What).
no
| ?- transduce(1, 2, What, [s,i,u,l,a,n,n]).
What = [s,i,u,i,l,+,a,n,n] ? ;
What = [s,i,u,i,l,+,a,n,n,0] ?
yes
| ?- transduce(1, Fin,[c,r,o,i,t,h,+,f,a,i,d,h], What).
no
| ?- transduce(1, Fin,[c,r,o,i,t,h,+,f,i,d,h], What).
Fin = 2,
What = [c,r,o,i,t,h,f,i,d,h] ? ;
no
| ?- halt.
tlynn.cl4@lg27-183:> exit.
exit.: Command not found
tlynn.cl4@lg27-183:> exit script done on Thu 18 Oct 2001 04:34:47 PM IST

state(1,2,C,C):- \+ vowel(C), !. % accept consonant only
state(2,16,u,u):- !.
state(2,3,Vb,Vb):- vowel_b(Vb), !. % accept broad vowel
state(2,17,i,0):- !.
state(2,11,Vs,Vs):- vowel_s(Vs), !. % accept slender vowel
state(2,2,X,X).
state(3,3,Vb,Vb):- vowel_b(Vb), !.
state(3,4,i,0). % delete surface i,
state(4,5,g,0). % " g
state(5,6,h,0). % " h
state(6,7,+,0).
state(7,8,f,f):- !.
state(7,10,i,i):- !. % default pair
state(7,10,a,0).
state(8,7,a,a).
state(10,7,f,f):- !.
state(10,22,P,P):-ending(P).
state(11,12,i,0).
state(12,13,g,0).
state(13,14,h,0).
state(14,15,+,0).
state(14,10,+,i).
state(15,22,i,i):- !.
state(15,23,e,0).
state(23,22,a,a).
state(16,3,a,a):- !.
state(16,17,i,0).
state(17,18,g,0).
state(18,19,h,0).
state(19,20,+,í).
state(20,20,i,0):- !.
state(20,21,e,0).
state(20,22,P,P):- ending(P), !.
state(21,22,a,o).
state(22,22,P,P):- ending(P).
final_state(22).
vowel_b(a). vowel_b(á). vowel_b(o). vowel_b(ó).
vowel_b(u). vowel_b(ú).
vowel_s(i). vowel_s(í). vowel_s(e). vowel(a). vowel(e). vowel(i). vowel(o). vowel(u).
vowel(á). vowel(é). vowel(í). vowel(ó). vowel(ú).
ending(m). ending(n). ending(d). ending(h). ending(f).
transduce(Start,Start, [], []):-
final_state(Start).
transduce(Start, Finish, [U|UndlString], [S|SurfString]):-
state(Start, Next, U, S), \+(S=0),
transduce(Next, Finish, UndlString, SurfString).
transduce(Start, Finish, [U|UndlString], Surface):-
state(Start, Next, U, 0),
transduce(Next, Finish, UndlString, Surface).
Group B :- Log-file
Script started on Thu 18 Oct 2001 04:51:20 PM IST tlynn.cl4@lg27-183:> prolog
booting SICStus...please wait
SICStus 2.1 #6: Thu Oct 3 16:38:59 GMT 1996
| ?- [-'groupb.pl'].
{consulting /users/cl4/tlynn.cl4/prolog/groupb.pl...}
{/users/cl4/tlynn.cl4/prolog/groupb.pl consulted, 0 msec 8128 bytes}
yes
| ?- transduce(1, Fin, [b,u,a,i,g,h,+,f,a,i,d,h], What).
Fin = 22,
What = [b,u,a,f,a,i,d,h] ? ;
no
| ?- transduce(1, Fin, [b,u,a,i,g,h,+,f,i,d,h], What).
no
| ?- transduce(1, 22, What, [b,u,a,f,a,i,d,h]).
What = [b,u,a,i,g,h,+,f,a,i,d,h] ? ;
What = [0,b,u,a,i,g,h,+,f,a,i,d,h] ?
yes
| ?- transduce(1, Fin, [d,o,i,g,h,+,f,i,d,h], What).
no
| ?- transduce(1, Fin, [d,o,i,g,h,+,f,a,i,d,h], What).
Fin = 22,
What = [d,o,f,a,i,d,h] ?
yes
| ?- transduce(1, Fin, [d,o,i,g,h,+,a,n,n], What).
Fin = 22,
What = [d,o,n,n] ? ;
no
| ?- transduce(1, 22, What, [d,o,n,n]).
What = [d,o,i,g,h,+,a,n,n] ? ;
What = [0,d,o,i,g,h,+,a,n,n] ?
yes
| ?- transduce(1, Fin, [l,e,i,g,h,+,e,a,n,n], What).
Fin = 22,
What = [l,e,a,n,n] ? ;
no
| ?- transduce(1, Fin, [l,e,i,g,h,+,f,i,d,h], What).
Fin = 22,
What = [l,e,i,f,i,d,h] ? ;
no
| ?- transduce(1, 22, What, [l,e,a,n,n]).
What = [l,e,i,g,h,+,e,a,n,n] ? ;
What = [0,l,e,i,g,h,+,e,a,n,n] ?
yes
| ?- halt.
tlynn.cl4@lg27-183:> exit
tlynn.cl4@lg27-183:> script done on Thu 18 Oct 2001 04:56:08 PM IST

state(1,2,C,C):- \+ vowel(C), !.
state(1,2,V,V):- vowel(V). % accept vowel only
state(2,3,V,V):- vowel(V), !.
state(2,2,X,X).
state(3,4,C,C):- \+ vowel(C),!.
state(3,3,V,V):- vowel(V).
state(4,5,Vbf,Vbf):- vowel_bf(Vbf), !.
state(4,4,X,X).
state(5,6,i,0).
state(6,7,Z,Z):- last(Z). % last letter in underlying form
state(7,8,+,0).
state(8,9,a,a):- !.
state(8,8,f,f).
state(9,1,P,P):- ending(P).
final_state(2).
final_state(4).
%vowel_bf(á). vowel_bf(ú). vowel_bf(ó). prolog Vs fada's
vowel_bf(a). vowel_bf(u). vowel_bf(o).
vowel(a). vowel(e). vowel(i). vowel(o). vowel(u).
last(n). last(l). last(r).
ending(i). ending(n).
transduce(Start,Start, [], []):-
final_state(Start).
transduce(Start, Finish, [U|UndlString], [S|SurfString]):-
state(Start, Next, U, S), \+(S=0),
transduce(Next, Finish, UndlString, SurfString).
transduce(Start, Finish, [U|UndlString], Surface):-
state(Start, Next, U, 0),
transduce(Next, Finish, UndlString, Surface).
Group B :- Log-file
Script started on Thu 18 Oct 2001 07:04:14 PM IST
tlynn.cl4@lg26-176:> prolog
booting SICStus...please wait
SICStus 2.1 #6: Thu Oct 3 16:38:59 GMT 1996
| ?- [-'groupc.pl'].
{consulting /users/cl4/tlynn.cl4/prolog/groupc.pl...}
{/users/cl4/tlynn.cl4/prolog/groupc.pl consulted, 0 msec 4912 bytes}
yes
| ?- transduce(1, Fin, [b,a,c,a,i,l,+,a,n,n], What).
Fin = 2,
What = [b,a,c,a,l,a,n,n] ? ;
no
| ?- transduce(1, Fin, [b,a,c,a,i,l,+,e,a,n,n], What).
no
| ?- transduce(1, Fin, [b,a,c,a,i,l,+,f,a,i,d,h], What).
Fin = 2,
What = [b,a,c,a,l,f,a,i,d,h] ? ;
no
| ?- transduce(1, Fin, What, [b,a,c,a,l,f,a,i,d,h]).
Fin = 2,
What = [b,a,c,a,i,l,+,f,a,i,d,h] ? ;
Fin = 2,
What = [b,a,c,a,i,l,+,f,a,i,d,h,0] ?
yes
| ?- transduce(1, Fin, [c,e,i,l,i,u,i,r,+,e,a,n,n], What).
no
| ?- transduce(1, Fin, [c,e,i,l,i,u,i,r,+,a,n,n], What).
Fin = 2,
What = [c,e,i,l,i,u,r,a,n,n] ? ;
no
| ?- transduce(1, Fin, [c,e,i,l,i,u,i,r,+,a,i,m,i,d], What).
Fin = 4,
What = [c,e,i,l,i,u,r,a,i,m,i,d] ? ;
no
| ?- transduce(1, Fin, [g,e,a,r,a,i,n,+,a,i,m], What).
Fin = 2,
What = [g,e,a,r,a,n,a,i,m] ? ;
no
| ?- transduce(1, Fin, [g,e,a,r,a,i,n,+,i,m], What).
no
| ?- transduce(1, Fin, [v,o,t,a,i,l,+,f,a,i,d,h], What).
Fin = 2,
What = [v,o,t,a,l,f,a,i,d,h] ? ;
no
| ?- transduce(1, Fin, What, [v,o,t,a,l,f,a,i,d,h]).
Fin = 2,
What = [v,o,t,a,i,l,+,f,a,i,d,h] ? ;
Fin = 2,
What = [v,o,t,a,i,l,+,f,a,i,d,h,0] ?
yes
| ?- halt.
tlynn.cl4@lg26-176:> exit
script done on Thu 18 Oct 2001 07:09:26 PM IST
