🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@macchiati
Copy link
Member

@macchiati macchiati commented Nov 24, 2023

Fixes #192

scx=deva has not been working; the results were essentially the same as sc=deva

As it turns out, the code really never accounted for multivalued properties. So when testing for values, an scx value like "Devanagari,Bengali" would be skipped.

The code change was simple; to change the code so that a UnicodeProperty could be marked as multivalued, and when comparing values there would be an extra level: splitting the property value if there was a ",", and otherwise testing like a single value. Now, this is done on each unique value rather than on each code point, so it doesn't affect performance much (especially as there are not many unique multivalue property values).

Ideally we should revamp UnicodeProperty to support multivalued properties more directly, but that would be a much bigger overhaul.

UnicodeJsps/src/main/java/org/unicode/jsp/XPropertyFactory.java

  • Set scx to be multivalued
  • Add other examples of multivalued (namely exemplars, with new addExamplarProperty())
  • The rest was Eclipse cleanup of @Override. There are a few other similar Eclipse cleanups in other files.

UnicodeJsps/src/test/java/org/unicode/jsptest/TestMultivalued.java

  • Added tests
  • Also verifies that \p{scx=beng,deva} doesn't work

UnicodeJsps/src/test/java/org/unicode/jsptest/TestUnicodeSet.java

  • Removes test for Arab,Deva (since that is now disabled)

unicodetools/src/main/java/org/unicode/props/UnicodeProperty.java

  • Makes small changes to enable multivalued properties, with comma between values
  • Disables values like \p{scx=beng,deva}. These never worked right, and can always be computed with [\p{scx=beng}&\p{scx=deva}] if one wants restriction, and [\p{scx=beng}\p{scx=deva}] if one wants inclusion.

@macchiati
Copy link
Member Author

Not sure why "@github-actions build.md / Check UCA data (pull_request) Failing after 1m" is failing; didn't do anything with UCA

@eggrobin
Copy link
Member

I’ll take a look on Monday. The UCA check has been failing for a while because our UCD is ahead of our UCA, nothing to do with this PR.

@macchiati
Copy link
Member Author

macchiati commented Nov 25, 2023 via email

Copy link
Member

@markusicu markusicu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please squash-and-merge

@macchiati macchiati merged commit 8ac84e0 into unicode-org:main Nov 28, 2023
@macchiati macchiati deleted the Fix-JSP-failures-with-scx branch November 28, 2023 01:40
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

Successfully merging this pull request may close these issues.

UnicodeSet/property tools: Script_Extensions missing characters

3 participants