'Process texts as a stream, and yield Doc objects in order.
Supports GIL-free multi-threading.
Arguments:
texts (iterator)
tag (bool)
parse (bool)
entity (bool)'

def pipe(self, texts, tag=True, parse=True, entity=True, n_threads=2, batch_size=1000):

    skip = {self.tagger: (not tag), self.parser: (not parse), self.entity: (not entity)}
    stream = (self.make_doc(text) for text in texts)
    for proc in self.pipeline:
        if (proc and (not skip.get(proc))):
            if hasattr(proc, u'pipe'):
                stream = proc.pipe(stream, n_threads=n_threads, batch_size=batch_size)
            else:
                stream = (proc(item) for item in stream)
    for doc in stream:
        (yield doc)
