Search in sources :

Example 1 with PageRankRequest

use of com.graphaware.nlp.dsl.request.PageRankRequest in project neo4j-nlp by graphaware.

the class PageRankProcedure method computePageRank.

@Procedure(name = "ga.nlp.ml.pageRank", mode = Mode.WRITE)
@Description("PageRank procedure")
public Stream<SingleResult> computePageRank(@Name("pageRankRequest") Map<String, Object> pageRankRequest) {
    PageRankRequest request = mapper.convertValue(pageRankRequest, PageRankRequest.class);
    PageRankProcessor processor = (PageRankProcessor) getNLPManager().getExtension(PageRankProcessor.class);
    return Stream.of(processor.process(request));
}
Also used : PageRankProcessor(com.graphaware.nlp.ml.pagerank.PageRankProcessor) PageRankRequest(com.graphaware.nlp.dsl.request.PageRankRequest) Description(org.neo4j.procedure.Description) Procedure(org.neo4j.procedure.Procedure)

Aggregations

PageRankRequest (com.graphaware.nlp.dsl.request.PageRankRequest)1 PageRankProcessor (com.graphaware.nlp.ml.pagerank.PageRankProcessor)1 Description (org.neo4j.procedure.Description)1 Procedure (org.neo4j.procedure.Procedure)1