use of com.graphaware.nlp.dsl.request.TextRankPostprocessRequest in project neo4j-nlp by graphaware.
the class TextRankProcedure method textRankPostprocess.
@Procedure(name = "ga.nlp.ml.textRank.postprocess", mode = Mode.WRITE)
@Description("TextRank post-processing procedure")
public Stream<SingleResult> textRankPostprocess(@Name("textRankRequest") Map<String, Object> textRankRequest) {
try {
TextRankPostprocessRequest request = TextRankPostprocessRequest.fromMap(textRankRequest);
TextRankProcessor processor = (TextRankProcessor) getNLPManager().getExtension(TextRankProcessor.class);
return Stream.of(processor.postprocess(request));
} catch (Exception e) {
LOG.error("ERROR in TextRank", e);
throw new RuntimeException(e);
}
}
Aggregations