diff options
| author | aarne <aarne@chalmers.se> | 2009-12-31 11:02:26 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2009-12-31 11:02:26 +0000 |
| commit | 34b839c0f9e7f5a3a850d27c43b3160573ff2c00 (patch) | |
| tree | 118e681c4523dad89e8d3bd85604e2c9ede3d893 /src/runtime/haskell/PGF/ShowLinearize.hs | |
| parent | b92c34bafdef047401bf22468b6725f3de312801 (diff) | |
morpho analysis with -missing flag, shows words outside lexicon; also invoked if parsing fails; also added pg -words to show the list of words
Diffstat (limited to 'src/runtime/haskell/PGF/ShowLinearize.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/ShowLinearize.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/haskell/PGF/ShowLinearize.hs b/src/runtime/haskell/PGF/ShowLinearize.hs index dd3b997a6..fa4de86c8 100644 --- a/src/runtime/haskell/PGF/ShowLinearize.hs +++ b/src/runtime/haskell/PGF/ShowLinearize.hs @@ -100,7 +100,7 @@ markLinearize pgf lang = concat . take 1 . linearizesMark pgf lang collectWords :: PGF -> Language -> [(String, [(CId,String)])] collectWords pgf lang = concatMap collOne - [(f,c,0) | (f,(DTyp [] c _,_,_)) <- Map.toList $ funs $ abstract pgf] + [(f,c,length xs) | (f,(DTyp xs c _,_,_)) <- Map.toList $ funs $ abstract pgf] where collOne (f,c,i) = fromRec f [showCId c] (recLinearize pgf lang (foldl EApp (EFun f) (replicate i (EMeta 888)))) @@ -108,6 +108,7 @@ collectWords pgf lang = RR rs -> concat [fromRec f v t | (_,t) <- rs] RT rs -> concat [fromRec f (p:v) t | (p,t) <- rs] RFV rs -> concatMap (fromRec f v) rs - RS s -> [(s,[(f,unwords (reverse v))])] + RS s -> [(w,[(f,unwords (reverse v))]) | w <- words s, w /= "?888"] --- +-- RS s -> [(s,[(f,unwords (reverse v))])] RCon c -> [] ---- inherent |
