use of com.graphaware.nlp.dsl.request.CustomModelsRequest in project neo4j-nlp by graphaware.
the class TextProcessorsProcedure method test.
@Procedure(name = "ga.nlp.processor.test", mode = Mode.WRITE)
@Description("Procedure for testing custom models.")
public Stream<SingleResult> test(@Name("customModelsRequest") Map<String, Object> customModelsRequest) {
try {
CustomModelsRequest request = CustomModelsRequest.fromMap(customModelsRequest);
Object result = getNLPManager().test(request);
return Stream.of(new SingleResult(result));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
use of com.graphaware.nlp.dsl.request.CustomModelsRequest in project neo4j-nlp by graphaware.
the class TextProcessorsProcedure method train.
@Procedure(name = "ga.nlp.processor.train", mode = Mode.WRITE)
@Description("Procedure for training custom models.")
public Stream<SingleResult> train(@Name("customModelsRequest") Map<String, Object> customModelsRequest) {
try {
CustomModelsRequest request = CustomModelsRequest.fromMap(customModelsRequest);
Object result = getNLPManager().train(request);
return Stream.of(new SingleResult(result));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations