Commit 961c0068 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[PHYLO] implementation to Garg Flow (main fun ok).

parent 8aa7050d
......@@ -49,6 +49,20 @@ getListNgrams nodeIds ngramsType = do
pure ngrams
getTermsWith :: RepoCmdM env err m
=> [ListId]
-> NgramsType -> ListType
-> m (Map Text [Text])
getTermsWith ls ngt lt = Map.fromListWith (<>)
<$> map toTree
<$> Map.toList
<$> Map.filter (\f -> (fst f) == lt)
<$> mapTermListRoot ls ngt
where
toTree (t, (_lt, maybeRoot)) = case maybeRoot of
Nothing -> (t, [])
Just r -> (r, [t])
mapTermListRoot :: RepoCmdM env err m
=> [ListId] -> NgramsType
-> m (Map Text (ListType, (Maybe Text)))
......
......@@ -878,13 +878,27 @@ defaultWeightedLogJaccard :: Proximity
defaultWeightedLogJaccard = WeightedLogJaccard (initWeightedLogJaccard Nothing Nothing)
-- Queries
type Title = Text
type Desc = Text
defaultQueryBuild :: PhyloQueryBuild
defaultQueryBuild = initPhyloQueryBuild "Cesar et Cleôpatre" "An example of Phylomemy (french without accent)"
Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
defaultQueryBuild = defaultQueryBuild'
"Cesar et Cleôpatre"
"An example of Phylomemy (french without accent)"
defaultQueryBuild' :: Title -> Desc -> PhyloQueryBuild
defaultQueryBuild' t d = initPhyloQueryBuild t d
Nothing Nothing Nothing
Nothing Nothing Nothing
Nothing Nothing Nothing
Nothing Nothing Nothing
defaultQueryView :: PhyloQueryView
defaultQueryView = initPhyloQueryView Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
defaultQueryView = initPhyloQueryView
Nothing Nothing Nothing
Nothing Nothing Nothing
Nothing Nothing Nothing
Nothing Nothing
-- Software
......
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