Difference between revisions of "App/API/Ontology/uri markup"
From mx Help Wiki
m (→Description) |
m (→Example) |
||
Line 22: | Line 22: | ||
{ | { | ||
"text":"Head longer than metasoma", | "text":"Head longer than metasoma", | ||
− | "markup":"\u003Ca href=\" | + | "markup":"\u003Ca href=\"<nowiki>h</nowiki>ttp://purl.obolibrary.org/obo/HAO_0000397\"\u003Ehead\u003C/a\u003E longer than \u003Ca href=\"<nowiki>h</nowiki>ttp://purl.obolibrary.org/obo/HAO_0000626\"\u003Emetasoma\u003C/a\u003E" |
} | } |
Revision as of 15:09, 4 March 2011
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" }