'Returns a portion of the sentence from word start index to word stop index.
The returned slice is a subclass of Sentence and a deep copy.'

def slice(self, start, stop):

    s = Slice(token=self.token, language=self.language)
    for (i, word) in enumerate(self.words[start:stop]):
        p0 = word.string
        p1 = word.lemma
        p2 = word.type
        p3 = (((word.chunk is not None) and word.chunk.type) or None)
        p4 = (((word.pnp is not None) and 'PNP') or None)
        p5 = (((word.chunk is not None) and unzip(0, word.chunk.relations)) or None)
        p6 = (((word.chunk is not None) and unzip(1, word.chunk.relations)) or None)
        p7 = ((word.chunk and word.chunk.anchor_id) or None)
        p8 = ((word.chunk and (word.chunk.start == (start + i)) and BEGIN) or None)
        p9 = word.custom_tags
        if ((word.chunk is not None) and (word.chunk.stop > stop)):
            (p3, p4, p5, p6, p7, p8) = (None, None, None, None, None, None)
        if ((word.pnp is not None) and (word.pnp.start == (start + i))):
            p4 = ((BEGIN + '-') + 'PNP')
        if ((word.pnp is not None) and ((word.pnp.start < start) or (word.chunk.stop > stop))):
            (p4, p7) = (None, None)
        s.append(word=p0, lemma=p1, type=p2, chunk=p3, pnp=p4, relation=p5, role=p6, anchor=p7, iob=p8, custom=p9)
    s.parent = self
    s._start = start
    return s
