Skip to content

Support querying element children in Extended search #488

@MartinHammarstedt

Description

@MartinHammarstedt

Given the following corpus data, we want to be able to find all tokens that are children of <person> elements:

Han heter <person>Kalle</person>.

Currently, we have to rely on an awkward workaround: modifying the source data to include a dummy attribute:

Han heter <person dummy="-">Kalle</person>.

…together with the following Korp config:

- person_dummy:
    dataset:
      - '-'
    extended_component: singleValue

It would be better to have a solution that does not require modifying the corpus data.

In CQP, searching for children of an element is simple:

[person]

And to find tokens that are not children of an element:

[!person]

The main question is how this option should be presented to users in Extended search.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions