Lines Matching refs:name
8 # file name: preparseucd.py
113 # 1: List of aliases; short & long name followed by other aliases.
114 # The short name is "" if it is listed as "n/a" in PropertyValueAliases.txt.
118 # maps each value name to a list of aliases.
147 # - pname: the UCD short property name
150 # - vname: the UCD short property value name
167 Caches alternate spellings of the property name."""
168 # Try the input name.
172 # Try the normalized input name.
176 _properties[pname] = prop # Cache prop under this new name spelling.
179 _ignored_properties.add(pname) # Remember to ignore this new name spelling.
186 if pname in _null_values: return pname # pname is already the short name.
189 return prop[1][0] or prop[1][1] # Long name if no short name.
200 raise NameError("unknown value name %s for property %s\n" %
203 return aliases[0] or aliases[1] # Long name if no short name.
423 def AddSingleNameBinaryProperty(name):
424 # For some properties, the short name is the same as the long name.
425 _null_values[name] = False
427 prop = ("Binary", [name, name], bin_prop[2], bin_prop[3])
428 _properties[name] = prop
429 _properties[NormPropName(name)] = prop
432 def AddPOSIXBinaryProperty(name):
433 # We only define a long name for ICU-specific (non-UCD) POSIX properties.
434 _null_values[name] = False
436 prop = ("Binary", ["", name], bin_prop[2], bin_prop[3])
437 _properties[name] = prop
438 _properties[NormPropName(name)] = prop
440 _properties["posix" + NormPropName(name)] = prop
475 name = aliases[0]
476 if name in _ignored_properties:
481 if name.endswith("ccc"):
482 _null_values[name] = 0
484 _null_values[name] = null_value
497 name = "Turkic_Case_Folding"
498 _null_values[name] = ""
499 prop = ("String", [name, name], set(), {})
500 _properties[name] = prop
501 _properties[NormPropName(name)] = prop
503 name = "Conditional_Case_Mappings"
504 _null_values[name] = ""
505 prop = ("Miscellaneous", [name, name], set(), {})
506 _properties[name] = prop
507 _properties[NormPropName(name)] = prop
582 if short_name == "n/a": # no short name
620 # Do not invent a Unicode long script name before the UCD adds the script.
637 (start, end, name) = (data[2], data[3], data[4][1])
638 _blocks.append((start, end, {"blk": name}))
639 SetPropertyValue("blk", name, start, end)
662 name = fields[1]
663 if name.startswith("<"):
664 if name.endswith(", First>"):
672 elif name.endswith(", Last>"):
682 name = name[1:-7]
683 if first_name != name:
685 "error: range start/end name mismatch at\n %s\n %s\n" %
690 # Remember algorithmic name ranges.
691 if "Ideograph" in name:
695 elif name == "Hangul Syllable":
697 name = ""
700 name = ""
702 if name: props["na"] = name
802 and the second column is a property name.
857 with a name correction in the second column.
1212 for name in sorted(short_names):
1213 out_file.write(";".join(["value", prop[1][0]] + prop[3][name]))
1341 _data_file_copyright + """# file name: nfc.txt
1369 _data_file_copyright + """# file name: nfkc.txt
1402 _data_file_copyright + """# file name: nfkc_cf.txt
1770 def SplitName(name, tokens):
1773 i = name.find(e)
1776 token = name[:start]
1779 for i in range(start, len(name)):
1780 c = name[i]
1782 token = name[start:i + 1]
1785 IncCounter(tokens, name[start:])
1789 # TODO: This name analysis code is out of date.
1810 name = props[pname]
1811 total_lengths[pname] += len(name)
1812 name_chars |= set(name)
1813 if len(name) > max_length: max_length = len(name)
1814 per_cp += len(name) + 1
1816 tokens = SplitName(name, token_counters)
1817 for c in name:
1825 print("%d name-characters: %s" %
1831 print("name-chars: %6d * '%s'" % cc)
1832 print("max. name length: %d" % max_length)
2029 for ccc in sorted([int(name) for name in prop[2]]):
2117 # it only changes the name itself in the output;