예제 #1
0
 def test_potential_boundaries_sets(self):
     '''
     Test counting the number of potential boundaries for BoundaryFormat.sets.
     '''
     kwargs = {
         'boundary_format': BoundaryFormat.sets,
         'boundary_types': (1,)
     }
     self.assertEqual(
         4, __potential_boundaries__([(), (), (1,), ()], [(), (1,), (), ()], **kwargs))
     self.assertEqual(
         8, __potential_boundaries__([(), (), (1,2), ()], [(), (1,), (), ()], **kwargs))
예제 #2
0
 def test_potential_boundaries_sets(self):
     '''
     Test counting the number of potential boundaries for BoundaryFormat.sets.
     '''
     kwargs = {
         'boundary_format': BoundaryFormat.sets,
         'boundary_types': (1, )
     }
     self.assertEqual(
         4,
         __potential_boundaries__([(), (), (1, ), ()], [(), (1, ), (), ()],
                                  **kwargs))
     self.assertEqual(
         8,
         __potential_boundaries__([(), (), (1, 2), ()], [(), (1, ), (), ()],
                                  **kwargs))
예제 #3
0
 def test_potential_boundaries_mass(self):
     '''
     Test counting the number of potential boundaries for BoundaryFormat.mass.
     '''
     kwargs = {
         'boundary_format': BoundaryFormat.mass,
         'boundary_types': (1,)
     }
     self.assertEqual(4, __potential_boundaries__([2, 3], [1, 4], **kwargs))
예제 #4
0
 def test_potential_boundaries_nltk(self):
     '''
     Test counting the number of potential boundaries for BoundaryFormat.nltk.
     '''
     kwargs = {
         'boundary_format': BoundaryFormat.nltk,
         'boundary_types': (1,)
     }
     self.assertEqual(4, __potential_boundaries__('0010', '0100', **kwargs))
예제 #5
0
 def test_potential_boundaries_mass(self):
     '''
     Test counting the number of potential boundaries for BoundaryFormat.mass.
     '''
     kwargs = {
         'boundary_format': BoundaryFormat.mass,
         'boundary_types': (1, )
     }
     self.assertEqual(4, __potential_boundaries__([2, 3], [1, 4], **kwargs))
예제 #6
0
 def test_potential_boundaries_nltk(self):
     '''
     Test counting the number of potential boundaries for BoundaryFormat.nltk.
     '''
     kwargs = {
         'boundary_format': BoundaryFormat.nltk,
         'boundary_types': (1, )
     }
     self.assertEqual(4, __potential_boundaries__('0010', '0100', **kwargs))
예제 #7
0
 def test_potential_boundaries_position(self):
     '''
     Test counting the number of potential boundaries for BoundaryFormat.position.
     '''
     kwargs = {
         'boundary_format': BoundaryFormat.position,
         'boundary_types': (1,)
     }
     self.assertEqual(
         4, __potential_boundaries__([1, 1, 1, 2, 2], [1, 1, 2, 2, 3], **kwargs))
예제 #8
0
 def test_potential_boundaries_position(self):
     '''
     Test counting the number of potential boundaries for BoundaryFormat.position.
     '''
     kwargs = {
         'boundary_format': BoundaryFormat.position,
         'boundary_types': (1, )
     }
     self.assertEqual(
         4,
         __potential_boundaries__([1, 1, 1, 2, 2], [1, 1, 2, 2, 3],
                                  **kwargs))