mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-01 15:22:50 -06:00
change the API for literals in Java and Python. The input sentence is no longer a parameter to the callbacks.
This commit is contained in:
@@ -307,8 +307,8 @@ public class Translator {
|
||||
Concr targetLang = getTargetConcr();
|
||||
|
||||
Map<String,LiteralCallback> callbacks = new HashMap<String,LiteralCallback>();
|
||||
callbacks.put("PN", new NercLiteralCallback(mGrammarLoader.getGrammar(), sourceLang));
|
||||
callbacks.put("Symb", new UnknownLiteralCallback(sourceLang));
|
||||
callbacks.put("PN", new NercLiteralCallback(mGrammarLoader.getGrammar(), sourceLang, input));
|
||||
callbacks.put("Symb", new UnknownLiteralCallback(sourceLang, input));
|
||||
|
||||
int count = NUM_ALT_TRANSLATIONS;
|
||||
for (ExprProb ep : sourceLang.parseWithHeuristics(getGrammar().getStartCat(), input, -1, callbacks)) {
|
||||
|
||||
Reference in New Issue
Block a user