merge Yusuke Matsubara's code into WikipediaRevisionInputFormat