Skip to content

Commit

Permalink
Fix positive examples for BCP47 (#28)
Browse files Browse the repository at this point in the history
We used fuzzed positive examples for BCP47 which caused many problems
with RDF as some of the engines expected valid and approved BCP47 tags.

In this patch, we replace the positive fuzzed examples with approved
BCP47 tags so that the RDF examples can be loaded without related
warnings.

Fixes #26.
  • Loading branch information
mristin authored Mar 22, 2024
1 parent 8d7d01d commit 6ff39c2
Show file tree
Hide file tree
Showing 3,271 changed files with 22,051 additions and 8,046 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
131 changes: 124 additions & 7 deletions aas_core3_0_testgen/frozen_examples/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,132 @@
Examples(
positives=collections.OrderedDict(
[
("only_language", "en"),
("language_and_dialect", "de-CH"),
# Fuzzed
("fuzzed_01", "x-Sw4u3ZDO-nJLabnE"),
# NOTE (mristin):
# The positive examples are taken from:
# https://www.rfc-editor.org/rfc/bcp/bcp47.txt, Appendix A.
("simple_language_subtag_1", "de"),
("simple_language_subtag_2", "fr"),
("simple_language_subtag_3", "ja"),
(
"fuzzed_02",
"Tvwqa-500-8EQd-y-8f5-k-vqdMn7-Ohw9-CcA628-DHKP-hPAjUZ-cnr1REUf-S8-p-9X0r-wtCI-KunG3uzI-7dGUsrTu-fY7-C3-hFN-Y-ML69DgnJ-0-Y0H-TLACBVB-Z0HRibbz-yzSf8dvR-zAn-B-6h8VjcKX-jnwR-0Z8l-ghRIZ7mo-wZG7-zXHdSIV-Oy-8dH00A6L-nJY2dA1-57o8dQ-RpxkBTbE-qBJR-M-DyGDA3U-aguRfIhj-x-XmO-1u",
"simple_language_subtag_example_of_a_grandfathered_tag",
"i-enochian"
),
(
"language_subtag_plus_script_subtag_1",
"zh-Hant"
),
(
"language_subtag_plus_script_subtag_2",
"zh-Hans"
),
(
"language_subtag_plus_script_subtag_3",
"sr-Cyrl"
),
(
"language_subtag_plus_script_subtag_4",
"sr-Latn"
),
(
"extended_language_subtags_1",
"zh-cmn-Hans-CN"
),
(
"extended_language_subtags_2",
"cmn-Hans-CN"
),
(
"extended_language_subtags_3",
"zh-yue-HK"
),
(
"extended_language_subtags_4",
"yue-HK"
),
(
"language_script_region_1",
"zh-Hans-CN"
),
(
"language_script_region_2",
"sr-Latn-RS"
),
(
"language_variant_1",
"sl-rozaj"
),
(
"language_variant_2",
"sl-rozaj-biske"
),
(
"language_variant_3",
"sl-nedis"
),
(
"language_region_variant_1",
"de-CH-1901"
),
("fuzzed_03", "X-33DQI-g"),
(
"language_region_variant_2",
"sl-IT-nedis"
),
(
"language_script_region_variant",
"hy-Latn-IT-arevela"
),
(
"language_region_1",
"de-DE"
),
(
"language_region_2",
"en-US"
),
(
"language_region_3",
"es-419"
),
(
"private_use_subtags_1",
"de-CH-x-phonebk"
),
(
"private_use_subtags_2",
"az-Arab-x-AZE-derbend",
),
(
"private_use_registry_values_1",
"x-whatever"
),
(
"private_use_registry_values_2",
"qaa-Qaaa-QM-x-southern"
),
(
"private_use_registry_values_3",
"de-Qaaa"
),
(
"private_use_registry_values_4",
"sr-Latn-QM",
),
(
"private_use_registry_values_5",
"sr-Qaaa-RS"
),
(
"tag_with_extension_1",
"en-US-u-islamcal"
),
(
"tag_with_extension_2",
"zh-CN-a-myext-x-private"
),
(
"tag_with_extension_3",
"en-a-myext-b-another"
)
]
),
negatives=collections.OrderedDict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "x-Sw4u3ZDO-nJLabnE",
"language": "sr-Latn",
"text": "something_7282cc23"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"category": "something_d7cf2dff",
"description": [
{
"language": "en",
"language": "es-419",
"text": "something_be9deae0"
}
],
"displayName": [
{
"language": "Tvwqa-500-8EQd-y-8f5-k-vqdMn7-Ohw9-CcA628-DHKP-hPAjUZ-cnr1REUf-S8-p-9X0r-wtCI-KunG3uzI-7dGUsrTu-fY7-C3-hFN-Y-ML69DgnJ-0-Y0H-TLACBVB-Z0HRibbz-yzSf8dvR-zAn-B-6h8VjcKX-jnwR-0Z8l-ghRIZ7mo-wZG7-zXHdSIV-Oy-8dH00A6L-nJY2dA1-57o8dQ-RpxkBTbE-qBJR-M-DyGDA3U-aguRfIhj-x-XmO-1u",
"language": "zh-CN-a-myext-x-private",
"text": "something_535aeb51"
}
],
Expand All @@ -39,7 +39,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "X-33DQI-g",
"language": "sl-rozaj-biske",
"text": "something_7e795ee2"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"category": "something_d7cf2dff",
"description": [
{
"language": "en",
"language": "es-419",
"text": "something_be9deae0"
}
],
"displayName": [
{
"language": "Tvwqa-500-8EQd-y-8f5-k-vqdMn7-Ohw9-CcA628-DHKP-hPAjUZ-cnr1REUf-S8-p-9X0r-wtCI-KunG3uzI-7dGUsrTu-fY7-C3-hFN-Y-ML69DgnJ-0-Y0H-TLACBVB-Z0HRibbz-yzSf8dvR-zAn-B-6h8VjcKX-jnwR-0Z8l-ghRIZ7mo-wZG7-zXHdSIV-Oy-8dH00A6L-nJY2dA1-57o8dQ-RpxkBTbE-qBJR-M-DyGDA3U-aguRfIhj-x-XmO-1u",
"language": "zh-CN-a-myext-x-private",
"text": "something_535aeb51"
}
],
Expand All @@ -39,7 +39,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "X-33DQI-g",
"language": "sl-rozaj-biske",
"text": "something_7e795ee2"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"category": "something_d7cf2dff",
"description": [
{
"language": "en",
"language": "es-419",
"text": "something_be9deae0"
}
],
"displayName": [
{
"language": "Tvwqa-500-8EQd-y-8f5-k-vqdMn7-Ohw9-CcA628-DHKP-hPAjUZ-cnr1REUf-S8-p-9X0r-wtCI-KunG3uzI-7dGUsrTu-fY7-C3-hFN-Y-ML69DgnJ-0-Y0H-TLACBVB-Z0HRibbz-yzSf8dvR-zAn-B-6h8VjcKX-jnwR-0Z8l-ghRIZ7mo-wZG7-zXHdSIV-Oy-8dH00A6L-nJY2dA1-57o8dQ-RpxkBTbE-qBJR-M-DyGDA3U-aguRfIhj-x-XmO-1u",
"language": "zh-CN-a-myext-x-private",
"text": "something_535aeb51"
}
],
Expand All @@ -39,7 +39,7 @@
"modelType": "DataSpecificationIec61360",
"preferredName": [
{
"language": "X-33DQI-g",
"language": "sl-rozaj-biske",
"text": "something_7e795ee2"
},
{
Expand Down
Loading

0 comments on commit 6ff39c2

Please sign in to comment.