File size: 693 Bytes
69fb171 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
%module CRFPP
%include exception.i
%{
#include "crfpp.h"
%}
%newobject surface;
%exception {
try { $action }
catch (char *e) { SWIG_exception (SWIG_RuntimeError, e); }
catch (const char *e) { SWIG_exception (SWIG_RuntimeError, (char*)e); }
}
%feature("notabstract") CRFPP::Tagger;
%ignore CRFPP::createTagger;
%ignore CRFPP::getTaggerError;
%extend CRFPP::Tagger { Tagger(const char *argc); }
%{
void delete_CRFPP_Tagger (CRFPP::Tagger *t) {
delete t;
t = 0;
}
CRFPP::Tagger* new_CRFPP_Tagger (const char *arg) {
CRFPP::Tagger *tagger = CRFPP::createTagger(arg);
if (! tagger) throw CRFPP::getTaggerError();
return tagger;
}
%}
%include ../crfpp.h
%include version.h
|