Package de.julielab.jcore.ae.jpos.pipes
Class NGramGenerator
- java.lang.Object
-
- de.julielab.jcore.ae.jpos.pipes.NGramGenerator
-
public class NGramGenerator extends Object
-
-
Constructor Summary
Constructors Constructor Description NGramGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayList<String>generateTokenNGrams(String[] tokens, int currPos, int ngramSize)generates ngrams of size ngramSizeArrayList<String>generateTokenNGrams(String[] tokens, int currPos, int[] ngramSizes)generates ngrams of all sizes specified in ngramSizesstatic voidmain(String[] args)
-
-
-
Method Detail
-
generateTokenNGrams
public ArrayList<String> generateTokenNGrams(String[] tokens, int currPos, int[] ngramSizes)
generates ngrams of all sizes specified in ngramSizes- Parameters:
tokens- tokens of the sentencecurrPos- the current position relative to which the ngrams are to be buildthe- ngramSizs of the ngrams
-
generateTokenNGrams
public ArrayList<String> generateTokenNGrams(String[] tokens, int currPos, int ngramSize)
generates ngrams of size ngramSize- Parameters:
tokens- tokens of the sentencecurrPos- the current position relative to which the ngrams are to be buildngramSize- the size of the ngrams
-
main
public static void main(String[] args)
-
-