diff --git a/NLP/Nerf/Dict/Base.hs b/NLP/Nerf/Dict/Base.hs
--- a/NLP/Nerf/Dict/Base.hs
+++ b/NLP/Nerf/Dict/Base.hs
@@ -12,6 +12,7 @@
 
 -- * Dictionary
 , Label
+, DAWG
 , Dict
 , fromPairs
 , fromEntries
@@ -29,7 +30,8 @@
 import Data.Text.Binary ()
 import qualified Data.Text as T
 import qualified Data.Set as S
-import qualified Data.DAWG as D
+import qualified Data.DAWG.Static as D
+import qualified Data.DAWG.Trans.Vector as D
 
 -- | A type of named entity.
 type NeType = T.Text
@@ -53,7 +55,9 @@
 -- | A 'Dict' is a map from forms to labels.  Each form may be annotated
 -- with multiple labels.  The map is represented using the directed acyclic
 -- word graph.
-type Dict = D.DAWG (S.Set Label)
+-- type Dict = D.DAWG (S.Set Label)
+type DAWG = D.DAWG D.Trans Char ()
+type Dict = DAWG (S.Set Label)
 
 -- | Construct dictionary from the list of form/label pairs.
 fromPairs :: [(Form, Label)] -> Dict
@@ -84,12 +88,12 @@
 
 -- | Replacement implementation of unionsWith while there is
 -- no such function in dawg library. 
-unionsWith :: Ord a => (a -> a -> a) -> [D.DAWG a] -> D.DAWG a
+unionsWith :: Ord a => (a -> a -> a) -> [DAWG a] -> DAWG a
 unionsWith f = foldl (unionWith f) D.empty
 
 -- | Replacement implementation of unionWith while there is
 -- no such function in dawg library. 
-unionWith :: Ord a => (a -> a -> a) -> D.DAWG a -> D.DAWG a -> D.DAWG a
+unionWith :: Ord a => (a -> a -> a) -> DAWG a -> DAWG a -> DAWG a
 unionWith f d d' = D.fromListWith f (D.assocs d ++ D.assocs d')
 
 -- | Differentiate labels from separate dictionaries using
@@ -100,7 +104,7 @@
     | (i, dict) <- zip [0..] ds ]
 
 -- | Map function over the DAWG elements.
-mapD :: Ord b => (a -> b) -> D.DAWG a -> D.DAWG b
+mapD :: Ord b => (a -> b) -> DAWG a -> DAWG b
 mapD f d = D.fromList [(x, f y) | (x, y) <- D.assocs d]
 
 -- | Map function over the set.
diff --git a/NLP/Nerf/Schema.hs b/NLP/Nerf/Schema.hs
--- a/NLP/Nerf/Schema.hs
+++ b/NLP/Nerf/Schema.hs
@@ -47,7 +47,7 @@
 import qualified Data.Set as S
 import qualified Data.Vector as V
 import qualified Data.Text as T
-import qualified Data.DAWG as D
+import qualified Data.DAWG.Static as D
 
 import qualified Data.CRF.Chain1 as CRF
 import qualified Control.Monad.Ox as Ox
diff --git a/nerf.cabal b/nerf.cabal
--- a/nerf.cabal
+++ b/nerf.cabal
@@ -1,5 +1,5 @@
 name:               nerf
-version:            0.2.1
+version:            0.2.2
 synopsis:           Nerf, the named entity recognition tool based on linear-chain CRFs
 description:
     The package provides the named entity recognition (NER) tool divided into a
@@ -38,8 +38,8 @@
       , data-named >= 0.5 && < 0.6
       , monad-ox >= 0.2 && < 0.3
       , sgd >= 0.2.1 && < 0.3
-      , polimorf >= 0.5.0 && < 0.6
-      , dawg >= 0.5 && < 0.6
+      , polimorf >= 0.6.0 && < 0.7
+      , dawg >= 0.8.1 && < 0.9
       , cmdargs
 
     exposed-modules:
diff --git a/tools/nerf.hs b/tools/nerf.hs
--- a/tools/nerf.hs
+++ b/tools/nerf.hs
@@ -17,7 +17,7 @@
 import qualified Data.Text as T
 import qualified Data.Text.Lazy as L
 import qualified Data.Text.Lazy.IO as L
-import qualified Data.DAWG as D
+import qualified Data.DAWG.Static as D
 
 import NLP.Nerf (train, ner, tryOx)
 import NLP.Nerf.Schema (defaultConf)
