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. -- This file has been generated from package.yaml by hpack version 0.34.4.
-- --
-- see: https://github.com/sol/hpack -- see: https://github.com/sol/hpack
name: gargantext name: gargantext
version: 0.0.5.8.7 version: 0.0.5.8.7
synopsis: Search, map, share synopsis: Search, map, share
description: Please see README.md description: Please see README.md
category: Data category: Data
......
...@@ -178,7 +178,8 @@ getNgramsContactId aId = do ...@@ -178,7 +178,8 @@ getNgramsContactId aId = do
pure paired pure paired
-- POC here, should be a probabilistic function (see the one used to find lang) -- POC here, should be a probabilistic function (see the one used to find lang)
toName :: Node HyperdataContact -> NgramsTerm 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 where
firstName = fromMaybe "" $ contact^.(node_hyperdata . hc_who . _Just . cw_firstName) firstName = fromMaybe "" $ contact^.(node_hyperdata . hc_who . _Just . cw_firstName)
lastName = fromMaybe "" $ contact^.(node_hyperdata . hc_who . _Just . cw_lastName) 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