cherepanovic / foma

Automatically exported from code.google.com/p/foma
0 stars 0 forks source link

converted xfsm to foma does not work #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
my script works correctly with xfsm, foma compiles ok, but for instance print 
random-lower gives me the same result as print random-upper:

oma[1]: print random-lower
[1] VROOTPLPFeREIPDMOODPERSON
[1] NUROOTPLPFeRENEGNCIMOODPERSON
[1] NUROOTEIDONCIMOODPERSONNUMBER
[1] NUROOTSTPRPLPFeMOODPERSONNUMBER
[1] NROOTNCIMOODPERSON
[1] NROOTHHLOCPTMTDS
[1] AJROOTBENPLAYSIMNCIMOODPERSON
[1] NROOTPXREPMOODPERSONNUMBER
[1] AJROOTAFFPTMTDS
[1] AJROOTREFCIRCINTMIONEGNRLDMOODPERSON
[1] AJROOTRENEGPTMTDS
[1] VROOTMOODPERSONNUMBERDS
[1] NROOTREIPDPTMTDS
[1] NUROOTADHOCSTPRRENRLDMOODPERSON
[1] AVROOTADHOCPLNEGNRLDMOODPERSONNUMBER
foma[1]: print random-upper
[1] NUROOTEIDOPTMT
[1] VROOTMOODPERSONNUMBER
[1] VROOTSTPRPLAYSIMIMMSUDPLPFeNEGNRLDMOODPERSON
[1] VROOTREFRECONTPTMT
[1] VROOTNCIMOODPERSON
[1] QROOTAFFPTMT
[1] AVROOTADHOCNEGEIDOPTMT
[1] VROOTPRPSPFPSCIRCINTPTMT
[1] AJROOTNEGNCIMOODPERSONNUMBER
[1] VROOTIOPASS1A2AIPDMOODPERSON
[1] NUROOTCFeEIDOMOODPERSON
[1] AJROOTPLPFeNEGNCIMOODPERSON
[1] NROOTITRNEGIPDPTMT
[1] AVROOTMOODPERSON
[1] AJROOTPRPSPFPSIPDEIDONCIPTMTDS
foma[1]: 

xfst[1]: print random-lower                                    
külayelkalmewemekallenuli
kayuyekatieñmukantumeweyekümellenuli
lofküdaulkatiefalmeweyeküpetukilüli
llawepütratielüñmukantutupetufulüli
kadilkawtielfalwemekawyetullenoli
peñafillkuñyelülüñmuwemepetullelüy
küliwün'yekawtieñmukantumemewyetullenuli
meliyekatiemewetupekilüli
llodkeñ mapulkalfalwemewyetunulüy
willimawün'luwülfalmetuwyetullelüli
apümpiruntrawünyekawüñmukantuwetuy
rülfünuwüñmumewyetulay
kudpun'yekalmepetullenufulüli
ñwakutranuwtieñmukantuwemetupetullenuli
ellalkantuwepatupetullefuli
xfst[1]: print random-upper
culebra +VRB +OO +CA +FAC +REF +INT +PLAY +PS +TH +PLPF +RE +IND +1
marido de tía paterna +VRB +FAC +SAT +HH +PLPF +RE +NEG +IPD +CNDNIMP +CND +1
medianoche +VRB +OO +FAC +MIO +FORCE +ITR +HH +CONT +PLPF +NEG +IPD +CNDNIMP 
+CND +1
avalancha +VRB +OO +INT +PLAY +TH +CONT +AFF +NEG +CNDNIMP +IND +1
ave +VRB +CA +REF +MIO +FORCE +PX +RE +IND +1
escoria +VRB +CA +FAC +INT +MIO +PLAY +ITR +HH +AFF +NEG +CNDNIMP +CND +1
puro +VRB +CA +REF +INT +SAT +PS +ITR +HH +RE +RE +NEG +IPD +CNDNIMP +IND +1
mujeres de dos hermanos +VRB +CA +REF +INT +MIO +SAT +PLAY +TH +PS +ITR +CONT 
+RE +NEG +CNDNIMP +IND +1
jefe de los demonios +VRB +CA +INT +SAT +TH +PS +ITR +TH +CONT +PLPF +NEG 
+CNDNIMP +CND +1
ola +VRB +CA +INT +PLAY +RE +PLPF +IPD +CNDNIMP +CND +1
igual +VRB +OO +CA +MIO +FORCE +TH +TH +CONT +PLPF +IPD +CNDNIMP +IND +1
planta +VRB +OO +FAC +MIO +FORCE +TH +ITR +PLPF +AFF +NEG +CND +1
recodo +VRB +CA +FAC +REF +INT +MIO +SAT +PLAY +ITR +HH +PLPF +RE +IPD +CND +1
xfst[1]: 

I think is something related to this, but I do not know how to implement it, 
could you give me some directions on it if it's so.

I add my file for you to see what I'm talking about

Original issue reported on code.google.com by andreschandiaf on 12 May 2014 at 1:38

Attachments:

GoogleCodeExporter commented 8 years ago
sorry, the "this" I have mentioned above was this:

My replace rules don't work when I have flag diacritics in the input

Although flags are epsilons when applying them, they do need to be declared in 
replacement rule contexts, one should say e.g.

define BPchange b -> p || _ ("@U.SOMEFLAG.SOMEVALUE@") .#. ;

if there's a possibility that there's a flag between the target and the 
end-of-word, otherwise the rule won't trigger.

You can also issue the (mildly deprecated) command

SET flag-is-epsilon ON

before composing the rules together with the lexicon. This will allow the rules 
to trigger even with flags intervening in the contexts. 

Original comment by andreschandiaf on 12 May 2014 at 1:41

GoogleCodeExporter commented 8 years ago
Toward the end of the main script dungupeyem.foma, there are a number of lines 
that look like:

source DS @re"slots/1-15-Flectional-Suffixes/slot-01.foma"        ! Dative 
Subject
...

These should probably be changed to

define DS @re"slots/1-15-Flectional-Suffixes/slot-01.foma";        ! Dative 
Subject

(changing "source" to "define" and adding a semicolon at the end)

After this change, things appear OK.

Also, remove semicolon from this line unless you want it in the filename:

save stack dungupeyem.fst;

My output is, when compiling:

...
204.4 kB. 12104 states, 12740 arcs, 1102315360 paths.
Writing to file dungupeyem.fst.

(testing)

foma[1]: up
apply up> epuli
dos, par +VRB +CND +1
dos, par +VRB +CNDNIMP +IND1SG
dos, par +VRB +CA +IND1SG
dos, par +VRB +MIO +IND1SG

Original comment by mans.hul...@gmail.com on 13 May 2014 at 8:50

GoogleCodeExporter commented 8 years ago
Thanks a lot, that did it, somebody has given me a wrong advice, I was said to 
change 
define DS source_file.xfst";
into
source DS source_file.foma"
in order to compile in foma.

and yes, I heve realized that I should take out the ; at the end of the 
compiled file.

But yet I have another problem doing next

:foma[1]: print random-lower
[1] ñwakutrankatutui
[1] metrewal awen'i
[1] fotrawerpakareslots/1-15-Flectional-Suffixes/slot-10.fomay
[1] wüneyeküpali
[1] fapareslots/1-15-Flectional-Suffixes/slot-11.fomali
[1] rülfünkantupareslots/1-15-Flectional-Suffixes/slot-08.fomay
[1] koltuli
[1] ñwakutranürpakay
[1] wifülüñmuy
[1] üngey
[1] piltrawün'amun'kay
[1] shüngüllüli
[1] kiñepareslots/1-15-Flectional-Suffixes/slot-15.fomalüy
[1] ngüdiñmuwerpai
[1] tunt'ewereslots/1-15-Flectional-Suffixes/slot-14.fomali

as you can see there are lines tha have things like 
slots/1-15-Flectional-Suffixes/slot-15.foma appearing as if it were part of the 
low level structure, while they are the path of a file containing the suffix. I 
have checked out many times for errors but I can not find if it's that or some 
kind of notation that I should make differently.

a lot of thanks for your help!!

Original comment by andreschandiaf on 13 May 2014 at 5:54

GoogleCodeExporter commented 8 years ago
The remaining strange symbols like:

fotrawerpakareslots/1-15-Flectional-Suffixes/slot-10.fomay

must come from an error where the file "1-15-Flectional-Suffixes/slot-10.foma" 
is included (line 169), and similarly for the other lines. Make sure it reads 
like:

define NEG @re"slots/1-15-Flectional-Suffixes/slot-10.foma";       ! Negation

and similarly for the other ones, slot-14, slot-15, etc. which aren't properly 
compiled.

Once you're done compiling, it's a good idea to look at the resulting alphabet 
for debugging to make sure it doesn't have anything strange in it.

For example, after compiling, my alphabet looks like this:

foma[1]: sigma
Sigma: ? @    +1  +1A  +2  +2A  +3  +AFF  +AH  +BEN  +CA  +CF  +CIRC  +CND  
+CNDNIMP  +CONT  +DL  +DS12A  +DS3A  +EDO  +EXP  +FAC  +FORCE  +HH  +IDO  +IMM  
+IMP  +IMP1SG  +IMP2SG  +IMP3  +IND  +IND1SG  +INT  +IO  +IPD  +ITR  +LOC  +MIO 
 +NEG  +NRLD  +OO  +PASS  +PFPS  +PL  +PLAY  +PLPF  +PR  +PRPS  +PS  +PX  +RE  
+REDOR  +REDVR  +REF  +REP  +SAT  +SFR  +SG  +SIM  +ST  +SUD  +TH  +TR  +VBR  
+VRB ! ' ( ) * + , . 0 1 2 3 4 6 7 8 9 : ; = ? @0 @AJ @AV @IV @K @KI @KÜ @L @N 
@NU @ON @QC @QT @TV @U @Y @e @i @l @ns @y @Ñ @Ü @ÜÑ @ü A B C D E F G H I K 
L M N O P Q QC QT R S T U V W Y ^ ^[ ^] a b c d e f g h i j k l m n o p q r s t 
u v w x y z { | } ¡ ª « » ¿ É Ñ Ü á é í ñ ó ú ü ǘ – → fi

Original comment by mans.hul...@gmail.com on 13 May 2014 at 6:52

GoogleCodeExporter commented 8 years ago
Thanks a lot, it was hard to find it but finally I did it, some of the lines 
were declared like this
define NEG @re "slots/1-15-Flectional-Suffixes/slot-10.foma";
while they should have been declared like this:
define NEG @re"slots/1-15-Flectional-Suffixes/slot-10.foma";
what's the difference? that f.. space after @re

thanks again.

Original comment by andreschandiaf on 14 May 2014 at 11:44