Even if I flatten the array , how can I eliminate the other entries as earlier it was 5x11x4 . Now it will be 55x4 . Now out of these I want some sentences as 4 is the maximum length. So out of the dimension of 4 I want 2,3,3,4,3 for the 5 sentences in my batch. Do you have an example here please? Thanks