Documentation ¶
Index ¶
- Variables
- type APIError
- type AnnotateOptions
- type AnnotationResult
- type BaseOptions
- type Class
- type ClassesPaginated
- type Client
- func (c *Client) Annotate(opts AnnotateOptions) ([]*AnnotationResult, error)
- func (c *Client) AnnotateRead(w io.Writer, opts AnnotateOptions) (int64, error)
- func (c *Client) Class(ontology, class string) (*Class, error)
- func (c *Client) Recommend(opts RecommendOptions) ([]*RecommendResult, error)
- func (c *Client) RecommendRead(w io.Writer, opts RecommendOptions) (int64, error)
- func (c *Client) Search(opts SearchOptions) (*SearchResult, error)
- func (c *Client) SearchRead(w io.Writer, opts SearchOptions) (int64, error)
- func (c *Client) Send(path string, params interface{}) (io.ReadCloser, error)
- type Mapping
- type Ontology
- type RecommendOptions
- type RecommendResult
- type SearchOptions
- type SearchResult
- type Tree
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultTimeout = 10 * time.Second BaseURL = "https://data.bioontology.org" )
Functions ¶
This section is empty.
Types ¶
type AnnotateOptions ¶
type AnnotateOptions struct { BaseOptions Text string `url:"text"` Ontologies []string `url:"ontologies,omitempty"` SemanticTypes []string `url:"semantic_types,omitempty"` ExpandSemanticTypesHierarchy bool `url:"expand_semantic_types_hierarchy"` ExpandClassHierarchy bool `url:"expand_class_hierarchy"` ClassHierarchyMaxLevel uint `url:"class_hierarchy_max"` ExpandMappings bool `url:"expand_mappings"` StopWords []string `url:"stop_words,omitempty"` MinimumMatchLength uint `url:"minimum_match_length"` ExcludeNumbers bool `url:"exclude_numbers"` WholeWordOnly bool `url:"whole_word_only"` ExcludeSynonyms bool `url:"exclude_synonyms"` LongestOnly bool `url:"longest_only"` }
func DefaultAnnotateOptions ¶
func DefaultAnnotateOptions() *AnnotateOptions
type AnnotationResult ¶
type AnnotationResult struct { AnnotatedClass struct { ID string `json:"@id"` Type string `json:"@type"` Links struct { Self string `json:"self"` Ontology string `json:"ontology"` Children string `json:"children"` Parents string `json:"parents"` Descendants string `json:"descendants"` Ancestors string `json:"ancestors"` Instances string `json:"instances"` Tree string `json:"tree"` Notes string `json:"notes"` Mappings string `json:"mappings"` UI string `json:"ui"` Context struct { Self string `json:"self"` Ontology string `json:"ontology"` Children string `json:"children"` Parents string `json:"parents"` Descendants string `json:"descendants"` Ancestors string `json:"ancestors"` Instances string `json:"instances"` Tree string `json:"tree"` Notes string `json:"notes"` Mappings string `json:"mappings"` UI string `json:"ui"` } `json:"@context"` } `json:"links"` Context struct { Vocab string `json:"@vocab"` } `json:"@context"` } `json:"annotatedClass"` Hierarchy []interface{} `json:"hierarchy"` Annotations []struct { From int `json:"from"` To int `json:"to"` MatchType string `json:"matchType"` Text string `json:"text"` } `json:"annotations"` Mappings []interface{} `json:"mappings"` }
type BaseOptions ¶
type BaseOptions struct { // Format string `url:"format"` Include string `url:"include,omitempty"` Pagesize int `url:"pagesize,omitempty"` Page int `url:"page,omitempty"` IncludeViews bool `url:"include_views"` DisplayContext bool `url:"display_context"` DisplayLinks bool `url:"display_links"` }
func DefaultBaseOptions ¶
func DefaultBaseOptions() *BaseOptions
type Class ¶
type Class struct { PrefLabel string `json:"prefLabel"` Synonym []string `json:"synonym"` Definition []string `json:"definition"` Cui []interface{} `json:"cui"` SemanticType []interface{} `json:"semanticType"` Obsolete interface{} `json:"obsolete"` ID string `json:"@id"` Type string `json:"@type"` Links struct { Self string `json:"self"` Ontology string `json:"ontology"` Children string `json:"children"` Parents string `json:"parents"` Descendants string `json:"descendants"` Ancestors string `json:"ancestors"` Instances string `json:"instances"` Tree string `json:"tree"` Notes string `json:"notes"` Mappings string `json:"mappings"` UI string `json:"ui"` Context struct { Self string `json:"self"` Ontology string `json:"ontology"` Children string `json:"children"` Parents string `json:"parents"` Descendants string `json:"descendants"` Ancestors string `json:"ancestors"` Instances string `json:"instances"` Tree string `json:"tree"` Notes string `json:"notes"` Mappings string `json:"mappings"` UI string `json:"ui"` } `json:"@context"` } `json:"links"` Context struct { Vocab string `json:"@vocab"` PrefLabel string `json:"prefLabel"` Synonym string `json:"synonym"` Definition string `json:"definition"` Obsolete string `json:"obsolete"` SemanticType string `json:"semanticType"` Cui string `json:"cui"` } `json:"@context"` }
type ClassesPaginated ¶
type ClassesPaginated struct { Page int `json:"page"` PageCount int `json:"pageCount"` PrevPage interface{} `json:"prevPage"` NextPage interface{} `json:"nextPage"` Links struct { NextPage interface{} `json:"nextPage"` PrevPage interface{} `json:"prevPage"` } `json:"links"` Collection Class `json:"collection"` }
type Client ¶
func (*Client) Annotate ¶
func (c *Client) Annotate(opts AnnotateOptions) ([]*AnnotationResult, error)
func (*Client) AnnotateRead ¶
func (*Client) Recommend ¶
func (c *Client) Recommend(opts RecommendOptions) ([]*RecommendResult, error)
func (*Client) RecommendRead ¶
func (*Client) Search ¶
func (c *Client) Search(opts SearchOptions) (*SearchResult, error)
func (*Client) SearchRead ¶
type Ontology ¶
type Ontology struct { AdministeredBy []string `json:"administeredBy"` Acronym string `json:"acronym"` Name string `json:"name"` SummaryOnly bool `json:"summaryOnly"` OntologyType string `json:"ontologyType"` ID string `json:"@id"` Type string `json:"@type"` Links struct { Submissions string `json:"submissions"` Properties string `json:"properties"` Classes string `json:"classes"` SingleClass string `json:"single_class"` Roots string `json:"roots"` Instances string `json:"instances"` Metrics string `json:"metrics"` Reviews string `json:"reviews"` Notes string `json:"notes"` Groups string `json:"groups"` Categories string `json:"categories"` LatestSubmission string `json:"latest_submission"` Projects string `json:"projects"` Download string `json:"download"` Views string `json:"views"` Analytics string `json:"analytics"` UI string `json:"ui"` Context struct { Submissions string `json:"submissions"` Properties string `json:"properties"` Classes string `json:"classes"` SingleClass string `json:"single_class"` Roots string `json:"roots"` Instances string `json:"instances"` Metrics string `json:"metrics"` Reviews string `json:"reviews"` Notes string `json:"notes"` Groups string `json:"groups"` Categories string `json:"categories"` LatestSubmission string `json:"latest_submission"` Projects string `json:"projects"` Download string `json:"download"` Views string `json:"views"` Analytics string `json:"analytics"` UI string `json:"ui"` } `json:"@context"` } `json:"links"` Context struct { Vocab string `json:"@vocab"` Acronym string `json:"acronym"` Name string `json:"name"` AdministeredBy struct { ID string `json:"@id"` Type string `json:"@type"` } `json:"administeredBy"` OntologyType struct { ID string `json:"@id"` Type string `json:"@type"` } `json:"ontologyType"` } `json:"@context"` }
type RecommendOptions ¶
type RecommendOptions struct { BaseOptions Terms []string `url:"input"` Ontologies []string `url:"ontologies,omitempty"` InputType int `url:"input_type,omitempty"` OutputType int `url:"output_type,omitempty"` MaxElementsSet int `url:"max_elements_set,omitempty"` CoverageWeight float32 `url:"wc,omitempty"` SpecializationWeight float32 `url:"ws,omitempty"` AcceptanceWeight float32 `url:"wa,omitempty"` DetailWeight float32 `url:"wd,omitempty"` }
func DefaultRecommendOptions ¶
func DefaultRecommendOptions() *RecommendOptions
type RecommendResult ¶
type RecommendResult struct { EvaluationScore float64 `json:"evaluationScore"` Ontologies []struct { Acronym string `json:"acronym"` ID string `json:"@id"` Type string `json:"@type"` } `json:"ontologies"` CoverageResult struct { Score int `json:"score"` NormalizedScore int `json:"normalizedScore"` NumberTermsCovered int `json:"numberTermsCovered"` NumberWordsCovered int `json:"numberWordsCovered"` Annotations []struct { From int `json:"from"` To int `json:"to"` MatchType string `json:"matchType"` Text string `json:"text"` AnnotatedClass struct { ID string `json:"@id"` Type string `json:"@type"` } `json:"annotatedClass"` HierarchySize int `json:"hierarchySize"` } `json:"annotations"` } `json:"coverageResult"` SpecializationResult struct { Score float64 `json:"score"` NormalizedScore int `json:"normalizedScore"` } `json:"specializationResult"` AcceptanceResult struct { NormalizedScore float64 `json:"normalizedScore"` BioportalScore float64 `json:"bioportalScore"` UmlsScore int `json:"umlsScore"` } `json:"acceptanceResult"` DetailResult struct { NormalizedScore float64 `json:"normalizedScore"` DefinitionsScore int `json:"definitionsScore"` SynonymsScore int `json:"synonymsScore"` PropertiesScore float64 `json:"propertiesScore"` } `json:"detailResult"` }
type SearchOptions ¶
type SearchOptions struct { BaseOptions Query string `url:"q"` Ontologies []string `url:"ontologies,omitempty"` RequireExactMatch bool `url:"require_exact_match"` Suggest bool `url:"suggest"` RequireDefinitions bool `url:"require_definitions"` AlsoSearchProperties bool `url:"also_search_properties"` AlsoSearchViews bool `url:"also_search_views"` AlsoSearchObsolete bool `url:"also_search_obsolete"` CUI []string `url:"cui,omitempty"` SemanticTypes []string `url:"semantic_types,omitempty"` }
func DefaultSearchOptions ¶
func DefaultSearchOptions() *SearchOptions
type SearchResult ¶
type SearchResult struct { Page int `json:"page"` PageCount int `json:"pageCount"` PrevPage interface{} `json:"prevPage"` NextPage int `json:"nextPage"` Links struct { NextPage string `json:"nextPage"` PrevPage interface{} `json:"prevPage"` } `json:"links"` Collection []struct { PrefLabel string `json:"prefLabel"` Synonym []string `json:"synonym,omitempty"` Cui []string `json:"cui,omitempty"` SemanticType []string `json:"semanticType,omitempty"` Obsolete bool `json:"obsolete"` MatchType string `json:"matchType"` OntologyType string `json:"ontologyType"` Provisional bool `json:"provisional"` ID string `json:"@id"` Type string `json:"@type"` Links struct { Self string `json:"self"` Ontology string `json:"ontology"` Children string `json:"children"` Parents string `json:"parents"` Descendants string `json:"descendants"` Ancestors string `json:"ancestors"` Instances string `json:"instances"` Tree string `json:"tree"` Notes string `json:"notes"` Mappings string `json:"mappings"` UI string `json:"ui"` Context struct { Self string `json:"self"` Ontology string `json:"ontology"` Children string `json:"children"` Parents string `json:"parents"` Descendants string `json:"descendants"` Ancestors string `json:"ancestors"` Instances string `json:"instances"` Tree string `json:"tree"` Notes string `json:"notes"` Mappings string `json:"mappings"` UI string `json:"ui"` } `json:"@context"` } `json:"links"` Context struct { Vocab string `json:"@vocab"` PrefLabel string `json:"prefLabel"` Synonym string `json:"synonym"` Obsolete string `json:"obsolete"` SemanticType string `json:"semanticType"` Cui string `json:"cui"` } `json:"@context"` Definition []string `json:"definition,omitempty"` } `json:"collection"` }
type Tree ¶
type Tree struct { PrefLabel string `json:"prefLabel"` HasChildren bool `json:"hasChildren"` Children []Tree `json:"children"` Obsolete bool `json:"obsolete"` ID string `json:"@id"` Type string `json:"@type"` Links struct { Self string `json:"self"` Ontology string `json:"ontology"` Children string `json:"children"` Parents string `json:"parents"` Descendants string `json:"descendants"` Ancestors string `json:"ancestors"` Instances string `json:"instances"` Tree string `json:"tree"` Notes string `json:"notes"` Mappings string `json:"mappings"` UI string `json:"ui"` Context struct { Self string `json:"self"` Ontology string `json:"ontology"` Children string `json:"children"` Parents string `json:"parents"` Descendants string `json:"descendants"` Ancestors string `json:"ancestors"` Instances string `json:"instances"` Tree string `json:"tree"` Notes string `json:"notes"` Mappings string `json:"mappings"` UI string `json:"ui"` } `json:"@context"` } `json:"links"` Context struct { Vocab string `json:"@vocab"` PrefLabel string `json:"prefLabel"` Obsolete string `json:"obsolete"` } `json:"@context"` }
Click to show internal directories.
Click to hide internal directories.