/** * Returns the sum of the counts of all character sequences one character longer than the * specified character sequence. * * @param cSeq Character sequence. * @return The sum of the counts of all character sequences one character longer than the * specified character sequence. */ public long extensionCount(CharSequence cSeq) { return mRootNode.contextCount(com.aliasi.util.Arrays.toArray(cSeq), 0, cSeq.length()); }
/** * Increments by the specified count all substrings of the specified character sequence up to the * maximum length specified in the constructor. * * @param cSeq Character sequence. * @param count Amount to increment. */ public void incrementSubstrings(CharSequence cSeq, int count) { incrementSubstrings(com.aliasi.util.Arrays.toArray(cSeq), 0, cSeq.length(), count); }
/** * Returns the count in the training corpus for the specified sequence of characters. The count * returned may have been reduced from the raw counts in training cases by pruning. * * @param cSeq Character sequence. * @return Count of character sequence in model. */ public long count(CharSequence cSeq) { return count(com.aliasi.util.Arrays.toArray(cSeq), 0, cSeq.length()); }