public char match ( ISense source , ISense target ) { String sSynset = source . getGloss ( ) ; String tSynset = target . getGloss ( ) ; StringTokenizer stSource = new StringTokenizer ( sSynset , " ,.\"'();" ) ; String lemmaS , lemmaT ; int counter = 0 ; while ( stSource . hasMoreTokens ( ) ) { StringTokenizer stTarget = new StringTokenizer ( tSynset , " ,.\"'();" ) ; lemmaS = stSource . nextToken ( ) ; if ( ! meaninglessWords . contains ( lemmaS ) ) while ( stTarget . hasMoreTokens ( ) ) { lemmaT = stTarget . nextToken ( ) ; if ( ! meaninglessWords . contains ( lemmaT ) ) if ( lemmaS . equals ( lemmaT ) ) counter ++ ; } } if ( counter >= threshold ) return IMappingElement . EQUIVALENCE ; else return IMappingElement . IDK ; }
Computes the relations with WordNet gloss comparison matcher .