Example #1
0
def _process_operations(a_segments, b_segments, a, b):
    start = time.time()
    operations = list(segment_matcher.diff_segments(a_segments, b_segments))
    logger.debug("diff() of {0} and {1} tokens took {2} seconds."
                 .format(len(a), len(b), time.time() - start))

    return operations, a, b
Example #2
0
def _process_operations(a_segments, b_segments, a, b):
    start = time.time()
    operations = list(segment_matcher.diff_segments(a_segments, b_segments))
    logger.debug("diff() of {0} and {1} tokens took {2} seconds."
                 .format(len(a), len(b), time.time() - start))

    return operations, a, b
Example #3
0
def segment_random_seg():
    start = time.time()
    for _ in range(25):
        operations = list(segment_matcher.diff_segments(random1_segments, random2_segments))
    print("\trandom: {0}".format((time.time() - start)/25))
Example #4
0
def segment_common_seg():
    start = time.time()
    for _ in range(25):
        operations = list(segment_matcher.diff_segments(common1_segments, common2_segments))
    print("\tcommon: {0}".format((time.time() - start)/25))
Example #5
0
def segment_random_seg():
    start = time.time()
    for _ in range(25):
        operations = list(
            segment_matcher.diff_segments(random1_segments, random2_segments))
    print("\trandom: {0}".format((time.time() - start) / 25))
Example #6
0
def segment_common_seg():
    start = time.time()
    for _ in range(25):
        operations = list(
            segment_matcher.diff_segments(common1_segments, common2_segments))
    print("\tcommon: {0}".format((time.time() - start) / 25))