<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import unittest

from extrakto import get_words


class TestGetWords(unittest.TestCase):

    def test_skip_dot_last_word_in_sentence(self):
        text = "Hello world. Extrakto is an awesome plugin."
        words = [
            "Hello", "world", "Extrakto", "awesome", "plugin"
        ]

        result = get_words(text, 4)
        self.assertEquals(words, result)

    def test_box_drawing(self):
        text = "last│first"
        words = [<commit_msg>fix python2 test<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import unittest

from extrakto import get_words


class TestGetWords(unittest.TestCase):

    def test_skip_dot_last_word_in_sentence(self):
        text = "Hello world. Extrakto is an awesome plugin."
        words = [
            "Hello", "world", "Extrakto", "awesome", "plugin"
        ]

        result = get_words(text, 4)
        self.assertEquals(words, result)

    def test_box_drawing(self):
        text = u"last│first"
        words = [
{'fraction_non_alphanumeric': 0.12022900763358779, 'fraction_numerical': 0.004770992366412214, 'mean_word_length': 2.629757785467128, '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': '627093', 'n_tokens_mistral': 351, 'n_tokens_neox': 331, 'n_words': 78}