+
Skip to content

turn local:get-corpus-metrics into callable function #345

@ingoboerner

Description

@ingoboerner

If I want to get the metrics of a single corpus as included in the response of the v1/corpora endpoint when setting the parameter include to "metrics"I have to get all corpora and then filter for the corpus I am interested in and retrieve the metrics from there. The function that generates the metrics for a corpus is a local function (local:get-corpus-metrics($name)) that – because it is in the local namespace in the api.xqm module can't be called from another module. Because it generates metrics it could become metrics:get-corpus-metrics or moved to the util module dutil:get-corpus-metrics. Anything would be fine as long as it is callable.

This is the function: https://github.com/dracor-org/dracor-api/blob/main/modules/api.xqm#L199-L225

(There is a function dutil:get-corpus-meta-data but this returns metadata on the individual plays in a corpus, not the corpus itself.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载