Class NGramExtractor

    • Method Detail

      • builder

        public static NGramExtractor.Builder builder​(int n)
        Creates a builder initialized to extract n-grams of the given order.
        Parameters:
        n - the n-gram order
        Returns:
        the builder
      • builder

        public static NGramExtractor.Builder builder​(int minOrder,
                                                     int maxOrder)
        Creates a builder initialized to extract n-grams ranging from the given minimum to the given maximum order.
        Parameters:
        minOrder - the minimum order
        maxOrder - the maximum order
        Returns:
        the builder
      • extractStringTuples

        public List<Tuple> extractStringTuples​(@NonNull
                                               @NonNull HString hString)
        Extracts NGrams as a List of String tuples.
        Parameters:
        hString - the input text
        Returns:
        the list of String tuples