def annotate_forms(data_folder, url_argument): """ Run an interactive HTML form annotation tool. The process is to download a web page, display all HTML forms and for each form ask user about form type. The result is saved on disk: web page is stored as a html file and the URL and the annotation results are added to index.json file. """ storage = Storage(data_folder) html, url = load_data(url_argument) doc = load_html(html, url) answers = _annotate_forms(storage, doc) if answers: storage.store_result(html, answers, url)
def annotate_forms(data_folder, url_argument): """ Run an interactive HTML form annotation tool. The process is to download a web page, display all HTML forms and for each form ask user about form type. The result is saved on disk: web page is stored as a html file and the URL and the annotation results are added to index.json file. """ storage = Storage(data_folder) html, url = load_data(url_argument) doc = load_html(html, url) answers = _annotate_forms(storage, doc) if answers: storage.store_result(html, answers, url)