本文整理汇总了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)