當前位置: 首頁>>代碼示例>>Python>>正文


Python DataModel.gold_standard方法代碼示例

本文整理匯總了Python中datamodel.DataModel.gold_standard方法的典型用法代碼示例。如果您正苦於以下問題:Python DataModel.gold_standard方法的具體用法?Python DataModel.gold_standard怎麽用?Python DataModel.gold_standard使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在datamodel.DataModel的用法示例。


在下文中一共展示了DataModel.gold_standard方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: CWR

# 需要導入模塊: from datamodel import DataModel [as 別名]
# 或者: from datamodel.DataModel import gold_standard [as 別名]

#.........這裏部分代碼省略.........


        #####################################
        # Statistics View                   #
        #####################################
        # 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()
開發者ID:tylermcdonnell,項目名稱:cwr,代碼行數:70,代碼來源:cwr.py


注:本文中的datamodel.DataModel.gold_standard方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。