public static IChunk[] getLargestSingleMorphemicFreedomChunks(IChunk[] chunks) 
    {
        double largestFreedom = chunks[0].getSingleWordsMorphemicFreedom();
        int j;
        
        //find the maximum sum of single morphemic freedom
        for ( j = 1; j < chunks.length; j++ ) {
            if ( chunks[j].getSingleWordsMorphemicFreedom() > largestFreedom ) {
                largestFreedom = chunks[j].getSingleWordsMorphemicFreedom();
            }
        }
        
        //get the items that the word length equals to
        //the max's length.
        ArrayList<IChunk> chunkArr = new ArrayList<IChunk>(chunks.length);
        for ( j = 0; j < chunks.length; j++ ) {
            if ( chunks[j].getSingleWordsMorphemicFreedom() == largestFreedom) {
                chunkArr.add(chunks[j]);
            }
        }
        
        IChunk[] lchunk = new IChunk[chunkArr.size()];
        chunkArr.toArray(lchunk);
        chunkArr.clear();
        
        return lchunk;
    }
public static IChunk [ ] getLargestSingleMorphemicFreedomChunks ( IChunk [ ] chunks ) { double largestFreedom = chunks [ 0 ] . getSingleWordsMorphemicFreedom ( ) ; int j ; for ( j = 1 ; j < chunks . length ; j ++ ) { if ( chunks [ j ] . getSingleWordsMorphemicFreedom ( ) > largestFreedom ) { largestFreedom = chunks [ j ] . getSingleWordsMorphemicFreedom ( ) ; } } ArrayList < IChunk > chunkArr = new ArrayList < IChunk > ( chunks . length ) ; for ( j = 0 ; j < chunks . length ; j ++ ) { if ( chunks [ j ] . getSingleWordsMorphemicFreedom ( ) == largestFreedom ) { chunkArr . add ( chunks [ j ] ) ; } } IChunk [ ] lchunk = new IChunk [ chunkArr . size ( ) ] ; chunkArr . toArray ( lchunk ) ; chunkArr . clear ( ) ; return lchunk ; }
the largest sum of degree of morphemic freedom of one-character words
this rule will return the chunks that own the largest sum of degree of morphemic freedom
of one-character