Beispiel #1
0
    def test_is_in_entity_for_publication_unicode(self):
        title = u'政协委员张国立:我们拍《纸牌屋》肯定通不过审查'
        entity = u'张国立'
        entity_type = 8
        result = is_in_title(entity, entity_type, title)
        self.assertFalse(result)

        entity = u'纸牌屋'
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)
Beispiel #2
0
    def test_is_in_entity_for_publication_unicode(self):
        title = u'政协委员张国立:我们拍《纸牌屋》肯定通不过审查'
        entity = u'张国立'
        entity_type = 8
        result = is_in_title(entity, entity_type, title)
        self.assertFalse(result)

        entity = u'纸牌屋'
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)
Beispiel #3
0
    def test_is_in_title_basic(self):
        title = u'政协委员张国立:我们拍《纸牌屋》肯定通不过审查'
        entity = u'张国立'
        entity_type = 0
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)

        entity = u'冯小刚'
        entity_type = 0
        result = is_in_title(entity, entity_type, title)
        self.assertFalse(result)
Beispiel #4
0
    def test_is_in_title_basic(self):
        title = u'政协委员张国立:我们拍《纸牌屋》肯定通不过审查'
        entity = u'张国立'
        entity_type = 0
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)

        entity = u'冯小刚'
        entity_type = 0
        result = is_in_title(entity, entity_type, title)
        self.assertFalse(result)
Beispiel #5
0
    def test_is_in_entity_for_publication(self):
        title = '政协委员张国立:我们拍《纸牌屋》肯定通不过审查'
        entity = '张国立'
        entity_type = 8
        result = is_in_title(entity, entity_type, title)
        self.assertFalse(result)

        entity = '纸牌屋'
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)

        title = '政协委员张国立:我们拍【纸牌屋】肯定通不过审查'
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)

        title = '政协委员张国立:我们拍“纸牌屋”肯定通不过审查'
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)
Beispiel #6
0
    def test_is_in_entity_for_publication(self):
        title = '政协委员张国立:我们拍《纸牌屋》肯定通不过审查'
        entity = '张国立'
        entity_type = 8
        result = is_in_title(entity, entity_type, title)
        self.assertFalse(result)

        entity = '纸牌屋'
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)

        title = '政协委员张国立:我们拍【纸牌屋】肯定通不过审查'
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)

        title = '政协委员张国立:我们拍“纸牌屋”肯定通不过审查'
        result = is_in_title(entity, entity_type, title)
        self.assertTrue(result)
Beispiel #7
0
 def test_is_in_title_with_lower_case(self):
     title = 'AC米兰否认即将购买曼联队长'
     entity = 'ac米兰'
     entity_type = 0
     result = is_in_title(entity, entity_type, title)
     self.assertTrue(result)
Beispiel #8
0
 def test_is_in_title_with_lower_case(self):
     title = 'AC米兰否认即将购买曼联队长'
     entity = 'ac米兰'
     entity_type = 0
     result = is_in_title(entity, entity_type, title)
     self.assertTrue(result)