Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pubmed
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
gargantext
crawlers
pubmed
Commits
7cd5fed6
Commit
7cd5fed6
authored
Jul 09, 2019
by
Mael NICOLAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct the abstract=Nothing bug
parent
23a3e2cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Parser.hs
src/PUBMED/Parser.hs
+8
-7
No files found.
src/PUBMED/Parser.hs
View file @
7cd5fed6
...
@@ -128,13 +128,20 @@ parseMedlineCitation = do
...
@@ -128,13 +128,20 @@ parseMedlineCitation = do
parseArticle
::
MonadThrow
m
=>
ConduitT
Event
o
m
PubMedArticle
parseArticle
::
MonadThrow
m
=>
ConduitT
Event
o
m
PubMedArticle
parseArticle
=
do
parseArticle
=
do
journal
<-
force
"journal"
$
manyTagsUntil
"Journal"
$
do
journal
<-
force
"journal"
$
manyTagsUntil
"Journal"
$
do
j
<-
manyTagsUntil
"Title"
content
j
<-
manyTagsUntil
"Title"
content
_
<-
many
ignoreAnyTreeContent
_
<-
many
ignoreAnyTreeContent
return
j
return
j
title
<-
manyTagsUntil
"ArticleTitle"
content
title
<-
manyTagsUntil
"ArticleTitle"
content
abstracts
<-
manyTagsUntil
"Abstract"
.
many
$
do
txt
<-
tagIgnoreAttrs
"AbstractText"
content
_
<-
many
ignoreAnyTreeContent
return
txt
-- TODO add authos
authors
<-
manyTagsUntil
"AuthorList"
.
many
$
authors
<-
manyTagsUntil
"AuthorList"
.
many
$
tagIgnoreAttrs
"Author"
$
do
tagIgnoreAttrs
"Author"
$
do
ln
<-
manyTagsUntil
"LastName"
content
ln
<-
manyTagsUntil
"LastName"
content
...
@@ -146,12 +153,6 @@ parseArticle = do
...
@@ -146,12 +153,6 @@ parseArticle = do
_
<-
many
ignoreAnyTreeContent
_
<-
many
ignoreAnyTreeContent
return
Author
{
lastName
=
ln
,
foreName
=
fn
,
affiliation
=
fromMaybe
Nothing
affi
}
return
Author
{
lastName
=
ln
,
foreName
=
fn
,
affiliation
=
fromMaybe
Nothing
affi
}
abstracts
<-
manyTagsUntil
"Abstract"
.
many
$
do
txt
<-
tagIgnoreAttrs
"AbstractText"
content
_
<-
many
ignoreAnyTreeContent
return
txt
-- TODO add authos
_
<-
many
ignoreAnyTreeContent
_
<-
many
ignoreAnyTreeContent
return
$
PubMedArticle
title
journal
abstracts
authors
return
$
PubMedArticle
title
journal
abstracts
authors
...
...
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