tokens: You do n't need a BitArray , you can create the mask from shifting an integer , and use BitConverter.GetBytes to get it as bytes :
ner_tags: O O O O O B-Class O O O O O O O O O B-Data_Type O O O B-Function O O O O B-Data_Type O