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

Allow non-breaking spaces in symbols? #99

Closed
goodmami opened this issue Mar 19, 2021 · 1 comment
Closed

Allow non-breaking spaces in symbols? #99

goodmami opened this issue Mar 19, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@goodmami
Copy link
Owner

Consider this:

>>> penman.decode('(a/a :name (b / 1\u00a02\u00a03))')
Traceback (most recent call last):
[...]
penman.exceptions.DecodeError: 
  line 1
    (a/a :name (b / 1 2 3))
                      ^
DecodeError: Expected: ROLE

This example is adapted from jcyk/AMR-gs#15.

Should non-breaking spaces not be broken during parsing? If so, what other spaces should be allowed, or rather, which should be disallowed in symbols?

@goodmami
Copy link
Owner Author

There are many breaking spaces (see https://en.wikipedia.org/wiki/Whitespace_character) and only a handful of non-breaking spaces. However, in a data format like PENMAN it seems reasonable to only allow standard ASCII spaces as breaking, primarily space, tab, line feed, and carriage return, but maybe also form feed and vertical tab. All others, including non-breaking space, ideographic space, zero-width word joiner, etc., are then treated as regular characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant