Difference between revisions of "App/API/Ontology/uri markup"

From mx Help Wiki
Jump to: navigation, search
m
m (Description)
Line 4: Line 4:
  
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''uri_markup'''/<text>
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''uri_markup'''/<text>
 +
 +
Returns a block of text with matched labels hyperlinked.  Matching is based on exact comparisons of all labels in the ontology against the text.  Longest matches hit first and prevent smaller, overlapping matches from hitting. The URI links are the OBO standard.  ''This method is preferred vs. the similar "glossary_markup".''
  
 
== Response (JSON) ==
 
== Response (JSON) ==

Revision as of 15:07, 4 March 2011

Back to ontology API home

Description

http://base_url/api/ontology/uri_markup/<text>

Returns a block of text with matched labels hyperlinked. Matching is based on exact comparisons of all labels in the ontology against the text. Longest matches hit first and prevent smaller, overlapping matches from hitting. The URI links are the OBO standard. This method is preferred vs. the similar "glossary_markup".

Response (JSON)

 text: text
 markup: html

Example

Request:

http://api.hymao.org/api/ontology/uri_markup/Head%20longer%20than%20metasoma

Response:

 {
  "text":"Head longer than metasoma",
  "markup":"\u003Ca href=\"http://purl.obolibrary.org/obo/HAO_0000397\"\u003Ehead\u003C/a\u003E longer than \u003Ca href=\"http://purl.obolibrary.org/obo/HAO_0000626\"\u003Emetasoma\u003C/a\u003E"
 }
Personal tools