public List<PhraseMatch> findAllMatches(List<Phrase> acceptablePhrases, WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(acceptablePhrases, tokens, tokenStart, tokenEnd, needNormalization, true /* find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findMatches(WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(null, tokens, tokenStart, tokenEnd, needNormalization, false /* don't need to find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findMatches(String text, int tokenStart, int tokenEnd, boolean needNormalization) { WordList tokens = toNormalizedWordList(text); return findMatches(tokens, tokenStart, tokenEnd, false); }
protected Collection<Interval<Integer>> match(List<? extends CoreMap> nodes, int start) { PhraseTable.WordList words = new PhraseTable.TokenList(nodes, textKey); List<PhraseTable.PhraseMatch> matches = phraseTable.findMatches(words, start, nodes.size(), false); Collection<Interval<Integer>> intervals = new ArrayList<>(matches.size()); for (PhraseTable.PhraseMatch match:matches) { intervals.add(match.getInterval()); } return intervals; }
public List<PhraseMatch> findAllMatches(WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(null, tokens, tokenStart, tokenEnd, needNormalization, true /* find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findMatches(String text) { WordList tokens = toNormalizedWordList(text); return findMatches(tokens, 0, tokens.size(), false); }
public List<PhraseMatch> findAllMatches(List<Phrase> acceptablePhrases, WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(acceptablePhrases, tokens, tokenStart, tokenEnd, needNormalization, true /* find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findAllMatches(List<Phrase> acceptablePhrases, WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(acceptablePhrases, tokens, tokenStart, tokenEnd, needNormalization, true /* find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findAllMatches(List<Phrase> acceptablePhrases, WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(acceptablePhrases, tokens, tokenStart, tokenEnd, needNormalization, true /* find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findMatches(WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(null, tokens, tokenStart, tokenEnd, needNormalization, false /* don't need to find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findMatches(WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(null, tokens, tokenStart, tokenEnd, needNormalization, false /* don't need to find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findMatches(WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(null, tokens, tokenStart, tokenEnd, needNormalization, false /* don't need to find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findMatches(String text, int tokenStart, int tokenEnd, boolean needNormalization) { WordList tokens = toNormalizedWordList(text); return findMatches(tokens, tokenStart, tokenEnd, false); }
public List<PhraseMatch> findMatches(String text, int tokenStart, int tokenEnd, boolean needNormalization) { WordList tokens = toNormalizedWordList(text); return findMatches(tokens, tokenStart, tokenEnd, false); }
public List<PhraseMatch> findMatches(String text, int tokenStart, int tokenEnd, boolean needNormalization) { WordList tokens = toNormalizedWordList(text); return findMatches(tokens, tokenStart, tokenEnd, false); }
protected Collection<Interval<Integer>> match(List<? extends CoreMap> nodes, int start) { PhraseTable.WordList words = new PhraseTable.TokenList(nodes, textKey); List<PhraseTable.PhraseMatch> matches = phraseTable.findMatches(words, start, nodes.size(), false); Collection<Interval<Integer>> intervals = new ArrayList<>(matches.size()); for (PhraseTable.PhraseMatch match:matches) { intervals.add(match.getInterval()); } return intervals; }
public List<PhraseMatch> findAllMatches(WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(null, tokens, tokenStart, tokenEnd, needNormalization, true /* find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findMatches(String text) { WordList tokens = toNormalizedWordList(text); return findMatches(tokens, 0, tokens.size(), false); }
public List<PhraseMatch> findAllMatches(WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(null, tokens, tokenStart, tokenEnd, needNormalization, true /* find all */, false /* don't need to match end exactly */); }
public List<PhraseMatch> findAllMatches(WordList tokens, int tokenStart, int tokenEnd, boolean needNormalization) { return findMatches(null, tokens, tokenStart, tokenEnd, needNormalization, true /* find all */, false /* don't need to match end exactly */); }