This package cannot be used alone. EZS has to be installed.
var ezs = require('ezs');
ezs.use(require('ezs-istex'));
- ISTEXFetch
- ISTEXParseDotCorpus
- ISTEXResult
- ISTEXSave
- ISTEXScroll
- ISTEXSearch
- ISTEXTriplify
- ISTEX
- ISTEXRemoveIf
- ISTEXRemoveVerb
- ISTEXUniq
Take Object
with id
and returns the document's metadata
data
feed
source
string Field to use to fetch documents (optional, default"id"
)target
stringid
string ISTEX Identifier of a document (optional, defaultdata.id
)sid
string User-agent identifier (optional, default"ezs-istex"
)
Parse a .corpus
file content, and returns an object containing queries and
ids.
data
feed
Returns Object
- See: ISTEXScroll
Take Object
containing results of ISTEX API, and returns hits
value (documents).
This should be placed after ISTEXScroll.
- See: ISTEXFetch
Take and Object with ISTEX id
and save the document's file.
Warning: to access fulltext, you have to give a token
parameter.
ISTEXFetch produces the stream you need to save the file.
data
feed
directory
string path where to save the PDFs (optional, defaultcurrentworkingdirectory
)typology
string typology of the document to save (optional, default"fulltext"
)format
string format of the files to save (optional, default"pdf"
)sid
string User-agent identifier (optional, default"ezs-istex"
)token
string? authentication token (see documentation)
Returns Array
- See: ISTEXSearch
Take an Object
containing URLs to the ISTEX API, and returns results.
Returns Stream
Take Object
containing a query and outputs URLs to use with ISTEXScroll.
Optionally, you can put the query in the query
parameter.
data
feed
source
string property to treat (optional, default"query"
)target
string property used in the resultquery
string ISTEX querysid
string User-agent identifier (optional, default"ezs-istex"
)maxPage
number maximum number of pages to get from the APIsize
number size of each page of results (optional, default2000
)duration
string maximum duration between two request to the API (optional, default"30s"
)field
Array<string> fields to output (optional, default["doi"]
)
Returns Stream
- See: ISTEXResult
- See: OBJFlatten (from ezs-basics)
Take Object
containing flatten hits from ISTEXResult.
data
feed
property
Object path to uri for the properties to output (property and uri separated by->
) (optional, default[]
)source
string the root of the keys (ex:istex/
) (optional, default""
)
data: {
'author/0/name': 'Geoffrey Strickland',
'author/0/affiliations/0': 'University of Reading',
'host/issn/0': '0047-2441',
'host/eissn/0': '1740-2379',
'title': 'Maupassant, Zola, Jules Vallès and the Paris Commune of 1871',
'publicationDate': '1983',
'doi/0': '10.1177/004724418301305203',
'id': 'F6CB7249E90BD96D5F7E3C4E80CC1C3FEE4FF483',
'score': 1 }
.pipe(ezs('ISTEXTriplify', {
property: [
'doi/0 -> http://purl.org/ontology/bibo/doi',
'language -> http://purl.org/dc/terms/language',
'author/\\d+/name -> http://purl.org/dc/terms/creator',
'author/\\d+/affiliations -> https://data.istex.fr/ontology/istex#affiliation',
],
));
<https://data.istex.fr/document/F6CB7249E90BD96D5F7E3C4E80CC1C3FEE4FF483>
a <http://purl.org/ontology/bibo/Document> ;
"10.1002/zaac.19936190205" ;
<https://data.istex.fr/ontology/istex#idIstex> "F6CB7249E90BD96D5F7E3C4E80CC1C3FEE4FF483" ;
<http://purl.org/dc/terms/creator> "Geoffrey Strickland" ;
<https://data.istex.fr/ontology/istex#affiliation> "University of Reading" ;
Returns string
Take an array and returns matching documents for every value of the array
data
feed
query
(string | Array<string>) ISTEX query (or queries) (optional, defaultdata.query||[]
)id
(string | Array<string>) ISTEX id (or ids) (optional, defaultdata.id||[]
)maxPage
number maximum number of pages to getsize
number size of each page of resultsduration
string maximum duration between two requests (ex: "30s")field
Array<Object> fields to output
Remove triples which properties are given (remove
) if other given property
has the given value
.
if
string "property = value"
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/ontology/istex#idIstex> "2FF3F5B1477986B9C617BB75CA3333DBEE99EB05" .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> a <http://purl.org/ontology/bibo/Document> .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <host/genre> "journal" .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/fake#journalTitle> "Linguistic Typology" .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/fake#bookTitle> "Linguistic Typology" .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/fake#seriesTitle> "Linguistic Typology" .
[ISTEXRemoveIf]
if = <host/genre> = "journal"
remove = <https://data.istex.fr/fake#bookTitle>
remove = <https://data.istex.fr/fake#seriesTitle>
remove = <host/genre>
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/ontology/istex#idIstex> "2FF3F5B1477986B9C617BB75CA3333DBEE99EB05" .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> a <http://purl.org/ontology/bibo/Document> .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/fake#journalTitle> "Linguistic Typology" .
Unconditionnaly remove triples which verb
is given.
verb
string"<https://data.istex.fr/ontology/istex#idIstex>"
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/ontology/istex#idIstex> "2FF3F5B1477986B9C617BB75CA3333DBEE99EB05" .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> a <http://purl.org/ontology/bibo/Document> .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <host/genre> "journal" .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/fake#journalTitle> "Linguistic Typology" .
[ISTEXRemoveIf]
verb = <host/genre>
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/ontology/istex#idIstex> "2FF3F5B1477986B9C617BB75CA3333DBEE99EB05" .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> a <http://purl.org/ontology/bibo/Document> .
<https://api.istex.fr/ark:/67375/QT4-D0J6VN6K-K> <https://data.istex.fr/fake#journalTitle> "Linguistic Typology" .
Remove duplicates triples within a single document's set of triples (same subject).
Assume that every triple of a document (except the first one) follows another triple of the same document.
<https://api.istex.fr/ark:/67375/NVC-JMPZTKTT-R> <http://purl.org/dc/terms/creator> "S Corbett" .
<https://api.istex.fr/ark:/67375/NVC-JMPZTKTT-R> <https://data.istex.fr/ontology/istex#affiliation> "Department of Public Health, University of Sydney, Australia." .
<https://api.istex.fr/ark:/67375/NVC-JMPZTKTT-R> <https://data.istex.fr/ontology/istex#affiliation> "Department of Public Health, University of Sydney, Australia." .
<https://api.istex.fr/ark:/67375/NVC-JMPZTKTT-R> <https://data.istex.fr/ontology/istex#affiliation> "Department of Public Health, University of Sydney, Australia." .
[ISTEXUniq]
<https://api.istex.fr/ark:/67375/NVC-JMPZTKTT-R> <http://purl.org/dc/terms/creator> "S Corbett" .
<https://api.istex.fr/ark:/67375/NVC-JMPZTKTT-R> <https://data.istex.fr/ontology/istex#affiliation> "Department of Public Health, University of Sydney, Australia." .