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
|
// file : hocr.i
%module hocr
%{
#include "../../src/hocrpp.h"
%}
%typemap(out) string_data {
$result = PyString_FromStringAndSize($1.data,$1.size);
}
%include ../../src/ho_pixbuf.h
%include ../../src/ho_array.h
%include ../../src/ho_array_hist.h
%include ../../src/ho_array_stat.h
%include ../../src/ho_bitmap.h
%include ../../src/ho_bitmap_hist.h
%include ../../src/ho_objmap.h
%include ../../src/ho_layout.h
%include ../../src/ho_dimentions.h
%include ../../src/ho_segment.h
%include ../../src/ho_font.h
%include ../../src/ho_recognize.h
%include ../../src/ho_linguistics.h
%include ../../src/ho_recognize_nikud.h
%include ../../src/ho_string.h
%include ../../src/hocr.h
%include ../../src/hocrpp.h
// on linux do:
// swig -python -c++ hocr.i
// g++ -fpic -c hocr_wrap.cxx -I/usr/include/python2.3
// g++ -shared .../../src/.libs/libhocr.so hocr_wrap.o -o _hocr.so
|