Giter Club home page Giter Club logo

vsm-dictionary-bioportal's People

Contributors

bblodfon avatar dependabot[bot] avatar stcruy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vsm-dictionary-bioportal's Issues

Inferring Ontology Acronyms from ID

Because of this issue (multiple ontology terms with the same ID), I had to implement a way to infer the ontology acronym from the entry id. This is done in the function inferDictAbbrevFromId(id) in DIctionaryBioPoral.js.

So, if more regexes are found that can clearly distinguish the ontology acronym from the id in some cases, then I have to add them to the ontologyRegexes array of the aforementioned function.

If in the future the issue is solved (e.g. BioPortal provides an endpoint that returns a source ontology for a term), then I will have to re-design getEntries() and remove the hack.

John.

`cb` called multiple times on error

There is a same bug in getDictInfos(), getEntries(), and getEntryMatchesForString() :
In their for-loop, each iteration can make its own call call cb(), if an error occurs. See:

for (let url of urlArray) {
  ...
  this.request(url, (err, res) => {
    if (err) return cb(err);   //  <---- THAT

'THAT' line will get called urlArray.length times if each of the request errors for each of the urls.

Solution: set an answered = true when an error causes a cb() call.
And when answered is already true, do not call cb. Not in the final call, and not when possible next error is received.

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.