00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef Tanl_NER_NerEventStream_H
00025 #define Tanl_NER_NerEventStream_H
00026
00027 #include "NerFeatureExtractor.h"
00028
00029 namespace Tanl {
00030 namespace NER {
00031
00033 extern IXE::conf<bool> dumpEvents;
00034
00040 class NerEventStream : public Classifier::EventStream
00041 {
00042 public:
00043 NerEventStream(Resources& resources);
00044
00046 void analyze(Sentence* sent, int zone = 3) {
00047 sentence = sent;
00048 position = 0;
00049 featureExtractor.analyze(sent, zone);
00050 }
00051
00052 bool hasNext();
00053
00054 Classifier::Event* next();
00055
00057 void reset() { featureExtractor.reset(); }
00058
00060 void predicted(char const* netag, int position = -1);
00061
00062 private:
00063 NerFeatureExtractor featureExtractor;
00064 Sentence* sentence;
00065 int position;
00066
00067 };
00068
00069 }
00070 }
00071
00072 #endif // Tanl_NER_NerEventStream_H