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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
5e332ef8
Commit
5e332ef8
authored
May 17, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Parsers API changes.
parent
5a02fb48
Pipeline
#399
canceled with stage
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Main.hs
bin/gargantext-phylo/Main.hs
+5
-4
No files found.
bin/gargantext-phylo/Main.hs
View file @
5e332ef8
...
@@ -28,8 +28,9 @@ import GHC.Generics
...
@@ -28,8 +28,9 @@ import GHC.Generics
import
GHC.IO
(
FilePath
)
import
GHC.IO
(
FilePath
)
import
Gargantext.Prelude
import
Gargantext.Prelude
import
Gargantext.Text.List.CSV
(
csvGraphTermList
)
import
Gargantext.Text.List.CSV
(
csvGraphTermList
)
import
Gargantext.Text.Parsers.CSV
(
readCsv
,
csv_title
,
csv_abstract
,
csv_publication_year
)
import
Gargantext.Text.Parsers.CSV
(
csv_title
,
csv_abstract
,
csv_publication_year
)
import
Gargantext.Text.Parsers
(
FileFormat
(
..
),
parseDocs
)
import
qualified
Gargantext.Text.Parsers.CSV
as
CSV
import
Gargantext.Text.Parsers
(
FileFormat
(
..
),
parseFile
)
import
Gargantext.Text.Terms.WithList
import
Gargantext.Text.Terms.WithList
import
Gargantext.Text.Context
(
TermList
)
import
Gargantext.Text.Context
(
TermList
)
...
@@ -116,7 +117,7 @@ csvToCorpus :: Limit -> CorpusPath -> IO ([(Int,Text)])
...
@@ -116,7 +117,7 @@ csvToCorpus :: Limit -> CorpusPath -> IO ([(Int,Text)])
csvToCorpus
limit
csv
=
DV
.
toList
csvToCorpus
limit
csv
=
DV
.
toList
.
DV
.
take
limit
.
DV
.
take
limit
.
DV
.
map
(
\
n
->
(
csv_publication_year
n
,
(
csv_title
n
)
<>
" "
<>
(
csv_abstract
n
)))
.
DV
.
map
(
\
n
->
(
csv_publication_year
n
,
(
csv_title
n
)
<>
" "
<>
(
csv_abstract
n
)))
.
snd
<$>
readCsv
csv
.
snd
<$>
CSV
.
readFile
csv
-- | To transform a Wos nfile into a readable corpus
-- | To transform a Wos nfile into a readable corpus
...
@@ -127,7 +128,7 @@ wosToCorpus limit path = DL.take limit
...
@@ -127,7 +128,7 @@ wosToCorpus limit path = DL.take limit
.
filter
(
\
d
->
(
isJust
$
_hyperdataDocument_publication_year
d
)
.
filter
(
\
d
->
(
isJust
$
_hyperdataDocument_publication_year
d
)
&&
(
isJust
$
_hyperdataDocument_title
d
)
&&
(
isJust
$
_hyperdataDocument_title
d
)
&&
(
isJust
$
_hyperdataDocument_abstract
d
))
&&
(
isJust
$
_hyperdataDocument_abstract
d
))
<$>
parse
Docs
WOS
path
<$>
parse
File
WOS
path
-- | To use the correct parser given a CorpusType
-- | To use the correct parser given a CorpusType
...
...
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