Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
ea1b6688
Commit
ea1b6688
authored
Apr 27, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Annuaire pairing, full firstname
parent
6a5decf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
gargantext.cabal
gargantext.cabal
+2
-2
Pairing.hs
src/Gargantext/Database/Action/Flow/Pairing.hs
+2
-1
No files found.
gargantext.cabal
View file @
ea1b6688
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
...
...
src/Gargantext/Database/Action/Flow/Pairing.hs
View file @
ea1b6688
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment