<commit_before>import logging
import unittest

from nlglib.microplanning import Clause, CC, PP
import nlglib.realisation.simplenlg.client as snlg


class TestSimplenlgClient(unittest.TestCase):

    simplenlg_server = None
    client = None

    @classmethod
    def setUpClass(cls):
        jp = '../simplenlg/build/jar/simplenlg.jar'
        port = '50007'
        cls.test_result = 'Put the piano and the drum into the truck.'
        cls.simplenlg_server = snlg.SimpleNLGServer(jp, port)
        cls.simplenlg_server.start()
        cls.simplenlg_server.wait_for_init()
        cls.client = snlg.SimplenlgClient('localhost', port)

    @classmethod
    def tearDownClass(cls):
        # signal that we would like to shut the server down
        if cls.simplenlg_server:
            cls.simplenlg_server.shutdown()

    def test_socket(self):
        self.assertIsNotNone(self.simplenlg_server)<commit_msg>Added simplenlg jar.<commit_after>import logging
import unittest

from nlglib.microplanning import Clause, CC, PP
import nlglib.realisation.simplenlg.client as snlg


class TestSimplenlgClient(unittest.TestCase):

    simplenlg_server = None
    client = None

    @classmethod
    def setUpClass(cls):
        jp = 'nlglib/res/simplenlg.jar'
        port = '50007'
        cls.test_result = 'Put the piano and the drum into the truck.'
        cls.simplenlg_server = snlg.SimpleNLGServer(jp, port)
        cls.simplenlg_server.start()
        cls.simplenlg_server.wait_for_init()
        cls.client = snlg.SimplenlgClient('localhost', port)

    @classmethod
    def tearDownClass(cls):
        # signal that we would like to shut the server down
        if cls.simplenlg_server:
            cls.simplenlg_server.shutdown()

    def test_socket(self):
        self.assertIsNotNone(self.simplenlg_server)
{'fraction_non_alphanumeric': 0.08328736900165472, 'fraction_numerical': 0.005515719801434087, 'mean_word_length': 3.031111111111111, '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': '7426118', 'n_tokens_mistral': 608, 'n_tokens_neox': 571, 'n_words': 129}