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
a4978c3b
Commit
a4978c3b
authored
Jun 17, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ISIDORE API] FIX ReplyOnly.
parent
8f285b42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
IsidoreApi.hs
src/Gargantext/Text/Parsers/IsidoreApi.hs
+10
-4
stack.yaml
stack.yaml
+1
-1
No files found.
src/Gargantext/Text/Parsers/IsidoreApi.hs
View file @
a4978c3b
...
...
@@ -37,8 +37,14 @@ get la l q a = do
let
printErr
(
DecodeFailure
e
_
)
=
panic
e
printErr
e
=
panic
(
cs
$
show
e
)
iDocs
<-
either
printErr
(
_docs
)
<$>
Isidore
.
get
l
q
a
hDocs
<-
mapM
(
\
d
->
isidoreToDoc
la
d
)
iDocs
toIsidoreDocs
::
Reply
->
[
IsidoreDoc
]
toIsidoreDocs
(
ReplyOnly
r
)
=
[
r
]
toIsidoreDocs
(
Replies
rs
)
=
rs
iDocs
<-
either
printErr
_content
<$>
Isidore
.
get
l
q
a
hDocs
<-
mapM
(
\
d
->
isidoreToDoc
la
d
)
(
toIsidoreDocs
iDocs
)
pure
hDocs
isidore2csvFile
::
FilePath
->
Lang
->
Maybe
Isidore
.
Limit
...
...
@@ -61,8 +67,8 @@ isidoreToDoc l (IsidoreDoc t a d u s as) = do
langText
::
LangText
->
Text
langText
(
LangText
_l
t1
)
=
t1
langText
(
OnlyText
t2
)
=
t2
langText
(
ArrayText
ts
)
=
Text
.
intercalate
" "
$
map
langText
ts
langText
(
OnlyText
t2
)
=
t2
langText
(
ArrayText
ts
)
=
Text
.
intercalate
" "
$
map
langText
ts
(
utcTime
,
(
pub_year
,
pub_month
,
pub_day
))
<-
Date
.
split
l
(
maybe
(
Just
"2019"
)
(
Just
)
d
)
...
...
stack.yaml
View file @
a4978c3b
...
...
@@ -33,7 +33,7 @@ extra-deps:
-
git
:
https://github.com/delanoe/hsparql.git
commit
:
308c74b71a1abb0a91546fa57d353131248e3a7f
-
git
:
https://gitlab.iscpif.fr/gargantext/crawlers/isidore.git
commit
:
069118b29198ee1044a685d8c08dcfb242d601e3
commit
:
e39454101b53916e3082085ebfe922df695fc775
-
KMP-0.1.0.2
-
accelerate-1.2.0.0
-
aeson-lens-0.5.0.0
...
...
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