@@ -259,10 +259,10 @@ cdef extern from "patternstore.h":
259259 Pattern getpattern(IndexReference& ,int ) except + KeyError # PatternPointer in reality
260260 vector[pair[IndexReference,PatternPointer]] findpattern(Pattern,int sentence,bool instantiate) nogil # high level
261261 PatternPointer getinstance(IndexReference begin, PatternPointer pattern) nogil # low level (alias for findpattern), returns ngrams since outputcategory uses default parameter NGRAM in C++ code
262- int operator[](IndexReference& ) except + KeyError nogil
262+ int operator[](IndexReference& ) nogil except + KeyError
263263 int sentencelength(int ) nogil
264264 int sentences() nogil
265- Pattern getsentence(int ) except + KeyError nogil # PatternPointer in reality
265+ Pattern getsentence(int ) nogil except + KeyError # PatternPointer in reality
266266
267267 cdef cppclass AlignedPatternMap[ValueType, ValueHandler, NestedSizeType]:
268268 cppclass iterator:
@@ -292,24 +292,24 @@ cdef extern from "patternstore.h":
292292
293293cdef extern from " classdecoder.h" :
294294 cdef cppclass ClassDecoder:
295- ClassDecoder() except + nogil
296- ClassDecoder(string& ) except + nogil
295+ ClassDecoder() nogil except +
296+ ClassDecoder(string& ) nogil except +
297297 void load(string& ) nogil
298298 int size() nogil
299299 string decodefiletostring(string& , int begin = 0 , int end = 0 , bool quiet = False ) nogil
300300
301301cdef extern from " classencoder.h" :
302302 cdef cppclass ClassEncoder:
303- ClassEncoder(int minlength = 0 , int maxlength = 0 ) except + nogil
304- ClassEncoder(string, int minlength = 0 , int maxlength = 0 ) except + nogil
303+ ClassEncoder(int minlength = 0 , int maxlength = 0 ) nogil except +
304+ ClassEncoder(string, int minlength = 0 , int maxlength = 0 ) nogil except +
305305 void load(string, int minlength, int maxlength) nogil
306306 int size() nogil
307307 void processcorpus(string filename, unordered_map[string,unsigned int ]) nogil
308308 void buildclasses(unordered_map[string,unsigned int ] & , int threshold = 0 ) nogil
309309 void build(string& filename,int threshold = 0 ) nogil # build a class from this dataset
310310 void encodefile(string& , string& , bool allowunknown, bool autoaddunknown, bool append,bool ignorenewlines, bool quiet) nogil
311311 void save(string& )
312- Pattern buildpattern(string& , bool allowunknown, bool autoaddunknown) except + nogil
312+ Pattern buildpattern(string& , bool allowunknown, bool autoaddunknown) nogil except +
313313
314314cdef extern from " patternmodel.h" :
315315 cdef cppclass PatternModelOptions:
@@ -374,8 +374,8 @@ cdef extern from "patternmodel.h":
374374
375375 void insert(Pattern& ) nogil
376376
377- void load(string, PatternModelOptions) except + IOError nogil
378- void write(string) except + IOError nogil
377+ void load(string, PatternModelOptions) nogil except + IOError
378+ void write(string) nogil except + IOError
379379
380380 cdef cppclass PatternModel[ValueType,ValueHandler,MapType]:
381381 cppclass iterator:
@@ -416,8 +416,8 @@ cdef extern from "patternmodel.h":
416416 bool erase(Pattern& ) nogil
417417 unsigned int prune(int threshold, int n) nogil
418418 iterator find(Pattern& ) nogil
419- void load(string, PatternModelOptions, PatternModelInterface* ) except + IOError nogil
420- void write(string) except + IOError nogil
419+ void load(string, PatternModelOptions, PatternModelInterface* ) nogil except + IOError
420+ void write(string) nogil except + IOError
421421 void printmodel(ostream, ClassDecoder& ) nogil
422422 void printpattern(ostream, ClassDecoder& , Pattern& ,bool instantiate = false,bool eol = true) nogil
423423 void report(ostream) nogil
@@ -484,8 +484,8 @@ cdef extern from "patternmodel.h":
484484 bool erase(Pattern& ) nogil
485485 unsigned int prune(int threshold, int n) nogil
486486 iterator find(Pattern& ) nogil
487- void load(string, PatternModelOptions, PatternModelInterface* ) except + IOError nogil
488- void write(string) except + IOError nogil
487+ void load(string, PatternModelOptions, PatternModelInterface* ) nogil except + IOError
488+ void write(string) nogil except + IOError
489489 void printmodel(ostream, ClassDecoder& ) nogil
490490 void printpattern(ostream, ClassDecoder& , Pattern& ,bool instantiate = false,bool eol = true) nogil
491491 void report(ostream) nogil
@@ -548,8 +548,8 @@ cdef extern from "alignmodel.h":
548548 iterator erase(Pattern& ) nogil
549549 iterator find(Pattern& ) nogil
550550
551- void load(string& , PatternModelOptions) except + IOError nogil
552- void write(string& ) except + IOError nogil
551+ void load(string& , PatternModelOptions) nogil except + IOError
552+ void write(string& ) nogil except + IOError
553553
554554 cdef cppclass BasicPatternAlignmentModel:
555555 cppclass iterator:
@@ -582,5 +582,5 @@ cdef extern from "alignmodel.h":
582582 iterator erase(Pattern& ) nogil
583583 iterator find(Pattern& ) nogil
584584
585- void load(string& , PatternModelOptions) except + IOError nogil
586- void write(string& ) except + IOError nogil
585+ void load(string& , PatternModelOptions) nogil except + IOError
586+ void write(string& ) nogil except + IOError
0 commit comments