Skip to content

lealfp/ontomatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ontomatch REST-based service

Available at http://ontomatch.lis.ic.unicamp.br

This service parses a given text and returns [possible]associated entities(URIs) within an ontology. Associations are made using string similarity and distance measures of rdfs:label properties and subsequent owl:AnnotationProperty annotations linked to the resource -- usually adopted for adding properties acting as alternative labels.

Available ontologyIDs: pato, tao, xao, hfo

The set of algorithms used in this project is based on the project java-string-similarity. Please refer to this link for further details and credits.

Available algorithmIDs for string similarity and distance measures: NormalizedLevenshtein, JaroWinkler, Cosine, Jaccard, MetricLCS Levenshtein, OptimalStringAlignment

Based on a given similarity threshold (/api/rest/resources)

  • URL: /api/rest/resources

  • Method: POST

  • Required POST Params:

    • text=[string]
    • n=[float] [the service will return the n most similar entities] [Default = 10]
    • ontology=[ontologyID] [see ontology IDs] [Default = hfo]
    • algorithm=[algorithmID] [see algorithmIDs] [Default = NormalizedLevenshtein]
    • floor=[float] [returns similarities >= floor ]
    • ceiling=[float] [returns similarities <= ceiling ]
  • Success Response:

    • Code: 200
    • Content: JSON array
  • Error Responses:

    • Code: 415 Unsupported Media Type
      Troubleshooting: Check parameters

    • Code: 404 NOT FOUND
      Troubleshooting: Ontology ID not found

  • Sample Call:

    • Code:
      $.ajax({
        url: "http://ontomatch.lis.ic.unicamp.br/api/rest/resources",
        dataType: "json",
        type : "POST",
        data: { text: "chest pain", n: 5, ontology:"hfo" },
        success : function(r) {
          console.log(r);
        }
      });
    • Return:
    [
    {"uri":"http://bmi.utah.edu/ontologies/hfontology/C0008031","label":"Chest Pain","similarity":1.0},
    {"uri":"http://bmi.utah.edu/ontologies/hfontology/C0030193","label":"Pain","similarity":0.7071067690849304},
    {"uri":"http://bmi.utah.edu/ontologies/hfontology/C0000737","label":"Abdominal Pain","similarity":0.5}
    ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published