def featureExtraction(pairs, CombinedStrokes):
    Feature = []

    try:
        for pair in pairs:
            # print(pair)
            geo_features = geometric_features(CombinedStrokes, pair)
            shape_context = PSC.getAllPSC(CombinedStrokes, pair)
            final_feature = np.append(geo_features, shape_context)
            # print(Label)
            Feature.append(final_feature)
    except Exception as e:
        print(e)

    return Feature
def feature_extraction(strokes, SLT):
    Label = 0
    Feature = []
    #print("SLT::",SLT)
    try:
        for pair in SLT:
            #print(pair)
            geo_features = geometric_features(strokes, pair)
            shape_context = PSC.getAllPSC(strokes, pair)
            #       print('s:',shape_context)
            final_feature = np.append(geo_features, shape_context)
            Feature.append(final_feature)
    except Exception as e:
        print(e)
    #print(Feature)
    return np.asarray(Feature)
def featureExtraction(pairs, CombinedStrokes, labeledgraph):
    Feature = []

    try:
        for pair in pairs:
            # print(pair)
            geo_features = geometric_features(CombinedStrokes, pair)
            shape_context = PSC.getAllPSC(CombinedStrokes, pair)
            final_feature = np.append(geo_features, shape_context)
            Label = getRelationId(labeledgraph[pair[0]][pair[1]])
            # print(Label)
            final_feature = np.append(final_feature, Label)
            Feature.append(final_feature)
    except Exception as e:
        print(e)

    return Feature
def feature_extraction(strokes, GT, SLT):
    Label = 0
    Feature = []

    try:
        for pair in SLT:
            # print(pair)
            geo_features = geometric_features(strokes, pair)
            shape_context = PSC.getAllPSC(strokes, pair)
            final_feature = np.append(geo_features, shape_context)
            if (GT[pair[0]][pair[1]] == '*'):
                Label = 1
            else:
                Label = 0
            final_feature = np.append(final_feature, Label)
            Feature.append(final_feature)
    except Exception as e:
        print(e)

    return Feature