mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 13:09:33 -06:00
robustness to gfcc interpreter ; make gfcc to bin
This commit is contained in:
@@ -108,9 +108,10 @@ oper
|
||||
|
||||
nKukko : (kukko,kukon,kukkoja : Str) -> N ;
|
||||
|
||||
-- A special case are nouns with no alternations:
|
||||
-- A special case:
|
||||
-- the vowel harmony is inferred from the last letter,
|
||||
-- which must be one of "o", "u", "ö", "y".
|
||||
-- which must be one of "o", "u", "ö", "y". Regular weak-grade alternation
|
||||
-- is performed.
|
||||
|
||||
nTalo : (talo : Str) -> N ;
|
||||
|
||||
@@ -357,7 +358,8 @@ oper
|
||||
\c,p -> {c = NPCase c ; s = p ; isPre = True ; lock_Prep = <>} ;
|
||||
postPrep : Case -> Str -> Prep =
|
||||
\c,p -> {c = NPCase c ; s = p ; isPre = False ; lock_Prep = <>} ;
|
||||
postGenPrep p = {c = NPCase genitive ; s = p ; isPre = False ; lock_Prep = <>} ;
|
||||
postGenPrep p = {
|
||||
c = NPCase genitive ; s = p ; isPre = False ; lock_Prep = <>} ;
|
||||
casePrep : Case -> Prep =
|
||||
\c -> {c = NPCase c ; s = [] ; isPre = True ; lock_Prep = <>} ;
|
||||
accPrep = {c = NPAcc ; s = [] ; isPre = True ; lock_Prep = <>} ;
|
||||
|
||||
@@ -88,7 +88,7 @@ compute mcfg lang args = comp where
|
||||
|
||||
look = lookLin mcfg lang
|
||||
|
||||
idx xs i = xs !! i
|
||||
idx xs i = if i > length xs - 1 then trace "overrun !!\n" (last xs) else xs !! i
|
||||
|
||||
proj r p = case (r,p) of
|
||||
(_, FV ts) -> FV $ Prelude.map (proj r) ts
|
||||
|
||||
@@ -43,6 +43,7 @@ generateRandom gen gfcc cat = genTrees (randomRs (0.0, 1.0) gen) cat where
|
||||
gett ds (CId "Int") = (Tr (AI 12345) [], 1)
|
||||
gett [] _ = (Tr (AS "TIMEOUT") [], 1) ----
|
||||
gett ds cat = case fns cat of
|
||||
[] -> (Tr AM [],1)
|
||||
fs -> let
|
||||
d:ds2 = ds
|
||||
(f,args) = getf d fs
|
||||
|
||||
@@ -180,7 +180,7 @@ tools/$(GF_DOC_EXE): tools/GFDoc.hs
|
||||
gfcc:
|
||||
$(GHMAKE) $(GHCOPTFLAGS) -o gfcc GF/Canon/GFCC/RunGFCC.hs
|
||||
strip gfcc
|
||||
|
||||
mv gfcc ../bin/
|
||||
#
|
||||
# Distribution
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user