8000 new API action for providing KonText defaults (namely "viewattrs" for now) · Issue #33 · czcorpus/cnc-masm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
new API action for providing KonText defaults (namely "viewattrs" for now) #33
Open
@tomachalek

Description

@tomachalek
PUT /corpora/{corpusId}/kontextDefaults

PUT /corpora/{subdir}/{corpusId}/kontextDefaults

The action should infer default view properties for a corpus, store them to the database.

A response should contain values stored to database and the format should be a JSON with the schema matching actual user-corpus options stored in db or like in case of default options stored for corpus in db (the discussed API function will actually serve as a source of those defaults).

For now, we are interested only in attrs (i.e. positional attributes shown by default in concordances.

{
  "viewattrs": {
    "attrs": "word,lemma,tag"
  } 
}

The algorithm of selecting the attributes should be as follows:

  • look for entries in kontext_simple_query_default_attrs
    • in case there are some, use those
    • else
      • select word
      • look for lemma - if exists, then select
  • look for defined tagsets (tables tagset and corpus_tagset) and use respective attributes

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalSomething not required explicitly but probably useful

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0