public class DeterministicResolver extends Resolver
The id of this if native.deterministic
Modifier | Constructor and Description |
---|---|
|
DeterministicResolver() |
protected |
DeterministicResolver(String id) |
Modifier and Type | Method and Description |
---|---|
void |
resolve(Choice choice,
Query query,
Result result,
Resolution resolution)
Chooses the last alternative of any choice
|
void |
resolve(MapChoice choice,
Query query,
Result result,
Resolution resolution)
Chooses a mapping which is always by the literal order given in the source template
|
public static final String nativeId
public DeterministicResolver()
protected DeterministicResolver(String id)
public void resolve(Choice choice, Query query, Result result, Resolution resolution)
resolve
in class Resolver
choice
- the choice to resolvequery
- the query for which this should be resolved, typically used to extract featuresresult
- the result for which this should be resolved, typically used to extract featuresresolution
- the set of resolutions made so far, to which this should be added:
resolution.addChoiceResolution(choice,chosenAlternativeIndex)
public void resolve(MapChoice choice, Query query, Result result, Resolution resolution)
resolve
in class Resolver
choice
- the choice to resolvequery
- the query for which this should be resolved, typically used to extract featuresresult
- the result for which this should be resolved, typically used to extract featuresresolution
- the set of resolutions made so far, to which this should be added:
resolution.addMapChoiceResolution(choice,chosenMapping)
Copyright © 2018. All rights reserved.