def map32(id, pos=NOUN):
 global _map32_cache
 if (not _map32_cache):
  _map32_cache = open(os.path.join(MODULE, 'dict', 'index.32')).readlines()
  _map32_cache = (x for x in _map32_cache if (x[0] != ';'))
  _map32_cache = dict((x.strip().split(' ') for x in _map32_cache))
 k = (((pos in _map32_pos2) and pos) or _map32_pos1.get(pos, 'x'))
 k += str(id).lstrip('0')
 k = _map32_cache.get(k, None)
 if (k is not None):
  return (int(k[1:]), _map32_pos2[k[0]])
 return None

def map32 ( id , pos = NOUN ) : global _map32_cache if ( not _map32_cache ) : _map32_cache = open ( os . path . join ( MODULE , 'dict' , 'index.32' ) ) . readlines ( ) _map32_cache = ( x for x in _map32_cache if ( x [ 0 ] != ';' ) ) _map32_cache = dict ( ( x . strip ( ) . split ( ' ' ) for x in _map32_cache ) ) k = ( ( ( pos in _map32_pos2 ) and pos ) or _map32_pos1 . get ( pos , 'x' ) ) k += str ( id ) . lstrip ( '0' ) k = _map32_cache . get ( k , None ) if ( k is not None ) : return ( int ( k [ 1 : ] ) , _map32_pos2 [ k [ 0 ] ] ) return None
returns an -tuple with the wordnet2 synset id for the given wordnet3 synset id .