fix bug in preprocess and sample_fetch

add <page> tag in sample fetch
fix ambiguity.py dependence in preprocess (with option not to read from file, will need to fix ambiguity no matter whether it existed)