def request_next_annotation(self, *arg):
value = self.user_tag_value.get()
if value == "":
self.root.bell()
return
if value not in self.annotation_state.parser_predictions.value_set:
res = tkMessageBox.askokcancel(
"New Tag",
"You are about to introduce the new tag '{}'. Proceed?".format(value))
if res is False:
return
else:
self.combobox.configure(values=sorted(
list(self.annotation_state.parser_predictions.value_set) + [value]))
self.annotation_state.process_annotation(self.current_request, value)
comment_value = self.comment_box.get("1.0", END).strip()
if len(comment_value) > 0:
self.write_comment(self.current_request.token,
comment_value, value)
self.comment_box.delete("1.0", END)
if self.autosave:
self.save_state()
self.get_next_request()
评论列表
文章目录