# -*- coding: utf-8 -*- import nltk import time import clt_gen from mod_python import apache from mod_python import util def function(sentences): start_time = time.clock() tokens_list = [nltk.word_tokenize(sentence) for sentence in sentences] json = '[' + ", ".join([clt_gen.json_list(tokens) for tokens in tokens_list]) + ']' result = clt_gen.json_envelope(json,start_time) return (result)