Exemplo n.º 1
0
int main(int argc, char** argv)
{
  typedef cicada::Sentence sentence_type;
  typedef cicada::SentenceVector sentence_set_type;

  sentence_set_type sentences("Good morning |||  bad evening |||");
  
  sentence_set_type::const_iterator siter_end = sentences.end();
  for (sentence_set_type::const_iterator siter = sentences.begin(); siter != siter_end; ++ siter)
    std::cout << "sentence: " <<  *siter << " length: " << siter->size() << '\n';
  std::cout << "END" << '\n';
  std::cout << "sentences: " << sentences << ':' << std::endl;

  msgpack_test(sentences);
}
int main(int argc ,char *argv[])
{

	/* Please keep all the files that you are using have this as the basic code */
	circle *tree;   // create the doc object
	tree=create_circle(NULL); // initialize the datastructure
	read_ssf_from_file(tree,argv[1]);  // read from the file into tree
	int sentence=sentences(tree);
	node * temp[sentence];   // create the node object to store all the nodes retuned
	int count=0,i,k;  // count to count the # of sentences or nodes returned
	count=traverse_tree(tree,temp,count); // function which returns all the sentence nodes into temp
	
	for(i=0;i<count;i++) {
		child(temp[i]);
	}
	print_tree_to_file(tree, "temp.txt");

	return 0;
}