diff options
| author | krasimir <krasimir@chalmers.se> | 2010-12-14 08:46:22 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-12-14 08:46:22 +0000 |
| commit | 7d58efb6600d164101c439cf8954de637ea35c34 (patch) | |
| tree | 550fcfd6966efcdc98dbb0caab0eadea5edd97d1 /src/runtime/haskell/PGF/Morphology.hs | |
| parent | 0c4f5030c76515d06b286d8803b034e5230b7ed3 (diff) | |
optimization in the parser for large lexicons. Now, the parser is slightly slower for grammars with a small lexicon but 3-4 times faster for the English Resource Grammar used in combination with Oxford Advanced Learners Dictionary
Diffstat (limited to 'src/runtime/haskell/PGF/Morphology.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/Morphology.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/haskell/PGF/Morphology.hs b/src/runtime/haskell/PGF/Morphology.hs index 711f9c01d..d5a2d28bc 100644 --- a/src/runtime/haskell/PGF/Morphology.hs +++ b/src/runtime/haskell/PGF/Morphology.hs @@ -29,7 +29,7 @@ buildMorpho pgf lang = Morpho $ collectWords pinfo = Map.fromListWith (++) [(t, [(fun,lbls ! l)]) | (CncCat s e lbls) <- Map.elems (cnccats pinfo) , fid <- [s..e] - , PApply funid _ <- maybe [] Set.toList (IntMap.lookup fid (pproductions pinfo)) + , PApply funid _ <- maybe [] Set.toList (IntMap.lookup fid (productions pinfo)) , let CncFun fun lins = cncfuns pinfo ! funid , (l,seqid) <- assocs lins , sym <- elems (sequences pinfo ! seqid) |
