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 ...@@ -91,17 +91,17 @@ data Versioned a = Versioned
} }
ngramsPatch :: NgramsPatch ngramsPatch :: Int -> NgramsPatch
ngramsPatch = NgramsPatch (DM.fromList [(1, StopList)]) Set.empty Set.empty ngramsPatch n = NgramsPatch (DM.fromList [(1, StopList)]) (Set.fromList [n]) Set.empty
{- {-
toEdit :: NgramsId -> NgramsPatch -> Edit NgramsId NgramsPatch toEdit :: NgramsId -> NgramsPatch -> Edit NgramsId NgramsPatch
toEdit n p = Edit n p toEdit n p = Edit n p
-} -}
ngramsIdPatch :: Patch NgramsId NgramsPatch ngramsIdPatch :: Patch NgramsId NgramsPatch
ngramsIdPatch = fromList $ catMaybes $ reverse [ replace (1::NgramsId) (Just ngramsPatch) Nothing ngramsIdPatch = fromList $ catMaybes $ reverse [ replace (1::NgramsId) (Just $ ngramsPatch 1) Nothing
, replace (1::NgramsId) Nothing (Just ngramsPatch) , replace (1::NgramsId) Nothing (Just $ ngramsPatch 2)
, replace (2::NgramsId) Nothing (Just ngramsPatch) , 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