Search in sources :

Example 1 with HOGMModelParsing

use of com.sri.ai.praise.core.inference.byinputrepresentation.classbased.hogm.parsing.HOGMModelParsing in project aic-praise by aic-sri-international.

the class UsefulOperationsParameterEstimation method parseModelStringToHOGMModel.

/**
 * To convert a model String into a HOGModel.
 */
public static HOGModel parseModelStringToHOGMModel(String modelString, List<HOGMProblemError> modelErrors) {
    HOGMModelParsing parsingWithErrorCollecting = new HOGMModelParsing(modelString, modelErrors);
    HOGModel result = parsingWithErrorCollecting.getModel();
    return result;
}
Also used : HOGMModelParsing(com.sri.ai.praise.core.inference.byinputrepresentation.classbased.hogm.parsing.HOGMModelParsing) HOGModel(com.sri.ai.praise.core.representation.classbased.hogm.HOGModel)

Example 2 with HOGMModelParsing

use of com.sri.ai.praise.core.inference.byinputrepresentation.classbased.hogm.parsing.HOGMModelParsing in project aic-praise by aic-sri-international.

the class HOGMMultiQueryProblemSolver method initializeModel.

private void initializeModel(String modelString) {
    HOGMModelParsing parsingWithErrorCollecting = new HOGMModelParsing(modelString, modelErrors);
    this.hogmModel = parsingWithErrorCollecting.getModel();
    this.expressionBasedModel = hogmModel == null ? null : new HOGMExpressionBasedModel(hogmModel);
    if (this.expressionBasedModel != null) {
        this.expressionBasedModel.setProceduralAttachments(proceduralAttachments);
    }
}
Also used : HOGMModelParsing(com.sri.ai.praise.core.inference.byinputrepresentation.classbased.hogm.parsing.HOGMModelParsing) HOGMExpressionBasedModel(com.sri.ai.praise.core.representation.classbased.hogm.components.HOGMExpressionBasedModel)

Aggregations

HOGMModelParsing (com.sri.ai.praise.core.inference.byinputrepresentation.classbased.hogm.parsing.HOGMModelParsing)2 HOGModel (com.sri.ai.praise.core.representation.classbased.hogm.HOGModel)1 HOGMExpressionBasedModel (com.sri.ai.praise.core.representation.classbased.hogm.components.HOGMExpressionBasedModel)1