This demo shows how to call linked data based enrichment services for XML content types from the browser.
To run the demo, get the source files, switch to the feisgiltt2016
directory, and add the following to your HTML page:
<script src="lib/jquery.min.js"></script> <script type="text/javascript" src="lib/Saxon-CE_1.1/Saxonce/Saxonce.nocache.js"></script> <script type="text/javascript" src="callSaxon.js"></script> <script type="text/javascript" src="callFremeNer.js"></script>
You then will be able to run the function callFremeNer()
. It takes the following parameters:
selectedLanguage
: one of the languages that can be processed with FREME NER.selectedDataset
: one of the data sets that can be used for enrichment.doctype
: one of the doctype that callFremeNer
can process. Currently the function understands DocBook 5.0, TEI P5 and XLIFF 2.1.approach
: the approach used to store the enrichment information inside the doctype. Five approaches are supported:sourceContent
: the actual XML source content file.An example call looks like this:
var myFremeNerOutput = new callFremeNer(selectedLanguage, selectedDataset, doctype, approach, sourceContent); myFremeNerOutput.then( function(response) { console.log("Success!", response); }, function(reject) {console.log("Failed!", reject);} );
If the processing is succcesful the reponse
parameter contains the output. If the processing failed the reject
parameter contains the error message.
In the left form below enter a document of these types: Docbook 5.0 (load a sample), TEI P5 (load a sample), XLIFF 2.1 (load a sample), or StratML. Then click on the bottom Call FREME e-Entity
. Also, adapt the language and the data set used for enrichment to your needs.