mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Add IDS_Trinary_Operator support from PropList.txt.
This commit is contained in:
@@ -348,6 +348,7 @@ typedef enum ucd_property_
|
||||
UCD_PROPERTY_NONCHARACTER_CODE_POINT = 0x00010000, /**< @brief Noncharacter_Code_Point */
|
||||
UCD_PROPERTY_OTHER_GRAPHEME_EXTEND = 0x00020000, /**< @brief Other_Grapheme_Extend */
|
||||
UCD_PROPERTY_IDS_BINARY_OPERATOR = 0x00040000, /**< @brief IDS_Binary_Operator */
|
||||
UCD_PROPERTY_IDS_TRINARY_OPERATOR = 0x00080000, /**< @brief IDS_Trinary_Operator */
|
||||
} ucd_property;
|
||||
|
||||
/** @brief Return the properties of the specified codepoint.
|
||||
@@ -826,6 +827,7 @@ namespace ucd
|
||||
Noncharacter_Code_Point = UCD_PROPERTY_NONCHARACTER_CODE_POINT, /**< @brief Noncharacter_Code_Point */
|
||||
Other_Grapheme_Extend = UCD_PROPERTY_OTHER_GRAPHEME_EXTEND, /**< @brief Other_Grapheme_Extend */
|
||||
IDS_Binary_Operator = UCD_PROPERTY_IDS_BINARY_OPERATOR, /**< @brief IDS_Binary_Operator */
|
||||
IDS_Trinary_Operator = UCD_PROPERTY_IDS_TRINARY_OPERATOR, /**< @brief IDS_Trinary_Operator */
|
||||
};
|
||||
|
||||
/** @brief Return the properties of the specified codepoint.
|
||||
|
||||
@@ -1516,6 +1516,7 @@ static int properties_So(codepoint_t c)
|
||||
break;
|
||||
case 0x2F00:
|
||||
if (c >= 0x2FF0 && c <= 0x2FF1) return UCD_PROPERTY_IDS_BINARY_OPERATOR;
|
||||
if (c >= 0x2FF2 && c <= 0x2FF3) return UCD_PROPERTY_IDS_TRINARY_OPERATOR;
|
||||
if (c >= 0x2FF4 && c <= 0x2FFB) return UCD_PROPERTY_IDS_BINARY_OPERATOR;
|
||||
break;
|
||||
case 0x01F100:
|
||||
|
||||
@@ -140,6 +140,7 @@ def properties(data):
|
||||
props += (2 ** 16) * data.get('Noncharacter_Code_Point', 0)
|
||||
props += (2 ** 17) * data.get('Other_Grapheme_Extend', 0)
|
||||
props += (2 ** 18) * data.get('IDS_Binary_Operator', 0)
|
||||
props += (2 ** 19) * data.get('IDS_Trinary_Operator', 0)
|
||||
return props
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user