C++ Native Functions: com.ibm.streamsx.nlp

Toolkits > com.ibm.streamsx.nlp 1.9.2 > com.ibm.streamsx.nlp > C++ Native Functions

This page documents native functions that can be invoked from SPL, including the SPL interfaces that can be used to invoke each of the native functions.

Functions

public list<uint32> countNgrams(rstring data, uint32 n)

This function counts each n-gram in the string and places the counter in the result list at the same index as located in the string.

public map<rstring,uint32> getNgrams(rstring data, uint32 n)

This function counts each n-gram in the string and places the n-gram and the counter in the result map as a key/value pair.