added fullFormLexicon in Java

This commit is contained in:
Krasimir Angelov
2017-08-30 08:08:19 +02:00
parent bee61fe4aa
commit 3e9de6ffbb
3 changed files with 9 additions and 4 deletions

View File

@@ -1107,8 +1107,11 @@ Java_org_grammaticalframework_pgf_Lexicon_lookupWordPrefix
GuPool* pool = gu_new_pool();
GuExn* err = gu_new_exn(pool);
GuEnum* en = pgf_lookup_word_prefix(get_ref(env, jconcr), j2gu_string(env, prefix, pool),
pool, err);
GuEnum* en =
(prefix == NULL) ? pgf_fullform_lexicon(get_ref(env, jconcr),
pool)
: pgf_lookup_word_prefix(get_ref(env, jconcr), j2gu_string(env, prefix, pool),
pool, err);
if (!gu_ok(err)) {
if (gu_exn_caught(err, PgfExn)) {
GuString msg = (GuString) gu_exn_caught_data(err);