Commit 3e1081f6 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[TEXT][PARSERS] Isidore.

parent 191451e2
...@@ -98,6 +98,7 @@ library: ...@@ -98,6 +98,7 @@ library:
- http-conduit - http-conduit
- http-api-data - http-api-data
- http-types - http-types
- hsparql
- hxt - hxt
- hlcm - hlcm
- ini - ini
......
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
module Gargantext.Text.Parsers.Isidore where
import Gargantext.Prelude
import Database.HSparql.Connection
import Database.HSparql.QueryGenerator
-- import Data.RDF hiding (triple)
import Data.Text
route = "http://isidore.science/sparql/"
--selectExample :: IO (Maybe [Text])
selectIsidore = do
res <- selectQuery route simpleSelect
pure res
simpleSelect :: Query SelectQuery
simpleSelect = do
isidore <- prefix "isidore" (iriRef "http://www.rechercheisidore.fr/class")
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")
doc <- var
resource <- var
title <- var
date <- var
abstract <- var
source <- var
triple resource (rdf .:. "type") (isidore .:. "BibliographicalResource")
triple doc (dcterms .:. "title") title
triple doc (dcterms .:. "date") date
triple doc (dcterms .:. "source") source
triple doc (dc .:. "description") abstract
filterExpr $ contains title ("ville" :: Text)
selectVars [title]
...@@ -17,18 +17,21 @@ extra-deps: ...@@ -17,18 +17,21 @@ extra-deps:
commit: 6f0595d2421005837d59151a8b26eee83ebb67b5 commit: 6f0595d2421005837d59151a8b26eee83ebb67b5
- git: https://github.com/delanoe/servant-static-th.git - git: https://github.com/delanoe/servant-static-th.git
commit: ba5347e7d8a13ce5275af8470c15b2305fbb23af commit: ba5347e7d8a13ce5275af8470c15b2305fbb23af
- accelerate-1.2.0.0
#- opaleye-0.6.7002.0 #- opaleye-0.6.7002.0
- KMP-0.1.0.2
- accelerate-1.2.0.0
- aeson-lens-0.5.0.0 - aeson-lens-0.5.0.0
- duckling-0.1.3.0 - duckling-0.1.3.0
- full-text-search-0.2.1.4 - full-text-search-0.2.1.4
- fullstop-0.1.4 - fullstop-0.1.4
- hsparql-0.3.6 # Sparql for ISIDORE database
- hgal-2.0.0.2
- rdf4h-3.1.1
- located-base-0.1.1.1
- probable-0.1.3 - probable-0.1.3
- rake-0.0.1 - rake-0.0.1
- located-base-0.1.1.1 - serialise-0.2.0.0
- servant-flatten-0.2
- servant-multipart-0.11.2 - servant-multipart-0.11.2
- stemmer-0.5.2 - stemmer-0.5.2
- servant-flatten-0.2
- serialise-0.2.0.0
- KMP-0.1.0.2
- validity-0.8.0.0 # patches-{map,class} - validity-0.8.0.0 # patches-{map,class}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment