nltk.sem.Expression.typecheck

Expression.typecheck(signature=None)[source]

Infer and check types. Raise exceptions if necessary.

Parameters:signature – dict that maps variable names to types (or string representations of types)
Returns:the signature, plus any additional type mappings