<commit_before>
SUMMARY_LENGHT = 0.2


def baseline(text):
    text = text.split(" ")
    word_count = int(0.2 * len(text))
    return " ".join(text[:word_count])<commit_msg>Improving baseline algorithm.<commit_after>import sys
import os

sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, 'textrank'))
import textcleaner  # Uses textrank's method for extracting sentences.

SUMMARY_LENGHT = 0.2


def baseline(text):
    """ Creates a baseline summary to be used as reference.
    """
    sentences = list(textcleaner.get_sentences(text))
    summary_sentences = int(SUMMARY_LENGHT * len(sentences))
    return " ".join(sentences[:summary_sentences])
{'fraction_non_alphanumeric': 0.12992700729927006, 'fraction_numerical': 0.008759124087591242, 'mean_word_length': 4.716666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2321251', 'n_tokens_mistral': 241, 'n_tokens_neox': 225, 'n_words': 48}