MCPcopy Create free account
hub / github.com/davisking/dlib / print_segment

Function print_segment

python_examples/sequence_segmenter.py:83–88  ·  view source on GitHub ↗
(sentence, names)

Source from the content-addressed store, hash-verified

81
82
83def print_segment(sentence, names):
84 words = sentence.split()
85 for name in names:
86 for i in name:
87 sys.stdout.write(words[i] + " ")
88 sys.stdout.write("\n")
89
90
91

Callers 1

Calls 2

writeMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected