public Sequence[] topKLemmaClasses(String[] sentence, String[] tags, double minSequenceScore) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, minSequenceScore, contextGenerator, sequenceValidator); } }
public Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, minSequenceScore, contextGenerator, sequenceValidator); }
public Sequence[] topKLemmaClasses(String[] sentence, String[] tags) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, Object[] additionaContext) { return model.bestSequences(size, sentence, additionaContext, contextGen, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, minSequenceScore, contextGenerator, sequenceValidator); }
/** * Returns at most the specified number of taggings for the specified sentence. * * @param numTaggings The number of tagging to be returned. * @param sentence An array of tokens which make up a sentence. * * @return At most the specified number of taggings for the specified sentence. */ public String[][] tag(int numTaggings, String[] sentence) { Sequence[] bestSequences = model.bestSequences(numTaggings, sentence, null, contextGen, sequenceValidator); String[][] tags = new String[bestSequences.length][]; for (int si = 0; si < tags.length; si++) { List<String> t = bestSequences[si].getOutcomes(); tags[si] = t.toArray(new String[t.size()]); } return tags; }
/** * Predict all possible lemmas (using a default upper bound). * @param numLemmas the default number of lemmas * @param toks the tokens * @param tags the postags * @return a double array containing all posible lemmas for each token and postag pair */ public String[][] predictLemmas(int numLemmas, String[] toks, String[] tags) { Sequence[] bestSequences = model.bestSequences(numLemmas, toks, new Object[] {tags}, contextGenerator, sequenceValidator); String[][] allLemmas = new String[bestSequences.length][]; for (int i = 0; i < allLemmas.length; i++) { List<String> ses = bestSequences[i].getOutcomes(); String[] sesArray = ses.toArray(new String[ses.size()]); allLemmas[i] = decodeLemmas(toks,sesArray); } return allLemmas; }
public Sequence[] topKLemmaClasses(String[] sentence, String[] tags) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, minSequenceScore, contextGenerator, sequenceValidator); }
public Sequence[] topKLemmaClasses(String[] sentence, String[] tags, double minSequenceScore) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, minSequenceScore, contextGenerator, sequenceValidator); }
public Sequence[] topKLemmaClasses(String[] sentence, String[] tags, double minSequenceScore) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, minSequenceScore, contextGenerator, sequenceValidator); } }
public Sequence[] topKLemmaClasses(String[] sentence, String[] tags, double minSequenceScore) { return model.bestSequences(DEFAULT_BEAM_SIZE, sentence, new Object[] { tags }, minSequenceScore, contextGenerator, sequenceValidator); } }
public Sequence[] topKSequences(String[] sentence, String[] tags) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, minSequenceScore, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore) { return model.bestSequences(DEFAULT_BEAM_SIZE, TokenTag.create(sentence, tags), new Object[] { }, minSequenceScore, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore) { return model.bestSequences(DEFAULT_BEAM_SIZE, TokenTag.create(sentence, tags), new Object[] { }, minSequenceScore, contextGenerator, sequenceValidator); }
public Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, minSequenceScore, contextGenerator, sequenceValidator); }