smilejemm / foma

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

Incorrect behavior of the rule #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have test.lexc and test.foma files:

$ cat test.lexc
Multichar_Symbols
    +A +M +F
LEXICON Root
almizcler AdjGenderO;
LEXICON AdjGenderO
o+A+M:o    #;
o+A+F:a    #;

$ cat test.foma
read lexc test.lexc
define Lexicon; 
define AO    a | á | o;
define CtoZC c -> zc || _ "^E" AO;
regex Lexicon .o.
      CtoZC   ;

So, I've defined two relations:
almizclero+A+M <--> almizclero
almizclero+A+F <--> almizclera
Rule CtoZC should not have an impact to this relations.

So, when I do next steps...
$ foma -l test.foma
....
foma[1]: words
almizclero:a+A:0+F:0
almizclero+A:0+M:0
foma[1]: apply down
apply down> almizclero+A+F
???

It is strange and looks like incorrect behavior.
But when I comment out line with CtoZC rule and change main regex simply to 
"regex Lexicon;", it's OK:
$ foma -l test.foma
....
foma[1]: words
almizclero:a+A:0+F:0
almizclero+A:0+M:0
foma[1]: apply down
apply down> almizclero+A+F
almizclera

Foma version: foma 0.9.16alpha
System version: Debian wheezy (testing), Linux 3.5 x86_64

Original issue reported on code.google.com by veronika...@gmail.com on 19 Oct 2012 at 8:31

Attachments:

GoogleCodeExporter commented 8 years ago
I am also a user, not the author. I try to help you. I modified your samples 
similar to the example, and then it seems to work:
foma[1]: lower-words
almizclera
almizclero
foma[1]: up
apply up> almizclera
almizcler+A+F
apply up> 

Original comment by eleonor...@gmx.net on 28 Oct 2012 at 7:54

Attachments:

GoogleCodeExporter commented 8 years ago
The other way around:
apply up> 
foma[1]: down
apply down> almizcler+A+F
almizclera
apply down> almizcler+A+M
almizclero
apply down> 

Original comment by eleonor...@gmx.net on 28 Oct 2012 at 7:56

GoogleCodeExporter commented 8 years ago
Yes, it works!

There were problem with this rule: define CtoZC c -> zc || _ "^E" AO
Foma interprets zc as a multichar symbol. It doesn't change transducer, but 
changes interpretation of input.

So, this issue is invalid and must be closed.

Original comment by veronika...@gmail.com on 28 Oct 2012 at 8:33

GoogleCodeExporter commented 8 years ago

Original comment by mans.hul...@gmail.com on 7 Nov 2012 at 10:52