Created
November 24, 2010 18:28
-
-
Save eob/714148 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def initializeToCrfPotentials = { | |
for (tweetIdx <- 0 until _Y.size) { | |
for (tokenIdx <- 0 until _Y(tweetIdx).size) { | |
for (labelIdx <- 0 until _Y(tweetIdx)(tokenIdx).size) { | |
// Note: the +1 in token index is because of the <S> token at the beginning | |
// of the CRF potentials. | |
logger.info(tweetIdx + " " + tokenIdx + " " + labelIdx) | |
_Y(tweetIdx)(tokenIdx)(labelIdx) = _crfPotentials(tweetIdx)(tokenIdx + 1)(labelIdx) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment