def get_next_request(self):
self.current_request = \
self.annotation_state.get_next_annotation_request()
if self.current_request is None:
tkMessageBox.showinfo("End of Document", "The end of the document has been reached. No more annotations are possible.")
return
predicted_counts = Counter(self.current_request.original_annotations)
prediction_strings = []
for item, count in sorted(
predicted_counts.items(),
key=lambda e: (e[1], e[0])):
prediction_strings.append("{} ({})".format(item, count))
self.prediction_string_value.set(
"Predicted: " + ", ".join(prediction_strings))
self.present_token(self.current_request.token)
评论列表
文章目录