I am reading a file in java which has .lab extension which is basically a text file with utf characters and has content as follows:
0.100904 125 SIL 0.392625 125 तुझ्_beg 0.622405 125 या_end 0.623404 125 SIL 0.946096 125 ले_beg 1.120000 125 मळ्_mid 1.362698 125 या_end 1.363697 125 SIL
but in program when i compare as follows:
arr[2].equals("SIL")
it doesn't work. entire java code is as follows:
public class SyllableCount 
{
static final File labDir = new File("/media/sda6/tts/programs/MyWork/silence_handling/labs_4");
static final HashMap<String, ArrayList<Float>> terminalSyllMap = new HashMap<String, ArrayList<Float>> ();
public void accessFilesForFolder(final File labDir) 
{
    System.out.println("in method");
    for (final File labFile : labDir.listFiles()) 
    {
        if (labFile.isDirectory()) 
        {
            accessFilesForFolder(labFile); //for recursive operation
        } else 
        {
            System.out.println(labFile.getName());
            BufferedReader br = null;
            String[] syllable = new String[100];//just an example-you have to initialize it big enough to hold all lines
            float[] timeFrame = new float [100];
            String sCurrentLine;
            try 
            {
                //br = new BufferedReader(new FileReader(labFile));
                br = new BufferedReader(new InputStreamReader(new FileInputStream(labFile), "UTF8"));
                int lineNo=0;
                while ((sCurrentLine = br.readLine()) != null) 
                {
                    String[] arr = sCurrentLine.split(" ");
                    //for the first line it'll print
                    if(arr[0].equalsIgnoreCase("#"))
                    {
                        lineNo++;
                        continue;
                    }
                        //entering them into separate arrays
                        timeFrame[lineNo] = Float.parseFloat(arr[0]);
                        syllable[lineNo] = arr[2];
                        lineNo++;
                }
                br.close(); 
                populateMaps(timeFrame, syllable, lineNo);
                } catch (Exception e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
        }   
      }
    System.out.println(terminalSyllMap);
}
public void populateMaps(float[] timeFrame,String[] syllable, int lineNo) throws Exception
{
    String syllval;
    float duration;
    ArrayList<Float> timeframeArray;
    for(int i=0; i<lineNo-1; i++)
    {
        //System.out.println(syllable[i+1]);
        if (syllable[i+1].equals("SIL"))
        {
            syllval = syllable[i];
            duration = timeFrame[i+1] - timeFrame[i]; 
            if(terminalSyllMap.containsKey(syllval))
            {
                timeframeArray = terminalSyllMap.get(syllval);
            }
            else
            {
                timeframeArray = new ArrayList<Float>();
            }
            timeframeArray.add(duration);
            terminalSyllMap.put(syllval, timeframeArray);
        }
    }
}
public static void main(String[] args) 
{
    //
    SyllableCount run = new SyllableCount();
    run.accessFilesForFolder(labDir);
}
 }
any help would be highly appreciated.
 
    