I'm trying to write javadoc comments for
org.apache.mahout.common.nlp.NGrams. generateNGramsWithoutLabel() makes
sense, but I'm puzzled by the implementation of generateNGrams().

Map<String,List<String>> NGrams.generateNGrams() returns a Map from
'labels' to a list of 'tokens' (where each token is an n-gram of words
separated by single spaces). In the current implementation only a single
('label', list of tokens) pair is put in the map. The 'label' is just the
first word extracted from the specified text. I am guessing that the
returned Map is being used as a pair. What is the significance of the
'label'?

Thank you for your help.

-Timothy Mann

Reply via email to