Ignore:
Timestamp:
Oct 5, 2017, 12:14:57 PM (2 years ago)
Author:
cameron
Message:

Full casing properties

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/UCD-scripts/UCD_parser.py

    r5668 r5669  
    388388    property_object_map['stc'].finalizeProperty()
    389389
     390def parse_SpecialCasing_txt(property_object_map):
     391    data_records = []
     392    f = open(UCD_config.UCD_src_dir + "/SpecialCasing.txt")
     393    lines = f.readlines()
     394    for t in lines:
     395        if UCD_skip.match(t):
     396            continue  # skip comment and blank lines
     397        (cp, cp_hi, fields) = parse_data_record(t)
     398        if len(fields) != 4: continue   #  Ignore context-dependent casing
     399        if fields[3] != '': continue
     400        (lc, uc, tc) = (fields[0], fields[1], fields[2])
     401        if not uc == '':
     402            property_object_map['uc'].addDataRecord(cp, cp, uc)
     403        if not lc == '':
     404            property_object_map['lc'].addDataRecord(cp, cp, lc)
     405        if not tc == '':
     406            property_object_map['tc'].addDataRecord(cp, cp, tc)
     407    property_object_map['lc'].finalizeProperty()
     408    property_object_map['uc'].finalizeProperty()
     409    property_object_map['tc'].finalizeProperty()
     410
Note: See TracChangeset for help on using the changeset viewer.