Skip to content

CQP: unnecesssary focus for spanNext #182

@margaretha

Description

@margaretha

The following query returns error code 100 with message "null"

<s><corenlp/c=NP> "der"

The serialization includes a focus with multiple classes 200, that looks suspicious and unnecessary. This needs further investigation.

"serialQuery": "spanStartsWith(<tokens:base/s:s />, focus(200: spanNext({200: <tokens:corenlp/c:NP />}, {200: SpanMultiTermQueryWrapper(tokens:/s:der/)})))",
"query": {
    "@type": "koral:group",
    "frames": [
      "frames:startsWith",
      "frames:matches"
    ],
    "operands": [
      {
        "@type": "koral:span",
        "rewrites": [
          {
            "@type": "koral:rewrite",
            "operation": "operation:injection",
            "scope": "foundry",
            "src": "Kustvakt"
          }
        ],
        "wrap": {
          "@type": "koral:term",
          "foundry": "base",
          "key": "s",
          "layer": "s"
        }
      },
      {
        "@type": "koral:reference",
        "classRef": [
          200
        ],
        "operands": [
          {
            "@type": "koral:group",
            "operands": [
              {
                "@type": "koral:group",
                "classOut": 200,
                "operands": [
                  {
                    "@type": "koral:span",
                    "wrap": {
                      "@type": "koral:term",
                      "foundry": "corenlp",
                      "key": "NP",
                      "layer": "c"
                    }
                  }
                ],
                "operation": "operation:class"
              },
              {
                "@type": "koral:group",
                "classOut": 200,
                "operands": [
                  {
                    "@type": "koral:token",
                    "wrap": {
                      "@type": "koral:term",
                      "foundry": "opennlp",
                      "key": "der",
                      "layer": "orth",
                      "match": "match:eq",
                      "rewrites": [
                        {
                          "@type": "koral:rewrite",
                          "operation": "operation:injection",
                          "scope": "foundry",
                          "src": "Kustvakt"
                        }
                      ],
                      "type": "type:regex"
                    }
                  }
                ],
                "operation": "operation:class"
              }
            ],
            "operation": "operation:sequence"
          }
        ],
        "operation": "operation:focus"
      }
    ],
    "operation": "operation:position"
  }

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