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

Function do_chunk

pattern/text/tree.py:1486–1490  ·  view source on GitHub ↗
(ch)

Source from the content-addressed store, hash-verified

1484 return '(PNP %s)' % s
1485
1486 def do_chunk(ch):
1487 # Returns the Chunk in NLTK bracket format. Recurse attached PNP's.
1488 s = ' '.join(['(%s %s)' % (w.pos, w.string) for w in ch.words])
1489 s+= ' '.join([do_pnp(pnp) for pnp in ch.attachments])
1490 return '(%s %s)' % (ch.type, s)
1491
1492 T = ['(S']
1493 v = [] # PNP's already visited.

Callers 2

do_pnpFunction · 0.85
nltk_treeFunction · 0.85

Calls 1

do_pnpFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…