def fit(self, text, epochs=EPOCHS):
logger.debug("<STR_LIT>")<EOL>Phi = []<EOL>Y = []<EOL>for (L, P, R, gold, _) in Detector.candidates(text):<EOL><INDENT>Phi.append(self.extract_one(L, P, R))<EOL>Y.append(gold)<EOL><DEDENT>self.classifier.fit(Y, Phi, epochs)<EOL>logger.debug("<STR_LIT>")<EOL>
Given a string `text`, use it to train the segmentation classifier for `epochs` iterations.