Ms. Nakamachi , a folklore and history graduate student at Kanagawa University outside Tokyo , has spent more than six years trying to establish the Japanese origin of the fortune cookie , much of that at National Diet Library ( the Japanese equivalent of the Library of Congress ) .