<commit_before>package com.gofish.sentiment.newsanalyser;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.DeploymentOptions;
import io.vertx.core.Future;
import io.vertx.core.eventbus.MessageConsumer;
import io.vertx.core.json.JsonObject;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.servicediscovery.Record;
import io.vertx.servicediscovery.ServiceDiscovery;
import io.vertx.servicediscovery.types.EventBusService;
import io.vertx.serviceproxy.ProxyHelper;

import java.util.Optional;

/**
 * @author <NAME>
 */
public class NewsAnalyserVerticle extends AbstractVerticle {

    private static final Logger LOG = LoggerFactory.getLogger(NewsAnalyserVerticle.class);

    private MessageConsumer<JsonObject> messageConsumer;
    private ServiceDiscovery serviceDiscovery;
    private Record record;

    @Override
    public void start(Future<Void> startFuture) throws Exception {
        LOG.info("Bringing up NewsAnalyserVerticle");

        JsonObject config = Optional.ofNullable(config())
                .orElseThrow(() -> new RuntimeException("Could not load analyser configuration"));

        DeploymentOptions workerOptions = new DeploymentOptions().setConfig(config).setInstances(10).setWorker(true);
        vertx.deployVerticle(NewsAnalyserWorker.class.getName(), workerOptions);

        NewsAnalyserService newsAnalyserService = NewsAnalyserService.create(vertx, config);
        messageConsumer = ProxyHelper.registerService(NewsAnalyserService.class, vertx, newsAnalyserService, NewsAnalyserService.ADDRESS);
<commit_msg>Removed NewsCrawlerWorker deployment call<commit_after>package com.gofish.sentiment.newsanalyser;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.Future;
import io.vertx.core.eventbus.MessageConsumer;
import io.vertx.core.json.JsonObject;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.servicediscovery.Record;
import io.vertx.servicediscovery.ServiceDiscovery;
import io.vertx.servicediscovery.types.EventBusService;
import io.vertx.serviceproxy.ProxyHelper;

import java.util.Optional;

/**
 * @author <NAME>
 */
public class NewsAnalyserVerticle extends AbstractVerticle {

    private static final Logger LOG = LoggerFactory.getLogger(NewsAnalyserVerticle.class);

    private MessageConsumer<JsonObject> messageConsumer;
    private ServiceDiscovery serviceDiscovery;
    private Record record;

    @Override
    public void start(Future<Void> startFuture) throws Exception {
        LOG.info("Bringing up NewsAnalyserVerticle");

        JsonObject config = Optional.ofNullable(config())
                .orElseThrow(() -> new RuntimeException("Could not load analyser configuration"));

        NewsAnalyserService newsAnalyserService = NewsAnalyserService.create(vertx, config);
        messageConsumer = ProxyHelper.registerService(NewsAnalyserService.class, vertx, newsAnalyserService, NewsAnalyserService.ADDRESS);
{'fraction_non_alphanumeric': 0.09027081243731194, 'fraction_numerical': 0.0006686726847208291, 'mean_word_length': 5.285714285714286, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '3637930', 'n_tokens_mistral': 836, 'n_tokens_neox': 839, 'n_words': 161}