mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-11-04 11:15:27 -07:00
bugfix in the statistical parser
This commit is contained in:
1 parent
d1c5fafc69
commit
ca3716857c
1 file changed
+4
-2
@@ -1631,8 +1631,10 @@ pgf_new_token_state(PgfConcr *concr, PgfToken tok, GuPool* pool)
|
||||
ts->lexicon_idx = gu_map_get(concr->leftcorner_tok_idx,
|
||||
&tok, PgfProductionIdx*);
|
||||
ts->lexical_prob = INFINITY;
|
||||
PgfLexiconFn clo = { { pgf_parser_compute_lexicon_prob }, ts };
|
||||
gu_map_iter(ts->lexicon_idx, &clo.fn, NULL);
|
||||
if (ts->lexicon_idx != NULL) {
|
||||
PgfLexiconFn clo = { { pgf_parser_compute_lexicon_prob }, ts };
|
||||
gu_map_iter(ts->lexicon_idx, &clo.fn, NULL);
|
||||
}
|
||||
if (ts->lexical_prob == INFINITY)
|
||||
ts->lexical_prob = 0;
|
||||
return ts;
|
||||
|
||||
Reference in new issue
Block a user