title: n-gram character based similarity measure
body: <p>I have extracted bi-grams from words by using the code:</p>
  
  <pre><code>Scanner a = new Scanner(file1);
  PrintWriter pw1= new PrintWriter(file2);  
      while (a.hasNext()) {
         String gram=a.next();
         pw1.println(gram);
         int line;
         line = gram.length(); 
         for(int x=0;x&lt;=line-2;x++){
           pw1.println(gram.substring(x, x+2));        
         }
      }
      pw1.close();
  }
  catch(FileNotFoundException e) {
    System.err.format("FileNotExist");`
  }
  </code></pre>
  
  <p>For example, the bi-grams of "student" are "st", "tu", "ud", "de", "en", "nt". </p>
  
  <p>But I need to find similarity calculation. </p>
  
  <p>I have to calculate similarity value between these splitted grams.</p>