public class NGramGenerator extends Object
| Constructor and Description |
|---|
NGramGenerator() |
| Modifier and Type | Method and Description |
|---|---|
ArrayList<String> |
generateTokenNGrams(String[] tokens,
int currPos,
int ngramSize)
generates ngrams of size ngramSize
|
ArrayList<String> |
generateTokenNGrams(String[] tokens,
int currPos,
int[] ngramSizes)
generates ngrams of all sizes specified in ngramSizes
|
static void |
main(String[] args) |
public ArrayList<String> generateTokenNGrams(String[] tokens, int currPos, int[] ngramSizes)
tokens - tokens of the sentencecurrPos - the current position relative to which the ngrams are to be
buildthe - ngramSizs of the ngramspublic ArrayList<String> generateTokenNGrams(String[] tokens, int currPos, int ngramSize)
tokens - tokens of the sentencecurrPos - the current position relative to which the ngrams are to be
buildngramSize - the size of the ngramspublic static void main(String[] args)
Copyright © 2018 JULIE Lab, Germany. All Rights Reserved.