def make_analysator(f):
 def text_analyse(text):
  rv = f(text)
  if (not rv):
   return 0.0
  return min(1.0, max(0.0, float(rv)))
 text_analyse.__doc__ = f.__doc__
 return staticmethod(text_analyse)

def make_analysator ( f ) : def text_analyse ( text ) : rv = f ( text ) if ( not rv ) : return 0.0 return min ( 1.0 , max ( 0.0 , float ( rv ) ) ) text_analyse . __doc__ = f . __doc__ return staticmethod ( text_analyse )
return a static text analysation function that returns float values .