Giter VIP home page Giter VIP logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Hi, I have split all the prohibition rules and I have found many rules that can 
be avoided or summarized into one, this operation gave me 193 rules, and I 
still can not compile with all of them, I arrive to apply 117, but when I 
enable the 118 the compilation crashes because of lack of memory, I attach the 
new version of the file, maybe this can give a clue, that I can not find....
thanks again.

Original comment by andreschandiaf on 13 Mar 2015 at 8:27

Attachments:

from foma.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
This seems to be an illustration of a common problem with multiple rules or 
constraints. In general, there is the danger of an exponential growth in the 
size of a combined set of rules of constraints, since each composition or 
intersection of an independent rule or constraint may cause the resulting 
automaton/transducer grow by a constant factor.

The way to avoid this is to include a lexicon *before* the first 
composition/intersection with the constraints/rules.

For example, in a traditional rewrite-rule grammar, it is always recommended 
that one use the design:

define Grammar Lexicon .o. Rule1 .o. Rule2 .o. ... .o. RuleN;

instead of:

define Rules Rule1 .o. Rule2 .o. ... .o. RuleN ;
define Grammar Lexicon .o. Rules;

since the second option may produce an intermediate result that is very large 
(Rules), while the final result (Grammar) could still be very small.

For the current grammar, my recommendation is that you focus on introducing 
VERBFORM before the composition of the constraints. How this can be done 
depends on how you designed the grammar. If VERBFORM is an automaton/acceptor 
(which it looks like it is), you can just create that first, and do:

define PrRu VERBFORM .o. PrRu001 .o. PrRu002 .o. ...

since the order of composition doesn't matter in that case.

If, on the other hand, VERBFORM is a transducer, you may have to invert the 
constraint process and do it maybe like this:

define PrRu [VERBFORM.i .o. PrRu193 .o. PrRu192 ... ].i;

The main point is that you should never do a large composition/intersection of 
rules/constraints freely, but tie it to a lexicon first by introducing the 
lexicon as the first element in a chain of compositions.

See also:

https://code.google.com/p/foma/wiki/FAQ#It_takes_forever_to_compose_all_the_rewr
ite_rules_together_in_my

Original comment by [email protected] on 14 Mar 2015 at 7:18

from foma.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Thanks, after reordering some stuff and applying this strategy: define PrRu 
[VERBFORM.i .o. PrRu193 .o. PrRu192 ... ].i; the thing worked, but 
reduplication rules does not apply any more, I guess I have to find the 
appropriate place for them, but I haven't yet....
well, thanks again, and here you have the resulting file in case of further 
advice ;)

Original comment by andreschandiaf on 17 Mar 2015 at 3:17

Attachments:

from foma.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Well, here I am again, as I told you at the previous message, the reduplication 
rules do not apply any more, I have tried many different things but I can not 
bring them into life again, for sure I'm not doing it well, can you please take 
again a look to my file and advice me what should I try, sorry but this is 
driving me a little nut, I attach the file again because it has a lot of 
changes....

Thanks and sorry again.

Original comment by andreschandiaf on 19 Mar 2015 at 7:15

Attachments:

from foma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.