Search in sources :

Example 1 with Word2VecRequest

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

the class Word2VecProcedure method attachConcepts.

@Procedure(name = "ga.nlp.ml.word2vec.attach", mode = Mode.WRITE)
@Description("For each tag attach the related word2vec value")
public Stream<SingleResult> attachConcepts(@Name("input") Map<String, Object> word2VecRequest) {
    Word2VecRequest request = Word2VecRequest.fromMap(word2VecRequest);
    Word2VecProcessor word2VecProcessor = (Word2VecProcessor) getNLPManager().getExtension(Word2VecProcessor.class);
    int processed = word2VecProcessor.attach(request);
    return Stream.of(new SingleResult(processed));
}
Also used : SingleResult(com.graphaware.nlp.dsl.result.SingleResult) Word2VecRequest(com.graphaware.nlp.dsl.request.Word2VecRequest) Word2VecProcessor(com.graphaware.nlp.ml.word2vec.Word2VecProcessor)

Aggregations

Word2VecRequest (com.graphaware.nlp.dsl.request.Word2VecRequest)1 SingleResult (com.graphaware.nlp.dsl.result.SingleResult)1 Word2VecProcessor (com.graphaware.nlp.ml.word2vec.Word2VecProcessor)1