main (int32 argc, char *argv[]) { int32 i; if (argc < 3) { E_INFO("Usage: %s outhypfile inhypfile1 inhypfile2 ... < ctlfile\n", argv[0]); exit(0); } n_inhyp = argc - 2; inhyp = (corpus_t **) ckd_calloc (n_inhyp, sizeof(corpus_t *)); for (i = 2; i < argc; i++) inhyp[i-2] = corpus_load_headid (argv[i], validate, dup_resolve); E_INFO("Extracting\n"); if ((outfp = fopen(argv[1], "w")) == NULL) E_FATAL_SYSTEM("fopen(%s,w) failed\n", argv[1]); infilename = &(argv[2]); ctl_process (NULL, 0, 1000000000, process_utt); fclose (outfp); E_INFO("Done\n"); exit(0); }
main(int32 argc, char *argv[]) { corpus_t *ch, *ct; char id[4096], *str; if (argc != 3) E_FATAL("Usage: %s headid-corpusfile tailid-corpusfile\n", argv[0]); ch = corpus_load_headid(argv[1], NULL, NULL); ct = corpus_load_tailid(argv[2], NULL, NULL); for (;;) { printf("> "); scanf("%s", id); str = corpus_lookup(ch, id); if (str == NULL) printf("%s Not found in 1\n"); else printf("%s(1): %s\n", id, str); str = corpus_lookup(ct, id); if (str == NULL) printf("%s Not found in 2\n"); else printf("%s(2): %s\n", id, str); } }