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

Request for Chinese characters and the like in Annotation strings #288

Open
linforestzhang opened this issue Jan 6, 2024 · 0 comments
Open

Comments

@linforestzhang
Copy link

In the file unitString.js the ucum-lhc project:
// A regular expression for validating annotation strings.
static VALID_ANNOTATION_REGEX = /^{[!-z|~]*}$/;

It reminds me of the following proposal:
Annotation strings should be allowed to contain Chinese characters and like, such as:
{片} ... for {tablet}

Proposed regular expression:
// A regular expression for validating annotation strings.
static VALID_ANNOTATION_REGEX = /^{[!-z|~\u4e00-\u9fa5]*}$/;

Validated examples:
{片} ... for {tablet}
{肌酐} for {creat} [ Usage: nmol/mmol{肌酐} ... for nmol/mmol{creat} ]
{蛋白质} for {prot} [ Usage: nmol/mg{蛋白质} ... nmol/mg{prot} ]
...

The proposal above was initially submitted to the ucum-lhc project. See here:
LHNCBC/ucum-lhc#49

Maybe this should be submitted as a proposal for the UCUM Specification per se.

Tkanks

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

No branches or pull requests

1 participant