Commit 11fab9ed authored by Alexandre Delanoë's avatar Alexandre Delanoë

[API][NGRAMS][PATCH] issue to discuss.

parent 5523d058
......@@ -91,17 +91,17 @@ data Versioned a = Versioned
}
ngramsPatch :: NgramsPatch
ngramsPatch = NgramsPatch (DM.fromList [(1, StopList)]) Set.empty Set.empty
ngramsPatch :: Int -> NgramsPatch
ngramsPatch n = NgramsPatch (DM.fromList [(1, StopList)]) (Set.fromList [n]) Set.empty
{-
toEdit :: NgramsId -> NgramsPatch -> Edit NgramsId NgramsPatch
toEdit n p = Edit n p
-}
ngramsIdPatch :: Patch NgramsId NgramsPatch
ngramsIdPatch = fromList $ catMaybes $ reverse [ replace (1::NgramsId) (Just ngramsPatch) Nothing
, replace (1::NgramsId) Nothing (Just ngramsPatch)
, replace (2::NgramsId) Nothing (Just ngramsPatch)
ngramsIdPatch = fromList $ catMaybes $ reverse [ replace (1::NgramsId) (Just $ ngramsPatch 1) Nothing
, replace (1::NgramsId) Nothing (Just $ ngramsPatch 2)
, replace (2::NgramsId) Nothing (Just $ ngramsPatch 2)
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment