mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-24 00:23:11 -06:00
trying to find some inefficiencies in Finnish resource
This commit is contained in:
1 parent
ad28e99f35
commit
c5334613c5
4 files changed
+15
-1
No files matched your search
@@ -261,6 +261,7 @@ concrete WordsFin of Words = SentencesFin **
|
||||
---- (mkNP (E.PartCN a) ---- partitive works in questions )
|
||||
(mkNP (mkNP a_Det a)
|
||||
(SyntaxFin.mkAdv for_Prep (mkNP n (mkN "henki" "henkiä")))) ;
|
||||
---- (SyntaxFin.mkAdv for_Prep (mkNP (mkDet n)))) ; -- 60s faster compile 25/10/2010
|
||||
|
||||
open_Adv = ParadigmsFin.mkAdv "avoinna" ;
|
||||
closed_Adv = ParadigmsFin.mkAdv "kiinni" ;
|
||||
|
||||
@@ -16,6 +16,7 @@ Showcase for project FP7-ICT-247914, Deliverable D10.2.
|
||||
#BSMALL
|
||||
|
||||
History
|
||||
- 1 September. Version 1.1: bug fixes, some new constructions.
|
||||
- 2 June. Version 1.0 released!
|
||||
- 29 May. Link to Google translate with the current language pair and phrase.
|
||||
- 27 May. Polish added.
|
||||
|
||||
@@ -25,6 +25,18 @@ function jsonp(url,callback)
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
||||
var json = {next:0};
|
||||
|
||||
// Like jsonp, but instead of passing the name of the ballback function, you
|
||||
// pass the callback function directly, making it possible to use anonymous
|
||||
// functions.
|
||||
function jsonpf(url,callback)
|
||||
{
|
||||
var name="callback"+(json.next++);
|
||||
json[name]=function(x) { delete json[name]; callback(x); }
|
||||
jsonp(url,"json."+name);
|
||||
}
|
||||
|
||||
/* --- HTML construction ---------------------------------------------------- */
|
||||
function text(s) { return document.createTextNode(s); }
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
var Food = new GFGrammar(new GFAbstract("Phrase",{Boring: new Type([], "Quality"), Cheese: new Type([], "Kind"), Delicious: new Type([], "Quality"), Expensive: new Type([], "Quality"), Fish: new Type([], "Kind"), Fresh: new Type([], "Quality"), Is: new Type(["Item", "Quality"], "Phrase"), Italian: new Type([], "Quality"), QKind: new Type(["Quality", "Kind"], "Kind"), That: new Type(["Kind"], "Item"), This: new Type(["Kind"], "Item"), Very: new Type(["Quality"], "Quality"), Warm: new Type([], "Quality"), Wine: new Type([], "Kind")}),{FoodEng: new GFConcrete({},{Boring: function(cs){return new Arr(new Str("boring"));}, Cheese: function(cs){return new Arr(new Str("cheese"));}, Delicious: function(cs){return new Arr(new Str("delicious"));}, Expensive: function(cs){return new Arr(new Str("expensive"));}, Fish: function(cs){return new Arr(new Str("fish"));}, Fresh: function(cs){return new Arr(new Str("fresh"));}, Is: function(cs){return new Arr(new Seq(Food.concretes["FoodEng"].rule("_6", cs), new Str("is"), Food.concretes["FoodEng"].rule("_7", cs)));}, Italian: function(cs){return new Arr(new Str("Italian"));}, QKind: function(cs){return new Arr(new Seq(Food.concretes["FoodEng"].rule("_6", cs), Food.concretes["FoodEng"].rule("_7", cs)));}, That: function(cs){return new Arr(new Seq(new Str("that"), Food.concretes["FoodEng"].rule("_6", cs)));}, This: function(cs){return new Arr(new Seq(new Str("this"), Food.concretes["FoodEng"].rule("_6", cs)));}, Very: function(cs){return new Arr(new Seq(new Str("very"), Food.concretes["FoodEng"].rule("_6", cs)));}, Warm: function(cs){return new Arr(new Str("warm"));}, Wine: function(cs){return new Arr(new Str("wine"));}, _21: function(cs){return new Arr(cs[0]);}, _6: function(cs){return cs[0].sel(new Int(0));}, _7: function(cs){return cs[1].sel(new Int(0));}, Item: function(cs){return Food.concretes["FoodEng"].rule("_21", cs);}, Kind: function(cs){return Food.concretes["FoodEng"].rule("_21", cs);}, Phrase: function(cs){return Food.concretes["FoodEng"].rule("_21", cs);}, Quality: function(cs){return Food.concretes["FoodEng"].rule("_21", cs);}, "Int": function(cs){return new Arr(cs[0]);}, "Float": function(cs){return new Arr(cs[0]);}, "String": function(cs){return new Arr(cs[0]);}}, new Parser({0:[new Rule(9,[1]), new Rule(10,[1])], 1:[new Rule(1,[]), new Rule(4,[]), new Rule(8,[3, 1]), new Rule(13,[])], 2:[new Rule(6,[0, 3])], 3:[new Rule(0,[]), new Rule(2,[]), new Rule(3,[]), new Rule(5,[]), new Rule(7,[]), new Rule(11,[3]), new Rule(12,[])]},[new FFun("Boring",[0]), new FFun("Cheese",[1]), new FFun("Delicious",[2]), new FFun("Expensive",[3]), new FFun("Fish",[4]), new FFun("Fresh",[5]), new FFun("Is",[6]), new FFun("Italian",[7]), new FFun("QKind",[8]), new FFun("That",[9]), new FFun("This",[10]), new FFun("Very",[11]), new FFun("Warm",[12]), new FFun("Wine",[13])],[[new KS("boring")],[new KS("cheese")],[new KS("delicious")],[new KS("expensive")],[new KS("fish")],[new KS("fresh")],[new Arg(0, 0), new KS("is"), new Arg(1, 0)],[new KS("Italian")],[new Arg(0, 0), new Arg(1, 0)],[new KS("that"), new Arg(0, 0)],[new KS("this"), new Arg(0, 0)],[new KS("very"), new Arg(0, 0)],[new KS("warm")],[new KS("wine")]],{Float:{s: -3, e: -3}, Int:{s: -2, e: -2}, Item:{s: 0, e: 0}, Kind:{s: 1, e: 1}, Phrase:{s: 2, e: 2}, Quality:{s: 3, e: 3}, String:{s: -1, e: -1}, __gfVar:{s: -4, e: -4}}, 5)), FoodIta: new GFConcrete({},{Boring: function(cs){return new Arr(new Str("noioso"));}, Cheese: function(cs){return new Arr(new Str("formaggio"));}, Delicious: function(cs){return new Arr(new Str("delizioso"));}, Expensive: function(cs){return new Arr(new Str("caro"));}, Fish: function(cs){return new Arr(new Str("pesce"));}, Fresh: function(cs){return new Arr(new Str("fresco"));}, Is: function(cs){return new Arr(new Seq(Food.concretes["FoodIta"].rule("_6", cs), new Str("è"), Food.concretes["FoodIta"].rule("_7", cs)));}, Italian: function(cs){return new Arr(new Str("italiano"));}, QKind: function(cs){return new Arr(new Seq(Food.concretes["FoodIta"].rule("_7", cs), Food.concretes["FoodIta"].rule("_6", cs)));}, That: function(cs){return new Arr(new Seq(new Str("quel"), Food.concretes["FoodIta"].rule("_6", cs)));}, This: function(cs){return new Arr(new Seq(new Str("questo"), Food.concretes["FoodIta"].rule("_6", cs)));}, Very: function(cs){return new Arr(new Seq(new Str("molto"), Food.concretes["FoodIta"].rule("_6", cs)));}, Warm: function(cs){return new Arr(new Str("caldo"));}, Wine: function(cs){return new Arr(new Str("vino"));}, _21: function(cs){return new Arr(cs[0]);}, _6: function(cs){return cs[0].sel(new Int(0));}, _7: function(cs){return cs[1].sel(new Int(0));}, Item: function(cs){return Food.concretes["FoodIta"].rule("_21", cs);}, Kind: function(cs){return Food.concretes["FoodIta"].rule("_21", cs);}, Phrase: function(cs){return Food.concretes["FoodIta"].rule("_21", cs);}, Quality: function(cs){return Food.concretes["FoodIta"].rule("_21", cs);}, "Int": function(cs){return new Arr(cs[0]);}, "Float": funLine truncated
|
||||
var Food = new GFGrammar(new GFAbstract("Comment",{Boring: new Type([], "Quality"), Cheese: new Type([], "Kind"), Delicious: new Type([], "Quality"), Expensive: new Type([], "Quality"), Fish: new Type([], "Kind"), Fresh: new Type([], "Quality"), Pred: new Type(["Item", "Quality"], "Comment"), Italian: new Type([], "Quality"), Mod: new Type(["Quality", "Kind"], "Kind"), That: new Type(["Kind"], "Item"), This: new Type(["Kind"], "Item"), Very: new Type(["Quality"], "Quality"), Warm: new Type([], "Quality"), Wine: new Type([], "Kind")}),{FoodEng: new GFConcrete({},{Boring: function(cs){return new Arr(new Str("boring"));}, Cheese: function(cs){return new Arr(new Str("cheese"));}, Delicious: function(cs){return new Arr(new Str("delicious"));}, Expensive: function(cs){return new Arr(new Str("expensive"));}, Fish: function(cs){return new Arr(new Str("fish"));}, Fresh: function(cs){return new Arr(new Str("fresh"));}, Pred: function(cs){return new Arr(new Seq(Food.concretes["FoodEng"].rule("_6", cs), new Str("is"), Food.concretes["FoodEng"].rule("_7", cs)));}, Italian: function(cs){return new Arr(new Str("Italian"));}, Mod: function(cs){return new Arr(new Seq(Food.concretes["FoodEng"].rule("_6", cs), Food.concretes["FoodEng"].rule("_7", cs)));}, That: function(cs){return new Arr(new Seq(new Str("that"), Food.concretes["FoodEng"].rule("_6", cs)));}, This: function(cs){return new Arr(new Seq(new Str("this"), Food.concretes["FoodEng"].rule("_6", cs)));}, Very: function(cs){return new Arr(new Seq(new Str("very"), Food.concretes["FoodEng"].rule("_6", cs)));}, Warm: function(cs){return new Arr(new Str("warm"));}, Wine: function(cs){return new Arr(new Str("wine"));}, _21: function(cs){return new Arr(cs[0]);}, _6: function(cs){return cs[0].sel(new Int(0));}, _7: function(cs){return cs[1].sel(new Int(0));}, Item: function(cs){return Food.concretes["FoodEng"].rule("_21", cs);}, Kind: function(cs){return Food.concretes["FoodEng"].rule("_21", cs);}, Comment: function(cs){return Food.concretes["FoodEng"].rule("_21", cs);}, Quality: function(cs){return Food.concretes["FoodEng"].rule("_21", cs);}, "Int": function(cs){return new Arr(cs[0]);}, "Float": function(cs){return new Arr(cs[0]);}, "String": function(cs){return new Arr(cs[0]);}}, new Parser({0:[new Rule(9,[1]), new Rule(10,[1])], 1:[new Rule(1,[]), new Rule(4,[]), new Rule(8,[3, 1]), new Rule(13,[])], 2:[new Rule(6,[0, 3])], 3:[new Rule(0,[]), new Rule(2,[]), new Rule(3,[]), new Rule(5,[]), new Rule(7,[]), new Rule(11,[3]), new Rule(12,[])]},[new FFun("Boring",[0]), new FFun("Cheese",[1]), new FFun("Delicious",[2]), new FFun("Expensive",[3]), new FFun("Fish",[4]), new FFun("Fresh",[5]), new FFun("Pred",[6]), new FFun("Italian",[7]), new FFun("Mod",[8]), new FFun("That",[9]), new FFun("This",[10]), new FFun("Very",[11]), new FFun("Warm",[12]), new FFun("Wine",[13])],[[new KS("boring")],[new KS("cheese")],[new KS("delicious")],[new KS("expensive")],[new KS("fish")],[new KS("fresh")],[new Arg(0, 0), new KS("is"), new Arg(1, 0)],[new KS("Italian")],[new Arg(0, 0), new Arg(1, 0)],[new KS("that"), new Arg(0, 0)],[new KS("this"), new Arg(0, 0)],[new KS("very"), new Arg(0, 0)],[new KS("warm")],[new KS("wine")]],{Float:{s: -3, e: -3}, Int:{s: -2, e: -2}, Item:{s: 0, e: 0}, Kind:{s: 1, e: 1}, Comment:{s: 2, e: 2}, Quality:{s: 3, e: 3}, String:{s: -1, e: -1}, __gfVar:{s: -4, e: -4}}, 5)), FoodIta: new GFConcrete({},{Boring: function(cs){return new Arr(new Str("noioso"));}, Cheese: function(cs){return new Arr(new Str("formaggio"));}, Delicious: function(cs){return new Arr(new Str("delizioso"));}, Expensive: function(cs){return new Arr(new Str("caro"));}, Fish: function(cs){return new Arr(new Str("pesce"));}, Fresh: function(cs){return new Arr(new Str("fresco"));}, Pred: function(cs){return new Arr(new Seq(Food.concretes["FoodIta"].rule("_6", cs), new Str("è"), Food.concretes["FoodIta"].rule("_7", cs)));}, Italian: function(cs){return new Arr(new Str("italiano"));}, Mod: function(cs){return new Arr(new Seq(Food.concretes["FoodIta"].rule("_7", cs), Food.concretes["FoodIta"].rule("_6", cs)));}, That: function(cs){return new Arr(new Seq(new Str("quel"), Food.concretes["FoodIta"].rule("_6", cs)));}, This: function(cs){return new Arr(new Seq(new Str("questo"), Food.concretes["FoodIta"].rule("_6", cs)));}, Very: function(cs){return new Arr(new Seq(new Str("molto"), Food.concretes["FoodIta"].rule("_6", cs)));}, Warm: function(cs){return new Arr(new Str("caldo"));}, Wine: function(cs){return new Arr(new Str("vino"));}, _21: function(cs){return new Arr(cs[0]);}, _6: function(cs){return cs[0].sel(new Int(0));}, _7: function(cs){return cs[1].sel(new Int(0));}, Item: function(cs){return Food.concretes["FoodIta"].rule("_21", cs);}, Kind: function(cs){return Food.concretes["FoodIta"].rule("_21", cs);}, Comment: function(cs){return Food.concretes["FoodIta"].rule("_21", cs);}, Quality: function(cs){return Food.concretes["FoodIta"].rule("_21", cs);}, "Int": function(cs){return new Arr(cs[0]);}, "Float"Line truncated
|
||||
Reference in new issue
Block a user