searchrefiner

package module
v0.0.0-...-97a9abb Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 36 Imported by: 2

README

searchrefiner

Systematic Review Query Visualisation and Understanding Interface

searchrefiner is an interactive interface for visualising and understanding queries used to retrieve medical literature for systematic reviews.

It is currently in development, however please find a demo link on the project home page.

Building

searchrefiner is built as a Go application. It needs to be installed slightly differently than most Go applications:

  1. First, clone this repository.
  2. Configure the application. The application can then be configured via a config.json (a sample is provided). In this minimal file, everything up to and including Entrez needs to be configured. The other options below this key do not need to be configured to run searchrefiner in a minimal setting and they should not be changed unless you know what you are doing. Many of the tools require specific attributes in the configuration. Please get in contact if you are setting up your own instance of searchrefiner to determine how these advances configuration items should be set.
  3. Ensure that g++-5 and cmake are installed on your system.
  4. Run make run. This will download all of the necessary dependencies and run the application.

At the moment, you still need to make an account to use searchrefiner, even locally. The account that you make is a local account and is not the same as the one you might create on another instance of searchrefiner.

Docker build

searchrefiner can also be run from a preprepared Dockerfile:

  1. Setup the docker image with docker build -t ielab-searchrefiner .
  2. Create a config.json file (see above)
  3. Run the server with docker run --net=host ielab-searchrefiner
  4. Open the site at http://localhost:4853

Documentation

Documentation for authentication, administration, and usage can be found at the project homepage: ielab.io/searchrefiner

Citing

Please cite any references to the searchrefiner project as:

@inproceedings{scells2018searchrefiner,
    Author = {Scells, Harrisen and Zuccon, Guido},
    Booktitle = {Proceedings of the 27th ACM International Conference on Information and Knowledge Management},
    Organization = {ACM},
    Title = {searchrefiner: A Query Visualisation and Understanding Tool for Systematic Reviews},
    Year = {2018}
}

Please cite any references to any of the automation tools embedded in searchrefiner as:

@inproceedings{li2020systematic,
	Author = {Li, Hang and Scells, Harrisen and Zuccon, Guido},
	Booktitle = {Proceedings of the 43rd Internationa SIGIR Conference on Research and Development in Information Retrieval},
	Date-Added = {2020-06-09 13:11:19 +1000},
	Date-Modified = {2020-07-03 15:45:14 +1000},
	Month = {July},
	Pages = {25--30},
	Title = {Systematic Review Automation Tools for End-to-End Query Formulation},
	Year = {2020}
}

Documentation

Index

Constants

View Source
const (
	PluginAdmin = iota
	PluginUser
	PluginPublic
)
View Source
const PluginStoragePath = "plugin_storage"

Variables

View Source
var (
	QueryCacher         = combinator.NewFileQueryCache("file_cache")
	PluginTemplates     []string
	Components          = []string{"components/sidebar.tmpl.html", "components/util.tmpl.html", "components/login.template.html", "components/announcement.tmpl.html"}
	ServerConfiguration = Server{}
)

Functions

func ApiCQR2Query

func ApiCQR2Query(c *gin.Context)

func ApiQuery2CQR

func ApiQuery2CQR(c *gin.Context)

func ApiTransform

func ApiTransform(c *gin.Context)

func HandleAccountCreate

func HandleAccountCreate(c *gin.Context)

func HandleAccountLogin

func HandleAccountLogin(c *gin.Context)

func HandleTransform

func HandleTransform(c *gin.Context)

func RenderPlugin

func RenderPlugin(tmpl template.Template, data interface{}) render.HTML

RenderPlugin returns a gin-compatible HTML renderer for plugins.

func TemplatePlugin

func TemplatePlugin(p string) template.Template

TemplatePlugin is the template method which will include searchrefiner components.

func TmplDict

func TmplDict(values ...interface{}) (map[string]interface{}, error)

Types

type Config

type Config struct {
	Host                  string
	AdminEmail            string
	Admins                []string
	Entrez                EntrezConfig
	Resources             Resources // TODO: This should be merged into the Services struct.
	Mode                  string
	EnableAll             bool
	Services              Services
	ExchangeServerAddress string
	OtherServiceAddresses OtherServiceAddresses
}

type EntrezConfig

type EntrezConfig struct {
	Email  string
	APIKey string
}

type ErrorPage

type ErrorPage struct {
	Error    string
	BackLink string
}

type InternalPluginDetails

type InternalPluginDetails struct {
	URL string
	PluginDetails
}

InternalPluginDetails contains details about a plugin which are vital in rendering the plugin page.

type OtherServiceAddresses

type OtherServiceAddresses struct {
	SRA string
}

type Plugin

type Plugin interface {
	Startup(Server)
	Serve(Server, *gin.Context)
	PermissionType() PluginPermission
	Details() PluginDetails
}

Plugin is the interface that must be implemented in order to register an external tool. See more: http://ielab.io/searchrefiner/plugins/

type PluginDetails

type PluginDetails struct {
	Title       string
	Description string
	Author      string
	Version     string
	ProjectURL  string

	AcceptsQueryPosts bool
}

PluginDetails are details about a plugin which is shown in the plugins page of searchrefiner.

type PluginPermission

type PluginPermission int

type PluginStorage

type PluginStorage struct {
	// contains filtered or unexported fields
}

func OpenPluginStorage

func OpenPluginStorage(plugin string) (*PluginStorage, error)

func (*PluginStorage) Close

func (p *PluginStorage) Close() error

func (*PluginStorage) CreateBucket

func (p *PluginStorage) CreateBucket(bucket string) error

func (*PluginStorage) DeleteKey

func (p *PluginStorage) DeleteKey(bucket, key string) error

func (*PluginStorage) GetBuckets

func (p *PluginStorage) GetBuckets() ([]string, error)

func (*PluginStorage) GetValue

func (p *PluginStorage) GetValue(bucket, key string) (string, error)

func (*PluginStorage) GetValues

func (p *PluginStorage) GetValues(bucket string) (map[string]string, error)

func (*PluginStorage) PutValue

func (p *PluginStorage) PutValue(bucket, key, value string) error

func (*PluginStorage) ToCSV

func (p *PluginStorage) ToCSV(bucket string) (string, error)

type Query

type Query struct {
	Time        time.Time `csv:"time"`
	QueryString string    `csv:"query"`
	Language    string    `csv:"language"`
	NumRet      int64     `csv:"num_ret"`
	NumRelRet   int64     `csv:"num_rel_ret"`
	Relevant    []string  `csv:"relevant"`

	Plugins     []InternalPluginDetails
	PluginTitle string
}

type Resources

type Resources struct {
	Cui2VecEmbeddings string
	Cui2VecMappings   string
	Quiche            string
	QuickRank         string
}

type Server

type Server struct {
	Perm     *permissionbolt.Permissions
	Queries  map[string][]Query
	Settings map[string]Settings
	Config   Config
	Plugins  []InternalPluginDetails
	Storage  map[string]*PluginStorage

	Entrez        stats.EntrezStatisticsSource
	CUIEmbeddings *cui2vec.PrecomputedEmbeddings
	QuicheCache   quickumlsrest.Cache
	CUIMapping    cui2vec.Mapping
	MetaMapClient metawrap.HTTPClient
}

func (Server) ApiAccountCreate

func (s Server) ApiAccountCreate(c *gin.Context)

func (Server) ApiAccountLogin

func (s Server) ApiAccountLogin(c *gin.Context)

func (Server) ApiAccountLogout

func (s Server) ApiAccountLogout(c *gin.Context)

func (Server) ApiAccountUsername

func (s Server) ApiAccountUsername(c *gin.Context)

func (Server) ApiAdminCSVStorage

func (s Server) ApiAdminCSVStorage(c *gin.Context)

func (Server) ApiAdminConfirm

func (s Server) ApiAdminConfirm(c *gin.Context)

func (Server) ApiAdminDeleteStorage

func (s Server) ApiAdminDeleteStorage(c *gin.Context)

func (Server) ApiAdminUpdateStorage

func (s Server) ApiAdminUpdateStorage(c *gin.Context)

func (Server) ApiGetQuerySeedFromExchangeServer

func (s Server) ApiGetQuerySeedFromExchangeServer(token string) (toolexchange.Item, error)

func (Server) ApiHistoryAdd

func (s Server) ApiHistoryAdd(c *gin.Context)

func (Server) ApiHistoryDelete

func (s Server) ApiHistoryDelete(c *gin.Context)

func (Server) ApiHistoryGet

func (s Server) ApiHistoryGet(c *gin.Context)

func (Server) ApiKeywordSuggestor

func (s Server) ApiKeywordSuggestor(c *gin.Context)

func (Server) ApiRequestTokenFromExchangeServer

func (s Server) ApiRequestTokenFromExchangeServer(query string) string

func (Server) ApiScroll

func (s Server) ApiScroll(c *gin.Context)

func (Server) ApiSettingsRelevantSet

func (s Server) ApiSettingsRelevantSet(c *gin.Context)

func (Server) HandleAdmin

func (s Server) HandleAdmin(c *gin.Context)

func (Server) HandleClear

func (s Server) HandleClear(c *gin.Context)

func (Server) HandleIndex

func (s Server) HandleIndex(c *gin.Context)

func (Server) HandlePluginWithControl

func (s Server) HandlePluginWithControl(c *gin.Context)

func (Server) HandlePlugins

func (s Server) HandlePlugins(c *gin.Context)

func (Server) HandleQuery

func (s Server) HandleQuery(c *gin.Context)

func (Server) HandleResults

func (s Server) HandleResults(c *gin.Context)

func (Server) HandleSettings

func (s Server) HandleSettings(c *gin.Context)

type Services

type Services struct {
	ElasticsearchPubMedURL      string
	ElasticsearchPubMedUsername string
	ElasticsearchPubMedPassword string
	ElasticsearchUMLSURL        string
	ElasticsearchUMLSUsername   string
	ElasticsearchUMLSPassword   string
	MetaMapURL                  string
	IndexName                   string
	DefaultPool                 int
	DefaultRetSize              int
	MaxRetSize                  int
	MaxPool                     int
	Merged                      bool
	Sources                     string
}

type Settings

type Settings struct {
	Relevant combinator.Documents
}

func GetSettings

func GetSettings(s Server, c *gin.Context) Settings

Directories

Path Synopsis
cmd
plugin

Jump to

Keyboard shortcuts

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