Difference between revisions of "App/API/Ontology/analyze"

From mx Help Wiki
Jump to: navigation, search
m
m (Description)
 
(9 intermediate revisions by one user not shown)
Line 4: Line 4:
  
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''analyze'''/<text>
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''analyze'''/<text>
 +
 +
Performs an exact match of the labels in the ontology against the text provided, and returns a result.  ''The "statistics" hash is a space holder for future functionality.''
  
 
== Response (JSON) ==
 
== Response (JSON) ==
  
   ''CLASS_ID'':
+
   statistics:{}
   [
+
  text: ''bracketed text'',
     {
+
  labels:  
    image: ''URI''  
+
   {
    svg: ''svg''
+
     ''label'':
    }
+
        {
 +
        ''CLASS_ID'' => ''definition''  
 +
        ...
 +
        }
 
     ...   
 
     ...   
   ]
+
   }
 
+
  
 
== Example ==
 
== Example ==
Line 21: Line 25:
 
Request:
 
Request:
  
'''http://api.hymao.org/api/ontology/analyze/HAO_0000397'''
+
'''http://api.hymao.org/api/ontology/analyze/Head%20longer%20that%20metasoma'''
  
 
Response:
 
Response:
Line 27: Line 31:
 
  {
 
  {
 
   "statistics":{},
 
   "statistics":{},
   "text":"[head] longer than [metasoma]",
+
   "text":"[head] longer that [metasoma]",
   "matches":
+
   "labels":  
  {
+
  {
    "head":{"HAO_0000397":"Deans, A. R. 2009. HAO curator.."},
+
    "head": {"<nowiki>h</nowiki>ttp://purl.obolibrary.org/obo/HAO_0000397":"Deans, A. R. 2009. HAO curator.."},
    "metasoma":{"HAO_0000626":"Miko, I. 2009. Curator. Hymenoptera Anatomy Ontology."}
+
    "metasoma":{"<nowiki>h</nowiki>ttp://purl.obolibrary.org/obo/HAO_0000626":"Miko, I. 2009. Curator. Hymenoptera Anatomy Ontology."}
  }
+
  }
 
  }
 
  }

Latest revision as of 23:35, 4 March 2011

Back to ontology API home

[edit] Description

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

Performs an exact match of the labels in the ontology against the text provided, and returns a result. The "statistics" hash is a space holder for future functionality.

[edit] Response (JSON)

 statistics:{}
 text: bracketed text,
 labels: 
  {
   label: 
       {
        CLASS_ID => definition 
        ...
       }
   ...   
  }

[edit] Example

Request:

http://api.hymao.org/api/ontology/analyze/Head%20longer%20that%20metasoma

Response:

{
 "statistics":{},
 "text":"[head] longer that [metasoma]",
 "labels": 
  {
    "head": {"http://purl.obolibrary.org/obo/HAO_0000397":"Deans, A. R. 2009. HAO curator.."},
    "metasoma":{"http://purl.obolibrary.org/obo/HAO_0000626":"Miko, I. 2009. Curator. Hymenoptera Anatomy Ontology."}
  }
}
Personal tools