1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package de.fu_berlin.ties.extract.amend;
23
24 import java.util.List;
25
26 import de.fu_berlin.ties.ContextMap;
27 import de.fu_berlin.ties.ProcessingException;
28 import de.fu_berlin.ties.context.ContextDetails;
29 import de.fu_berlin.ties.extract.ExtractionContainer;
30
31 /***
32 * Implemtations of this interface signal that they are able to re-analyse the
33 * all extractions in a document and perform suitable amendments to improve
34 * results.
35 *
36 * @author Christian Siefkes
37 * @version $Revision: 1.7 $, $Date: 2006/10/21 16:04:15 $, $Author: siefkes $
38 */
39 public interface FinalReextractor {
40
41 /***
42 * Re-extract all extractions in a document at the end of the document,
43 * considering the complete states of all tokens.
44 *
45 * @param originalExtractions the original extractions predicted for this
46 * document
47 * @param contextDetails a list of context details representing all
48 * tokens in the document
49 * @param context a map of context object provided by the combination
50 * strategy
51 * @return the predicted extractions
52 * @throws ProcessingException if an error occurs during processing
53 */
54 ExtractionContainer reextract(final ExtractionContainer originalExtractions,
55 final List<ContextDetails> contextDetails, final ContextMap context)
56 throws ProcessingException;
57
58 /***
59 * Trains the re-extractor on a document.
60 *
61 * @param answerKeys the true extractions to train for this document
62 * @param contextDetails a list of context details representing all
63 * tokens in the document
64 * @param context a map of context object provided by the combination
65 * strategy
66 * @throws ProcessingException if an error occurs during processing
67 */
68 void train(final ExtractionContainer answerKeys,
69 final List<ContextDetails> contextDetails, final ContextMap context)
70 throws ProcessingException;
71
72 }