/** * Returns whether a chunk started between the previous and current token * @param prev - the label/tag/type of the previous token * @param cur - the label/tag/type of the current token * @return true if the current token was the first token of a chunk */ public static boolean isStartOfChunk(LabelTagType prev, LabelTagType cur) { if (prev == null) { return isStartOfChunk("O", "O", cur.tag, cur.type); } else { return isStartOfChunk(prev.tag, prev.type, cur.tag, cur.type); } }
if (isStartOfChunk(prevTagType, curTagType) || (!isCompatible && isChunk(curTagType))) { if (tokenBegin >= 0) { throw new RuntimeException("New chunk started, prev chunk not ended yet!");
boolean correctStarted = LabeledChunkIdentifier.isStartOfChunk(prevCorrect, correct); boolean guessStarted = LabeledChunkIdentifier.isStartOfChunk(prevGuess, guess); if ( correctStarted && guessStarted && guess.typeMatches(correct)) { inCorrect = true;
/** * Returns whether a chunk started between the previous and current token * @param prev - the label/tag/type of the previous token * @param cur - the label/tag/type of the current token * @return true if the current token was the first token of a chunk */ public static boolean isStartOfChunk(LabelTagType prev, LabelTagType cur) { if (prev == null) { return isStartOfChunk("O", "O", cur.tag, cur.type); } else { return isStartOfChunk(prev.tag, prev.type, cur.tag, cur.type); } }
/** * Returns whether a chunk started between the previous and current token * @param prev - the label/tag/type of the previous token * @param cur - the label/tag/type of the current token * @return true if the current token was the first token of a chunk */ public static boolean isStartOfChunk(LabelTagType prev, LabelTagType cur) { if (prev == null) { return isStartOfChunk("O", "O", cur.tag, cur.type); } else { return isStartOfChunk(prev.tag, prev.type, cur.tag, cur.type); } }
/** * Returns whether a chunk started between the previous and current token * @param prev - the label/tag/type of the previous token * @param cur - the label/tag/type of the current token * @return true if the current token was the first token of a chunk */ public static boolean isStartOfChunk(LabelTagType prev, LabelTagType cur) { if (prev == null) { return isStartOfChunk("O", "O", cur.tag, cur.type); } else { return isStartOfChunk(prev.tag, prev.type, cur.tag, cur.type); } }
tokenBegin = -1; if (isStartOfChunk(prevTagType, curTagType)) { if (tokenBegin >= 0) { throw new RuntimeException("New chunk started, prev chunk not ended yet!");
tokenBegin = -1; if (isStartOfChunk(prevTagType, curTagType)) { if (tokenBegin >= 0) { throw new RuntimeException("New chunk started, prev chunk not ended yet!");
if (isStartOfChunk(prevTagType, curTagType) || (!isCompatible && isChunk(curTagType))) { if (tokenBegin >= 0) { throw new RuntimeException("New chunk started, prev chunk not ended yet!");
boolean correctStarted = LabeledChunkIdentifier.isStartOfChunk(prevCorrect, correct); boolean guessStarted = LabeledChunkIdentifier.isStartOfChunk(prevGuess, guess); if ( correctStarted && guessStarted && guess.typeMatches(correct)) { inCorrect = true;
boolean correctStarted = chunker.isStartOfChunk(prevCorrect, correct); boolean guessStarted = chunker.isStartOfChunk(prevGuess, guess); if ( correctStarted && guessStarted && guess.typeMatches(correct)) { inCorrect = true;
boolean correctStarted = chunker.isStartOfChunk(prevCorrect, correct); boolean guessStarted = chunker.isStartOfChunk(prevGuess, guess); if ( correctStarted && guessStarted && guess.typeMatches(correct)) { inCorrect = true;