598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
|
# File 'lib/MARQ/annotations.rb', line 598
def self.OBA(text)
res = Net::HTTP.post_form(URI.parse('http://rest.bioontology.org/obs_hibernate/annotator'),
{
'longestOnly'=> true,
'wholeWordOnly'=> true,
'withDefaultStopWords' => true,
'scored' => true,
'ontologiesToExpand' => 'null',
'ontologiesToKeepInResult' => "",
'levelMax' => 0,
'levelMin' => 0,
'textToAnnotate' => text.gsub(/\s/,' '),
'semanticTypes' => SEMANTIC_TYPES,
'mappingTypes' => 'null',
'format' => 'tabDelimited'
})
res.body.collect{|l| l.split(/\t/)}.select{|v| v[0].to_i > 0}.collect{|v| v[2].sub(/\W*NOS/,'').downcase}.select{|w| w !~ /^\d+$/}.sort.uniq
end
|