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

Should collocateMarker have a uniqueness constraints? #122

Closed
jmccrae opened this issue Apr 11, 2024 · 3 comments · Fixed by #115
Closed

Should collocateMarker have a uniqueness constraints? #122

jmccrae opened this issue Apr 11, 2024 · 3 comments · Fixed by #115
Assignees
Labels
module affects only modules

Comments

@jmccrae
Copy link
Contributor

jmccrae commented Apr 11, 2024

Currently collocateMarker has a uniqueness constraint on the lemma field. This means the following is invalid according to the spec

<entry id="frog">
  <headword>frog</headword>
  <example>
    <text><collocateMarker lemma="dog">dogs</collocateMarker> used to sit on <headwordMarker>frogs</headwordMarker> and now <collocateMarker lemma="dog">dogs</collocateMarker> sit on logs</text>
  </example>
</entry>

This is an error in my opinion.

Relates to the implementation of #97

@michmech michmech added the module affects only modules label Apr 16, 2024
@michmech michmech added this to the 2nd public review milestone Apr 16, 2024
@michmech michmech self-assigned this Apr 16, 2024
@michmech
Copy link
Contributor

True. The lemma shouldn't be part of a collocateMarker's uniqueness constraint.

I think it's logical that the collocateMarker's startIndex and endIndex should be its uniqueness constraint: it should be prohibited to have two collocate markers on the same thing (on the same substring).

I have made this change in the prose.

michmech added a commit to michmech/lexidma that referenced this issue Apr 16, 2024
@jmccrae
Copy link
Contributor Author

jmccrae commented Apr 17, 2024

If we make startIndex and endIndex the unique properties, we should also apply this to all other markers, right?

@michmech
Copy link
Contributor

You're right!

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

Successfully merging a pull request may close this issue.

2 participants