Commit ea1b6688 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT] Annuaire pairing, full firstname

parent 6a5decf2
cabal-version: 0.0.5.8.7
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.34.4.
--
......
......@@ -178,7 +178,8 @@ getNgramsContactId aId = do
pure paired
-- POC here, should be a probabilistic function (see the one used to find lang)
toName :: Node HyperdataContact -> NgramsTerm
toName contact = NgramsTerm $ (Text.toTitle $ Text.take 1 firstName) <> ". " <> (Text.toTitle lastName)
-- toName contact = NgramsTerm $ (Text.toTitle $ Text.take 1 firstName) <> ". " <> (Text.toTitle lastName)
toName contact = NgramsTerm $ (Text.toTitle firstName) <> " " <> (Text.toTitle lastName)
where
firstName = fromMaybe "" $ contact^.(node_hyperdata . hc_who . _Just . cw_firstName)
lastName = fromMaybe "" $ contact^.(node_hyperdata . hc_who . _Just . cw_lastName)
......
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