From c5334613c514e129c1bd0d6f489f2c4f61516300 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 25 Oct 2010 19:56:47 +0000 Subject: trying to find some inefficiencies in Finnish resource --- examples/phrasebook/WordsFin.gf | 1 + examples/phrasebook/doc-phrasebook.txt | 1 + examples/phrasebook/www/support.js | 12 ++++++++++++ 3 files changed, 14 insertions(+) (limited to 'examples') diff --git a/examples/phrasebook/WordsFin.gf b/examples/phrasebook/WordsFin.gf index 59cce8600..7f7407edb 100644 --- a/examples/phrasebook/WordsFin.gf +++ b/examples/phrasebook/WordsFin.gf @@ -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" ; diff --git a/examples/phrasebook/doc-phrasebook.txt b/examples/phrasebook/doc-phrasebook.txt index e57944d04..0aa99d36a 100644 --- a/examples/phrasebook/doc-phrasebook.txt +++ b/examples/phrasebook/doc-phrasebook.txt @@ -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. diff --git a/examples/phrasebook/www/support.js b/examples/phrasebook/www/support.js index b322aae86..7c34bad82 100644 --- a/examples/phrasebook/www/support.js +++ b/examples/phrasebook/www/support.js @@ -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); } -- cgit v1.2.3