Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • develop
  • python2.7
3 results

LibFindMacros.cmake

Blame
  • worker.py 703 B
    """Implementation of nlp_worker."""
    import logging
    
    import nlp_ws
    
    from src.ccl_handler import CCLHandler
    from src.wordifier import Wordifier
    
    _log = logging.getLogger(__name__)
    
    
    class Worker(nlp_ws.NLPWorker):
        """Implements nlp_worker for tokenizer service."""
    
        @classmethod
        def static_init(cls, config):
            """One time static initialisation."""
    
        def process(self, input_file: str, task_options: dict,
                    output_file: str) -> None:
            """Generating tokens converted to words from input file."""
            wordifier = Wordifier()
            ccl_handler = CCLHandler(input_file)
            ccl_handler.process(output_file, wordifier.unmarshallers)