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 wrap for koral:distance and cosmas:distance #95

Open
margaretha opened this issue Sep 13, 2021 · 3 comments
Open

Add wrap for koral:distance and cosmas:distance #95

margaretha opened this issue Sep 13, 2021 · 3 comments

Comments

@margaretha
Copy link
Contributor

For coherence, wrap should be added in koral:distance and cosmas:distance for specifying the scope of the distance, e.g. sentence.

{
  "@type" : "koral:distance",
  "wrap" : {
    "@type" : "koral:term",
    "foundry" : "base",
    "layer" : "s",
    "key" : "s"
  }
  "boundary" : {...}
}

For token distance such as "w" in C2, the key attribute should be replaced with "koral:token" as follows:

{
  "@type" : "cosmas:distance",
  "wrap" : {
    "@type" : "koral:token"
  }
  "boundary" : {...}
}
@Akron
Copy link
Member

Akron commented Sep 13, 2021

Maybe it's more appropriate to have an "operand" key that wraps a span or a token, that then wraps a term (as usual)?

@margaretha
Copy link
Contributor Author

Yes sure, so for clarification, the serialization should be as follows.

Sentence

{
    "@type": "koral:distance",
    "key": {
        "@type": "koral:span",
        "wrap": {
            "@type": "koral:term",
            "foundry": "base",
            "layer": "s",
            "key": "s"
        }
    },
    "boundary": {...}
}

Term

{
    "@type": "cosmas:distance",
    "key": {
        "@type": "koral:token"
    },
    "boundary": {...}
}

@Akron
Copy link
Member

Akron commented Oct 7, 2021

I literally meant operand, because operand and wrap are the keys to follow for the rewrite, right?
And regarding distances: I guess we agree that exclusion is different to "distance", so we may want to think about renaming distances as a key to constraints and introduce koral:exclusion and cosmas:exclusion?

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

No branches or pull requests

2 participants