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

Function parse_tree_to_string

dlib/optimization/find_max_parse_cky.h:306–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304
305 template <typename T, typename U>
306 std::string parse_tree_to_string (
307 const std::vector<parse_tree_element<T> >& tree,
308 const std::vector<U>& words,
309 const unsigned long root_idx = 0
310 )
311 {
312 if (root_idx >= tree.size())
313 return "";
314
315 std::ostringstream sout;
316 impl::print_parse_tree_helper<false,false>(tree, words, root_idx, tree[root_idx].tag, sout);
317 return sout.str();
318 }
319
320// -----------------------------------------------------------------------------------------
321

Callers 1

dotest1Function · 0.85

Calls 2

sizeMethod · 0.45
strMethod · 0.45

Tested by 1

dotest1Function · 0.68