Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attribute "reversedOrder" #97

Open
margaretha opened this issue Oct 4, 2021 · 1 comment
Open

Add attribute "reversedOrder" #97

margaretha opened this issue Oct 4, 2021 · 1 comment

Comments

@margaretha
Copy link
Contributor

margaretha commented Oct 4, 2021

Vatileaks %-w1 neue means Vatileaks should not be preceded by neue.

Since a not preceded by b != b not followed by a, it is not enough to simply inverse the operands.

An new attribute "reverseOrder" is needed to indicate that the exclusion have to be inverted in Krill. In other words, the query should return the 2nd operand that is not preceded by the 1st operand, instead of the 1st operand that is not followed by the 2nd operand.

The serialization of Vatileaks %-w1 neue would be as follows.

    "@type": "koral:group",
    "distances": [
      {
        "@type": "cosmas:distance",
        "boundary": {
          "@type": "koral:boundary",
          "max": 1,
          "min": 0
        },
        "reverseOrder":true,
        "exclude": true,
        "key": "w"
      }
    ],
    "inOrder": true,
    "operands": [
      {
        "@type": "koral:group",
        "classOut": 129,
        "operands": [
          {
            "@type": "koral:token",
            "wrap": {
              "@type": "koral:term",
              "foundry": "opennlp",
              "key": "neue",
              "layer": "orth",
              "match": "match:eq"
            }
          }
        ],
        "operation": "operation:class"
      },
      {
        "@type": "koral:group",
        "classOut": 129,
        "operands": [
           {
            "@type": "koral:token",
            "wrap": {
              "@type": "koral:term",
              "foundry": "opennlp",
              "key": "Vatileaks",
              "layer": "orth",
              "match": "match:eq"              
            }
          }          
        ],
        "operation": "operation:class"
      }
    ],
    "operation": "operation:sequence"
  }
@Akron
Copy link
Member

Akron commented Oct 4, 2021

While not defined for distances, there is the concept of frames for operation:exclusion, we may want to adopt here instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants