Java BitSet getLemma(String[] tokens, BitSet bits, String delimiter)

Here you can find the source of getLemma(String[] tokens, BitSet bits, String delimiter)

Description

get Lemma

License

Open Source License

Declaration

public static String getLemma(String[] tokens, BitSet bits, String delimiter) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.BitSet;

public class Main {
    public static String getLemma(String[] tokens, BitSet bits, String delimiter) {
        StringBuffer buf = new StringBuffer();
        for (int i = 0; i < tokens.length; i++) {
            if (i != 0 && !bits.get(i - 1)) {
                buf.append(delimiter);//w  w  w  .j ava2s  .  co  m
            }
            buf.append(tokens[i]);
        }
        return buf.toString();
    }
}

Related

  1. formatBitset(BitSet bitset, int width)
  2. generateBitSetBySize(int size, boolean initValue)
  3. getBiggerRang(BitSet bitSet)
  4. getBitSet()
  5. getBitSetFromBooleanArray(boolean[] buf)
  6. getSetBitIndices(BitSet bitSet)
  7. hammingDistance(BitSet bs1, BitSet bs2)
  8. hasAtLeastOneBitSet(BitSet bitSet, Iterable indexes)
  9. hex2BitSet(byte[] b, int offset, int maxBits)