MCPcopy Index your code
hub / github.com/clips/pattern / Slice

Class Slice

pattern/text/tree.py:998–1012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

996 return nltk_tree(self)
997
998class Slice(Sentence):
999
1000 def __init__(self, *args, **kwargs):
1001 """ A portion of the sentence returned by Sentence.slice().
1002 """
1003 self._start = kwargs.pop("start", 0)
1004 Sentence.__init__(self, *args, **kwargs)
1005
1006 @property
1007 def start(self):
1008 return self._start
1009
1010 @property
1011 def stop(self):
1012 return self._start + len(self.words)
1013
1014#---------------------------------------------------------------------------------------------------
1015# s = Sentence(parse("black cats and white dogs"))

Callers 1

sliceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…