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
791fe54c
Commit
791fe54c
authored
Jan 02, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Text][Parsers][Isidore] funcWith for contains.
parent
208ac140
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
Isidore.hs
src/Gargantext/Text/Parsers/Isidore.hs
+13
-16
No files found.
src/Gargantext/Text/Parsers/Isidore.hs
View file @
791fe54c
...
...
@@ -44,8 +44,9 @@ simpleSelect q = do
rdf
<-
prefix
"rdf"
(
iriRef
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
)
dcterms
<-
prefix
"dcterms"
(
iriRef
"http://purl.org/dc/terms/"
)
dc
<-
prefix
"dc"
(
iriRef
"http://purl.org/dc/elements/1.1/"
)
ore
<-
prefix
"ore"
(
iriRef
"http://www.openarchives.org/ore/terms/"
)
bif
<-
prefix
"bif"
(
iriRef
"bif:"
)
langFr
<-
prefix
"langFr"
(
iriRef
"http://lexvo.org/id/iso639-3/fra"
)
--ore <- prefix "ore" (iriRef "http://www.openarchives.org/ore/terms/")
--bif <- prefix "bif" (iriRef "bif:")
link
<-
var
title
<-
var
...
...
@@ -55,30 +56,26 @@ simpleSelect q = do
source
<-
var
lang
<-
var
publisher
<-
var
agg
<-
var
indexT
<-
var
langFr
<-
var
--agg <- var
triple_
link
(
rdf
.:.
"type"
)
(
isidore
.:.
"BibliographicalResource"
)
triple_
link
(
dcterms
.:.
"title"
)
title
triple_
link
(
dcterms
.:.
"date"
)
date
triple_
link
(
dcterms
.:.
"creator"
)
authors
triple_
link
(
dcterms
.:.
"language"
)
lang
triple_
link
(
dcterms
.:.
"source"
)
source
triple_
link
(
ore
.:.
"isAggregatedBy"
)
agg
--triple_ link (ore .:. "isAggregatedBy") agg
--triple_ agg (dcterms .:. "title") title
optional
$
triple_
link
(
dcterms
.:.
"source"
)
source
optional
$
triple_
link
(
dcterms
.:.
"publisher"
)
publisher
optional
$
triple_
link
(
dc
.:.
"description"
)
abstract
--filterExpr $ (.||.) (contains title q) (contains abstract q)
--triple_ indexT (bif .:. "contains") title
--filterExpr_ (contains indexT q) -- (contains abstract q)
orderNextDesc
date
--filterExpr $ (.||.) (contains title q) (contains title q)
filterExpr
(
containsWith
title
q
)
-- (contains abstract q)
--filterExpr $ langMatches title (str ("fra" :: Text))
--orderNextDesc date
limit_
10
distinct_
selectVars
[
link
,
date
,
authors
,
source
,
title
,
lang
,
publisher
,
abstract
]
selectVars
[
link
,
date
,
lang
,
title
]
--selectVars [link, date, authors, source, title, lang, publisher, abstract]
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