quickumlsrest

package module
v0.0.0-...-2265f03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2019 License: MIT Imports: 5 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

quickumlsrest

package quickumlsrest provides an API client to the quickUMLS-rest service. The server can be found as a docker image from https://hub.docker.com/r/aehrc/quickumls-rest/.

Documentation: https://godoc.org/github.com/hscells/quickumlsrest

Example:

client := quickumlsrest.NewClient("http://localhost:5000")
candidates, err := client.Match("cancer")
if err != nil {
    panic(err)
}

for _, candidate := range candidates {
    fmt.Println(candidate.CUI)
}

Documentation

Overview

package quickumlsrest provides an API client to the quickUMLS-rest service. The server can be found as a docker image from https://hub.docker.com/r/aehrc/quickumls-rest/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache map[string][]Candidate

Cache is a mapping from a string (term) to a Pair in QuickUMLS.

type Candidate

type Candidate struct {
	Start      int      `json:"start"`
	End        int      `json:"end"`
	Preferred  int      `json:"preferred"`
	Similarity float64  `json:"similarity"`
	CUI        string   `json:"cui"`
	NGram      string   `json:"ngram"`
	Term       string   `json:"term"`
	SemTypes   []string `json:"semtypes"`
	SnomedCT   []string `json:"snomed_ct"`
}

Candidate defines the response from the quickUMLS-rest service.

type Candidates

type Candidates []Candidate

Candidates is a collection of candidates.

type Client

type Client struct {
	URL string
	*http.Client
}

Client is a client to the quickUMLS-rest service.

func NewClient

func NewClient(URL string) Client

NewClient creates a new client for the service.

func (Client) Match

func (c Client) Match(text string) (Candidates, error)

Match performs a match request and returns a slice of candidates.

type MatchRequest

type MatchRequest struct {
	Text string `json:"text"`
}

MatchRequest is the request body sent to the match endpoint of the quickUMLS-rest service.

Directories

Path Synopsis
cmd
quiche command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址