Giter Club home page Giter Club logo

basex-ner-xar's Introduction

basex-ner-xar

This is not a XAR archive. I tried to make a XAR for BaseX, but it did not work. Additionally, the BaseX documentation says that performance will suffer, so I decided to make a JAR instead. Maybe one day I will try to make a XAR that actually works and performs well.

Building from source

It is assumed that you have already installed BaseX and Maven.

Download or clone or fork the git repository, which has all the source files. In the directory where you have just downloaded the project, do maven install. This will create a .jar file in the target directory.

Installing

Copy the .jar file from the target directory into the lib/custom directory of your BaseX installation. Start, or restart BaseX.

Using

Open eXide, and enter the following in a new XQuery document.

import module namespace ner = "http://rakensi.com/xquery/functions/ner";
let $grammar :=
  <grammar>
    <entity id="♳"><name>PET</name><name>polyethylene</name><name>terephthalate</name></entity>
    <entity id="♴"><name>HDPE</name><name>high-density polyethylene</name><name>polyethylene high-density</name></entity>
    <entity id="♵"><name>PVC</name><name>polyvinyl chloride</name><name>polyvinylchloride</name><name>vinyl</name><name>polyvinyl</name></entity>
  </grammar>
let $input := <r>RIC for vinyl and polyethylene</r>
let $ner-parse := ner:named-entity-recognition($grammar, map{'match-element-name': 'ric', 'match-attribute': 'symbol'})
return $ner-parse($input)

Press the 'Eval' button. The output should look like:

<r>RIC for <ric symbol="♵">vinyl</ric> and <ric symbol="♳">polyethylene</ric></r>

See also

For more documentation, please have a look at the XML-NER project.

basex-ner-xar's People

Contributors

nverwer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.