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/Data.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/Data.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/Data.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/haskell/PGF/Data.hs b/src/runtime/haskell/PGF/Data.hs index f82d33644..3e26cbd98 100644 --- a/src/runtime/haskell/PGF/Data.hs +++ b/src/runtime/haskell/PGF/Data.hs @@ -7,6 +7,8 @@ import PGF.Type import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.IntMap as IntMap +import qualified Data.IntSet as IntSet +import qualified GF.Data.TrieMap as TMap import Data.Array.IArray import Data.Array.Unboxed import Data.List @@ -42,6 +44,7 @@ data Concr = Concr { pproductions :: IntMap.IntMap (Set.Set Production), -- productions needed for parsing lproductions :: Map.Map CId (IntMap.IntMap (Set.Set Production)), -- productions needed for linearization cnccats :: Map.Map CId CncCat, + lexicon :: IntMap.IntMap (IntMap.IntMap (TMap.TrieMap Token IntSet.IntSet)), totalCats :: {-# UNPACK #-} !FId } |
