BC-VisCon XML-RPC Service

To invoke the RPC service use an XML-RPC client (library) using this URL and path: http://www.bc-viscon.net/xmlrpc/ .

The following methods are available:

  • Consensus.getConsensusMethods - () -> array(string, ...)

    Return the list of ids of the consensus finding methods available.

  • Consensus.getConsensusMethod - (string) -> struct{...}

    Return information on the consensus finding method with the given id

    Response struct:

    • provider(string): the major type of the method (i.e. MajorityVoting)
    • method(string): the subtype of the method, denoting its match criterion (i.e. strict)
    • name(string): the sounding name of the method, of the form 'provider - method'
    • id(string): the id of the method

  • Consensus.getConsensus - (int [,struct{...}]) -> struct{...}

    Return the consensus found by one or multiple consensus finding methods for the given PMID (int). The optional second argument is a struct of parameters of the following form:

    • servers(array(int, ...)): a list of ids of the annotation servers to be included in finding the consensus. The ids correspond to those used and reported by the BCMS
    • methods(array(string, ...)): a list of ids of the consensus methods to be included in the result.
    • weights(struct{...}): a struct of int/int key-value pairs. The value gives the weight to use for the annotations server (key) when using threshold based consensus methods
    • threshold(int): the threshold (percentage of all weights of the included servers) to be used in threshold based consensus methods.

    Response struct:

    • The keys(string) of the response struct are the ids of included consensus methods.
    • The values are again structs of the following form:
      • mentions(struct{...}):
        • offset(int): the offset of of the annotation from the beginning of the section
        • section(string): the section of the text the annotation was made in
        • mention(string): the mention itself

  • Analysis.getSimilarities - (array(int, ...) [,struct{...}]) -> struct{...}

    Return the similarity comparisons of annotations and consensus found for the given list of one ore more PMIDS. The optional second argument is a struct of the same for as the second argument of Consensus.getConsensus. See there for details.

    Response struct:

    • The keys(string) of the response struct are a '/' separated contatenation of the ids of the annotation servers or consensus methods used in a single pairwise comparison. Please note that the numerical ids of the annotation servers, used by the BCMS, are prepended by the string 'AS' in all of the results returned by the BC-VisCon XML-RPC service.
    • The values are structs with the keys denoting the evaluation type ('strict', 'overlap', 'right_boundary_match', 'left_boundary_match', 'either_boundary_match') and struct values of the following form:
      • matches(array(int, ...)): an array of length 2 holding the matches the first annotation provider (server or consensus) in the key string had in the annotations of the second (matches[0]) and vice versa (matches[1])
      • mismatches(array(int, ...)): same as for matches, but holding the mismatches
      • percentage(float): the similarity percentage calculated from the matches and mismatches

  • Analysis.getFMeasures - (array(int, ...) [,struct{...}]) -> struct{...}

    Return the fmeasure comparisons of annotations and consensus found for the given list of one ore more PMIDS by using each annotation provider (server or consensus) as calculation base in turn. The optional second argument is a struct of the same for as the second argument of Consensus.getConsensus. See there for details.

    Response struct:

    • The keys(string) (a) of the response struct are the ids of the annotation providers used as base for calculations.
    • The values are structs whose keys(string) (b) are the ids of annotation provider being compared and whose values are again structs of the following form:
      • <evaluation type>(struct{...}):
        • precision(float): the precision of (b) in (a)
        • recall(float): the recall of (b) in (a)
        • fmeasure(float): the f-measure of (b) in (a)

  • Analysis.getClusterings - (array(int, ...) [,struct{...}]) -> struct{...}

    Return a pairwise average linkage clusterings (for each match evaluation type) of the annotation providers selected by the optional second parameter (which is is a struct of the same for as the second argument of Consensus.getConsensus. See there for details.) based on their similarity comparison results on the given list of PMIDs.

    Response struct:

    • identifiers(array(string,...)): a list of the identifiers of the objects in the clustering. See below.
    • clustering(struct{...}):
      • <evaluation type>(array(array(float,...))): a clustring (for each evaluation type) is a list of joining steps of the objects to be clustered. Each such joining step is represented as an array whose values have specific meanings:
        • position 0: the number of one of the clusters joined in this step
        • position 1: the number of the other of the clusters joined in this step. Positive numbers correspond to start off objects whose id can be found in the aforementioned 'identifier' array at the index position given by their initial cluster number. Negative numbers refer to already made clusters.
        • position 2: the distance of the objects joined
        • position 3: the type of clustering (always has value '3')
        • position 4: the (negative) number of the cluster created in this join step.

  • add - (int, int) -> int

    Return the sum of two integers. Default test function for ensuring the connectivity to the XML-RPC server. Please do not call the real functions for connectivity testing purposes.