private void convertBMS() {
		String thisLine; // variable to read a line
		BufferedReader myInput = null;
		try {
			// Objects to read the file
			FileInputStream fin = new FileInputStream(new File(input));
			myInput = new BufferedReader(new InputStreamReader(fin));
			
			// In the BMS format, the sequencs of webpage of a user
			// is separated on several lines.
			// We use this variable to remember the id of the current user 
			// that we are reading.
			int lastId = 0; 
			
			int count = 0; // to count the number of line
			
			// we read the file line by line until the end of the file
			while ((thisLine = myInput.readLine()) != null) {

				// we split the line according to spaces
				String[] split = thisLine.split(" ");
				
				// each line is a user id with a webpage
				int id = Integer.parseInt(split[0]); // id of the user on this line
				int val = Integer.parseInt(split[1]); // webpage viewed by this user
				
				// if the id of the current user is not the same as the previous line
				if(lastId != id){
					// and it is not the first line
					if(lastId!=0 ){ 
						count++; // increase sequence count
						
						// write the end of line
						writer.write("-2");
						writer.newLine();
					}
					lastId = id; // remember the current user id for this line  so that we know it for next line
				}
				// if we have read enough sequences, we stop.
				if(count == lineCount){
					break;
				}
				// after each line we write an itemset separator "-1"
				writer.write(val + " -1 ");   // WRITE
			}
			myInput.close();
		} catch (Exception e) {
			e.printStackTrace();
		} 
	}