public TreeMultimap < Integer , String > getMFSRanking ( final String lemmaPOSClass , final Integer rankSize ) { final TreeMultimap < Integer , String > mfsResultsMap = getOrderedMap ( lemmaPOSClass ) ; final TreeMultimap < Integer , String > mfsRankMap = TreeMultimap . create ( Ordering . natural ( ) . reverse ( ) , Ordering . natural ( ) ) ; for ( final Map . Entry < Integer , String > freqSenseEntry : Iterables . limit ( mfsResultsMap . entries ( ) , rankSize ) ) { mfsRankMap . put ( freqSenseEntry . getKey ( ) , freqSenseEntry . getValue ( ) ) ; } return mfsRankMap ; }
Get a rank of senses ordered by MFS .