private char getDominantRelation ( String sExtendedGloss , String tExtendedGloss ) throws MatcherLibraryException { int Equals = 0 ; int moreGeneral = 0 ; int lessGeneral = 0 ; int Opposite = 0 ; StringTokenizer stSource = new StringTokenizer ( sExtendedGloss , " ,.\"'()" ) ; String lemmaS , lemmaT ; while ( stSource . hasMoreTokens ( ) ) { StringTokenizer stTarget = new StringTokenizer ( tExtendedGloss , " ,.\"'()" ) ; lemmaS = stSource . nextToken ( ) ; if ( ! meaninglessWords . contains ( lemmaS ) ) { while ( stTarget . hasMoreTokens ( ) ) { lemmaT = stTarget . nextToken ( ) ; if ( ! meaninglessWords . contains ( lemmaT ) ) { if ( isWordLessGeneral ( lemmaS , lemmaT ) ) { lessGeneral ++ ; } else if ( isWordMoreGeneral ( lemmaS , lemmaT ) ) { moreGeneral ++ ; } else if ( isWordSynonym ( lemmaS , lemmaT ) ) { Equals ++ ; } else if ( isWordOpposite ( lemmaS , lemmaT ) ) { Opposite ++ ; } } } } } return getRelationFromInts ( lessGeneral , moreGeneral , Equals , Opposite ) ; }
Gets Semantic relation occurring more frequently between words in two extended glosses .