Beispiel #1
0
    def setUp(self):
        # create a sample image in memory
        self.context = pyConText.ConTextMarkup()
        self.splitter = helpers.sentenceSplitter()

        self.su1 = u'kanso <Diagnosis>**diabetes**</Diagnosis> utesl\xf6t eller diabetes men inte s\xe4kert. Vi siktar p\xe5 en r\xf6ntgenkontroll. kan det vara nej panik\xe5ngesten\n?'
        self.su2 =  u'IMPRESSION: 1. LIMITED STUDY DEMONSTRATING NO GROSS EVIDENCE OF SIGNIFICANT PULMONARY EMBOLISM.'
        self.su3 = u'This is a sentence that does not end with a number. But this sentence ends with 1. So this should be recognized as a third sentence.'
        self.su4 = u'This is a sentence with a numeric value equal to 1.43 and should not be split into two parts.'
        self.items = [ [u"pulmonary embolism",u"PULMONARY_EMBOLISM",ur"""pulmonary\s(artery )?(embol[a-z]+)""",""],["no gross evidence of","PROBABLE_NEGATED_EXISTENCE","","forward"]]
        self.itemData = itemData.itemData()
        for i in self.items:
            cit = itemData.contextItem
Beispiel #2
0
    def setUp(self):
        # create a sample image in memory
        self.context = pyConText.ConTextMarkup()
        self.splitter = helpers.sentenceSplitter()

        self.su1 = u'kanso <Diagnosis>**diabetes**</Diagnosis> utesl\xf6t eller diabetes men inte s\xe4kert. Vi siktar p\xe5 en r\xf6ntgenkontroll. kan det vara nej panik\xe5ngesten\n?'
        self.su2 = u'IMPRESSION: 1. LIMITED STUDY DEMONSTRATING NO GROSS EVIDENCE OF SIGNIFICANT PULMONARY EMBOLISM.'
        self.su3 = u'This is a sentence that does not end with a number. But this sentence ends with 1.'
        self.items = [[
            u"pulmonary embolism", u"PULMONARY_EMBOLISM",
            ur"""pulmonary\s(artery )?(embol[a-z]+)""", ""
        ], [
            "no gross evidence of", "PROBABLE_NEGATED_EXISTENCE", "", "forward"
        ]]
        self.itemData = itemData.itemData()
        for i in self.items:
            cit = itemData.contextItem
Beispiel #3
0
 def test_instantiate_itemData(self):
     cit1 = itemData.contextItem(self.items[0])
     it1 = itemData.itemData()
     it1.append(cit1)
     assert it1
Beispiel #4
0
 def test_instantiate_itemData(self):
     cit1 = itemData.contextItem(self.items[0])
     it1 = itemData.itemData()
     it1.append(cit1)
     assert it1