<commit_before>package qa.qcri.aidr.trainer.pybossa.service.impl;

import au.com.bytecode.opencsv.CSVParser;
import org.apache.log4j.Logger;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import qa.qcri.aidr.trainer.pybossa.dao.TaskTranslationDao;
import qa.qcri.aidr.trainer.pybossa.entity.ClientApp;
import qa.qcri.aidr.trainer.pybossa.entity.ReportTemplate;
import qa.qcri.aidr.trainer.pybossa.entity.TaskTranslation;
import qa.qcri.aidr.trainer.pybossa.format.impl.TranslationRequestModel;
import qa.qcri.aidr.trainer.pybossa.service.ReportTemplateService;
import qa.qcri.aidr.trainer.pybossa.service.TranslationService;
import qa.qcri.aidr.trainer.pybossa.store.StatusCodeType;

import java.io.BufferedReader;
import java.io.StringReader;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;


/**
 * Created by kamal on 3/22/15.
 */
@Service("translationService")
@Transactional(readOnly = false)
public class TWBTranslationServiceImpl implements TranslationService {

    @Autowired
    private TaskTranslationDao taskTranslationDao;

    @Autowired
    private SessionFactory sessionFactory;

    @Autowired
    private ReportTemplateService reportTemplateService;
    final private static int MAX_BATCH_SIZE = 1000;  //
    final private static long MAX_WAIT_TIME_MILLIS = 0; // 5 minutes
    private static long timeOfLastTranslationProcessingMillis = System.currentTimeMillis(); //initialize at startup


    protected static Logger logger = Logger.getLogger("service.translationService");<commit_msg>change wait time<commit_after>package qa.qcri.aidr.trainer.pybossa.service.impl;

import au.com.bytecode.opencsv.CSVParser;
import org.apache.log4j.Logger;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import qa.qcri.aidr.trainer.pybossa.dao.TaskTranslationDao;
import qa.qcri.aidr.trainer.pybossa.entity.ClientApp;
import qa.qcri.aidr.trainer.pybossa.entity.ReportTemplate;
import qa.qcri.aidr.trainer.pybossa.entity.TaskTranslation;
import qa.qcri.aidr.trainer.pybossa.format.impl.TranslationRequestModel;
import qa.qcri.aidr.trainer.pybossa.service.ReportTemplateService;
import qa.qcri.aidr.trainer.pybossa.service.TranslationService;
import qa.qcri.aidr.trainer.pybossa.store.StatusCodeType;

import java.io.BufferedReader;
import java.io.StringReader;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;


/**
 * Created by kamal on 3/22/15.
 */
@Service("translationService")
@Transactional(readOnly = false)
public class TWBTranslationServiceImpl implements TranslationService {

    @Autowired
    private TaskTranslationDao taskTranslationDao;

    @Autowired
    private SessionFactory sessionFactory;

    @Autowired
    private ReportTemplateService reportTemplateService;
    final private static int MAX_BATCH_SIZE = 1000;  //
    final private static long MAX_WAIT_TIME_MILLIS = 300000; // 5 minutes
    private static long timeOfLastTranslationProcessingMillis = System.currentTimeMillis(); //initialize at startup


    protected static Logger logger = Logger.getLogger("service.translationService");
{'fraction_non_alphanumeric': 0.09251101321585903, 'fraction_numerical': 0.007984581497797356, 'mean_word_length': 5.740259740259741, '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': '3442546', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1103, 'n_words': 197}