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 xml:space attribute for WN-LMF format #70

Closed
goodmami opened this issue May 7, 2023 · 5 comments
Closed

Add xml:space attribute for WN-LMF format #70

goodmami opened this issue May 7, 2023 · 5 comments

Comments

@goodmami
Copy link
Member

goodmami commented May 7, 2023

If a wordnet author wishes to ensure whitespace is preserved in things like examples, definitions, etc. in the WN-LMF format, they should use the xml:space attribute with the value "preserve", but this attribute must be declared in the schema if it is to be used in a valid document. See goodmami/wn#151 (comment) for further discussion.

I'm not advocating for or against this attribute's inclusion as I don't know if there's a real need, but just raising the issue for discussion since it came up in goodmami/wn#151.

@jmccrae
Copy link
Member

jmccrae commented May 8, 2023

I don't see why we can't add this, it seems a fairly easy modification that would not affect backwards compatibility. Should this be only on the <Example> and <Definition> tags or do we allow this at a document level?

Our assumption is that most examples/definitions do not preserve spacing, right?

@goodmami
Copy link
Member Author

goodmami commented May 8, 2023

Should this be only on the <Example> and <Definition> tags or do we allow this at a document level?

Also maybe <ILIDefinition>. I think any free-form text might be good, but I can't imagine it being useful on <Lemma>, <Form>, <Tag>, <Count>, etc.

Our assumption is that most examples/definitions do not preserve spacing, right?

I think so. I was wondering if things like poetry that need some whitespace formatting might end up in an example or definition, but that seems unlikely.

@jmccrae
Copy link
Member

jmccrae commented May 11, 2023

Does this PR fix the issue in a way that works for you @goodmami ?

@goodmami
Copy link
Member Author

@jmccrae thanks, partially, but I think I was being unclear:

I think any free-form text might be good, I can't imagine it being useful on <Lemma>, <Form>, <Tag>, <Count>, etc.

I should have said "something to consider" instead of "good". Also, I was trying to say that we don't need it for the elements listed above. Furthermore, <Lemma> and <Form> have their values in the writtenForm attribute and not between the element tags, so xml:space="preserve" wouldn't even do the intended thing for them. For the PR, let's just stick with <Definition>, <ILIDefinition>, and <Example> for now.

@jmccrae
Copy link
Member

jmccrae commented May 15, 2023

Okay, I have updated the PR. Thanks for the comment

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