summaryrefslogtreecommitdiff
path: root/src/runtime/c/utils
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-11-06 10:21:46 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-11-06 10:21:46 +0000
commit2483dc772897eb0909664f1a88cc7f8ec50ebd5b (patch)
tree4ecb223fc246458a9a5997a4b65329b6039ce309 /src/runtime/c/utils
parent84ef5fa5fa976569370c58bed855f2ab1de5588c (diff)
the content of ParseEngAbs3.probs is now merged with ParseEngAbs.probs. The later is now retrained. Once the grammar is compiled with the .probs file now it doesn't need anything more to do robust parsing. The robustness itself is controlled by the flags 'heuristic_search_factor', 'meta_prob' and 'meta_token_prob' in ParseEngAbs.gf
Diffstat (limited to 'src/runtime/c/utils')
-rw-r--r--src/runtime/c/utils/pgf-translate.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/runtime/c/utils/pgf-translate.c b/src/runtime/c/utils/pgf-translate.c
index 79a4fdd42..32f8323ab 100644
--- a/src/runtime/c/utils/pgf-translate.c
+++ b/src/runtime/c/utils/pgf-translate.c
@@ -53,18 +53,17 @@ int main(int argc, char* argv[]) {
// Create the pool that is used to allocate everything
GuPool* pool = gu_new_pool();
int status = EXIT_SUCCESS;
- if (argc < 5 || argc > 6) {
- fprintf(stderr, "usage: %s pgf cat from-lang to-lang [probs-file]\n", argv[0]);
+ if (argc < 5) {
+ fprintf(stderr, "usage: %s pgf cat from-lang to-lang\n", argv[0]);
status = EXIT_FAILURE;
goto fail;
}
- char* filename = argv[1];
+ GuString filename = argv[1];
GuString cat = argv[2];
-
GuString from_lang = argv[3];
GuString to_lang = argv[4];
-
+
// Create an exception frame that catches all errors.
GuExn* err = gu_new_exn(NULL, gu_kind(type), pool);
@@ -78,16 +77,6 @@ int main(int argc, char* argv[]) {
goto fail;
}
- if (argc == 6) {
- char* meta_probs_filename = argv[5];
- pgf_load_meta_child_probs(pgf, meta_probs_filename, pool, err);
- if (!gu_ok(err)) {
- fprintf(stderr, "Loading meta child probs failed\n");
- status = EXIT_FAILURE;
- goto fail;
- }
- }
-
// Look up the source and destination concrete categories
PgfConcr* from_concr = pgf_get_language(pgf, from_lang);
PgfConcr* to_concr = pgf_get_language(pgf, to_lang);