def syntactic_rules_for_preprocessing(tokens, embeddings, std_length):
    combined_after_set = {'a', 'an', 'the', 'some', 'each', 'all', 'to', 'for', 'in', 'on', 'of', 'about', 'with', 'from', 'at', 'have', 'has', 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'should', 'would', 'will', 'do', "don't", 'did', 'no', 'not', 'my', 'his', 'her', 'your', 'their', 'our', 'its', 'whose', 'go', 'going', 'went', 'come', 'came', 'coming'}
    combined_before_set = {'him', 'her', 'them', 'us', ',', '.', '!', '?', '...', ';', '-', '~'}
    if (len(tokens) > std_length):
        for e in tokens:
            if (e in combined_after_set):
                (tokens, embeddings) = preprocessing_helper(tokens, embeddings, e, 'after')
                if (len(tokens) == std_length):
                    break
                continue
            elif (e in combined_before_set):
                (tokens, embeddings) = preprocessing_helper(tokens, embeddings, e, 'before')
                if (len(tokens) == std_length):
                    break
                continue
    return (tokens, embeddings)
def syntactic_rules_for_preprocessing(tokens, embeddings, std_length):
    combined_after_set = {'a', 'an', 'the', 'some', 'each', 'all', 'to', 'for', 'in', 'on', 'of', 'about', 'with', 'from', 'at', 'have', 'has', 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'should', 'would', 'will', 'do', "don't", 'did', 'no', 'not', 'my', 'his', 'her', 'your', 'their', 'our', 'its', 'whose', 'go', 'going', 'went', 'come', 'came', 'coming'}
    combined_before_set = {'him', 'her', 'them', 'us', ',', '.', '!', '?', '...', ';', '-', '~'}
    if (len(tokens) > std_length):
        for e in tokens:
            if (e in combined_after_set):
                (tokens, embeddings) = preprocessing_helper(tokens, embeddings, e, 'after')
                if (len(tokens) == std_length):
                    break
                continue
            elif (e in combined_before_set):
                (tokens, embeddings) = preprocessing_helper(tokens, embeddings, e, 'before')
                if (len(tokens) == std_length):
                    break
                continue
    return (tokens, embeddings)