<commit_before>from unittest import TestCase
from nala.bootstrapping.iteration import Iteration
from nose.plugins.attrib import attr
from nala.utils.writers import TagTogFormat
import os
from utils.readers import HTMLReader


@attr('slow')
class TestIteration(TestCase):
    def test_learning(self):
        iteration = Iteration('tmpbootstrapping', iteration_nr=1)
        # iteration.learning()
        # iteration.docselection(nr=10)
        # print(len(iteration.candidates.documents))
        # iteration.tagging()
        # print("\n\n\n\n\n\nPREDICTION\n\n\n\n\n")
        # for ann in iteration.candidates.predicted_annotations():
        #     print(ann)
        # note current working directory changes after crfsuite to crfsuite-folder
        # ttf = TagTogFormat(iteration.candidates, "/Users/carsten/tmp")
        # ttf.export_html()
        # ttf.export_ann_json(0.7)

        iteration.manual_review_import()
        iteration.evaluation()<commit_msg>removed invalid imports for travis cl<commit_after>from unittest import TestCase
from nala.bootstrapping.iteration import Iteration
from nose.plugins.attrib import attr
import os


@attr('slow')
class TestIteration(TestCase):
    def test_learning(self):
        iteration = Iteration('tmpbootstrapping', iteration_nr=1)
        # iteration.learning()
        # iteration.docselection(nr=10)
        # print(len(iteration.candidates.documents))
        # iteration.tagging()
        # print("\n\n\n\n\n\nPREDICTION\n\n\n\n\n")
        # for ann in iteration.candidates.predicted_annotations():
        #     print(ann)
        # note current working directory changes after crfsuite to crfsuite-folder

        iteration.manual_review_import()
        iteration.evaluation()
{'fraction_non_alphanumeric': 0.10281447443997703, 'fraction_numerical': 0.004595060310166571, 'mean_word_length': 3.2800982800982803, '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': '3614404', 'n_tokens_mistral': 530, 'n_tokens_neox': 517, 'n_words': 103}