def _tag_most_likely(examples):
tokenized_examples = [_tokenize_by_character_class(example) for example in examples]<EOL>token_lengths = [len(e) for e in tokenized_examples]<EOL>token_lengths_mode = _mode(token_lengths)<EOL>tokenized_examples = [example for example in tokenized_examples if len(example) == token_lengths_mode]<EOL>most_likely = []<EOL>for token_index in range(<NUM_LIT:0>, token_lengths_mode):<EOL><INDENT>tokens = [token[token_index] for token in tokenized_examples]<EOL>probabilities = _percent_match(DATE_ELEMENTS, tokens)<EOL>max_prob = max(probabilities)<EOL>if max_prob < <NUM_LIT:0.5>:<EOL><INDENT>most_likely.append(Filler(_mode(tokens)))<EOL><DEDENT>else:<EOL><INDENT>if probabilities.count(max_prob) == <NUM_LIT:1>:<EOL><INDENT>most_likely.append(DATE_ELEMENTS[probabilities.index(max_prob)])<EOL><DEDENT>else:<EOL><INDENT>choices = []<EOL>for index, prob in enumerate(probabilities):<EOL><INDENT>if prob == max_prob:<EOL><INDENT>choices.append(DATE_ELEMENTS[index])<EOL><DEDENT><DEDENT>most_likely.append(_most_restrictive(choices))<EOL><DEDENT><DEDENT><DEDENT>return most_likely<EOL>
Return a list of date elements by choosing the most likely element for a token within examples (context-free).