Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
65281c78
Unverified
Commit
65281c78
authored
Jul 04, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show years
parent
9c607bee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
Main.hs
bin/gargantext-cli/Main.hs
+7
-4
No files found.
bin/gargantext-cli/Main.hs
View file @
65281c78
...
@@ -63,10 +63,13 @@ mapMP f xs = do
...
@@ -63,10 +63,13 @@ mapMP f xs = do
filterTermsAndCooc
filterTermsAndCooc
::
TermType
Lang
::
TermType
Lang
->
[
Text
]
->
(
Int
,
[
Text
])
->
IO
(
Map
(
Terms
,
Terms
)
Coocs
)
->
IO
(
Map
(
Terms
,
Terms
)
Coocs
)
filterTermsAndCooc
patterns
ts
=
coocOn
identity
<$>
mapM
(
terms
patterns
)
ts
filterTermsAndCooc
patterns
(
year
,
ts
)
=
do
putStrLn
$
"start filterTermsAndCooc "
<>
show
year
r
<-
coocOn
identity
<$>
mapM
(
terms
patterns
)
ts
putStrLn
$
"stop filterTermsAndCooc "
<>
show
year
pure
r
--main :: IO [()]
--main :: IO [()]
main
=
do
main
=
do
...
@@ -89,6 +92,6 @@ main = do
...
@@ -89,6 +92,6 @@ main = do
let
corpus'
=
DMaybe
.
catMaybes
$
map
(
\
k
->
DM
.
lookup
k
corpus
)
years
let
corpus'
=
DMaybe
.
catMaybes
$
map
(
\
k
->
DM
.
lookup
k
corpus
)
years
r
<-
zip
years
<$>
mapConcurrently
(
filterTermsAndCooc
patterns
)
corpus'
r
<-
mapConcurrently
(
filterTermsAndCooc
patterns
)
(
zip
years
corpus'
)
putStrLn
$
show
r
putStrLn
$
show
r
--writeFile outputFile cooc
--writeFile outputFile cooc
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