def GetTopLevelChars(Labels): RanksToCount = {} for Label in Labels: Ranks = GetRanksFromLabel(Label) sortdict.IncCount(RanksToCount, Ranks) Order = sortdict.GetOrder(RanksToCount) RankVec = RanksToCount.keys() TopLevelChars = RankVec[Order[0]] return TopLevelChars
def Add(LCR, PctId): sortdict.IncCount(LCRToCount, LCR) sortdict.IncCount(PctIdToCount, PctId) sortdict.IncCount2(PctIdToLCRCount, PctId, LCR)