trying to find some inefficiencies in Finnish resource

This commit is contained in:
aarne
2010-10-25 19:56:47 +00:00
parent cd0a9982bd
commit e745881e4a
6 changed files with 32 additions and 2 deletions

View File

@@ -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" ;

View File

@@ -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.

View File

@@ -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); }

View File

@@ -142,12 +142,27 @@ param
appCompl : Bool -> Polarity -> Compl -> NP -> Str = \isFin,b,co,np ->
let
c = case co.c of {
NPAcc => case b of {
Neg => NPCase Part ; -- en näe taloa/sinua
Pos => case isFin of {
True => NPAcc ; -- näen/täytyy nähdä sinut
_ => case np.isPron of {
False => NPCase Nom ; -- täytyy nähdä talo
_ => NPAcc
}
}
} ;
_ => co.c
} ;
{-
c = case <isFin, b, co.c, np.isPron> of {
<_, Neg, NPAcc,_> => NPCase Part ; -- en näe taloa/sinua
<_, Pos, NPAcc,True> => NPAcc ; -- näen/täytyy sinut
<False,Pos, NPAcc,False> => NPCase Nom ; -- täytyy nähdä talo
<_,_,coc,_> => coc
} ;
-}
nps = np.s ! c
in
preOrPost co.isPre co.s nps ;

View File

@@ -69,7 +69,8 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
SlashV2VNP v np vp =
insertObj
(\\fin,b,a => appCompl fin b v.c2 np ++ infVP v.sc b a vp v.vi)
(\\fin,b,a => appCompl True b v.c2 np ++ ---- fin -> stack overflow
infVP v.sc b a vp v.vi)
(predV v) ** {c2 = vp.c2} ;
AdvVP vp adv = insertObj (\\_,_,_ => adv.s) vp ;

File diff suppressed because one or more lines are too long