本文整理匯總了Python中datamodel.DataModel.agreement方法的典型用法代碼示例。如果您正苦於以下問題:Python DataModel.agreement方法的具體用法?Python DataModel.agreement怎麽用?Python DataModel.agreement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類datamodel.DataModel
的用法示例。
在下文中一共展示了DataModel.agreement方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: CWR
# 需要導入模塊: from datamodel import DataModel [as 別名]
# 或者: from datamodel.DataModel import agreement [as 別名]
#.........這裏部分代碼省略.........
# Below document view. Contains the confusion matrix, list of
# rationales, gold standard values, and user judgments.
#stat_label = QtGui.QLabel()
#stat_label.setText("<B>Statistics</B>")
#stat_layout = QtGui.QVBoxLayout()
#document_layout.addWidget(stat_label)
#self._stat_display.setLayout(stat_layout)
#self._stat_display.setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
# Topic Display
topic = QtGui.QLabel("<b>Topic</b>: N/A")
document_layout.addWidget(topic)
narrative_label = QtGui.QLabel("<b>Narrative</b:")
document_layout.addWidget(narrative_label)
narrative_view = QtGui.QTextEdit()
document_layout.addWidget(narrative_view)
# Confusion Matrix for current Topic or Topic-Document Pair
confusion_matrix_label = QtGui.QLabel()
confusion_matrix_label.setText("Confusion Matrix")
document_layout.addWidget(confusion_matrix_label)
confusion_matrix = QtGui.QLabel()
confusion_matrix.setText(" - - - - \n"
" - - - - \n"
" - - - - \n")
document_layout.addWidget(confusion_matrix)
# Gold Standard for current Topic-Document.
gold_standard_view = QtGui.QLabel()
gold_standard_view.setText("Gold Standard: N/A")
document_layout.addWidget(gold_standard_view)
# Degree 1 Agreement
d1_agreement_view = QtGui.QLabel()
d1_agreement_view.setText("D1 Agreement: N/A")
document_layout.addWidget(d1_agreement_view)
# Degree 2 Agreement
d2_agreement_view = QtGui.QLabel()
d1_agreement_view.setText("D2 Agreement: N/A")
document_layout.addWidget(d2_agreement_view)
# Give pointers to updateable elements.
self._topic_view = topic
self._narrative_view = narrative_view
self._confusion_matrix = confusion_matrix
self._gold_standard_view = gold_standard_view
self._d1_agreement_view = d1_agreement_view
self._d2_agreement_view = d2_agreement_view
#####################################
# Rationale View #
#####################################
# Contains the rationale check boxes, text display, and statistics.
rationale_view = QtGui.QGridLayout()
grid.addLayout(rationale_view, 0, 2)
# Rationale Display
display = HighlightWebView()
display.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
display.load(QUrl('https://en.wikipedia.org/wiki/The_Beatles'))
display.show()
self._rationale_display = display
rationale_view.addWidget(self._rationale_display, 2, 0)