@@ -75,10 +75,10 @@ def analyze(self, s, blocks=False, encoding=None, parse_callback=None):
75
75
return self .analyze_from_blocks (blocks_ , return_blocks = blocks )
76
76
77
77
def analyze_from_blocks (self , blocks , return_blocks = False ):
78
- # 2. - make features
78
+ # make features
79
79
features = self .make_features_from_blocks (blocks )
80
80
81
- # 3/4 - run model and select results
81
+ # run model and select results
82
82
if features is not None :
83
83
content_mask = self ._block_model .predict (features ) > self ._threshold
84
84
results = [ele [0 ] for ele in zip (blocks , content_mask ) if ele [1 ]]
@@ -113,13 +113,12 @@ def make_features(self, s, train=False, encoding=None, parse_callback=None):
113
113
raises BlockifyError if there is an error parsing the doc
114
114
and None if doc is too short (< 3 blocks)
115
115
116
- train = if true, then passes it into feature maker"""
117
- # note: this method isn't needed by ContentExtractionModel anymore
118
- # but is kept for now for backward compatibilty with training
119
- # code
116
+ train = if true, then passes it into feature maker
117
+ """
118
+ # note: this method is not longer needed by ContentExtractionModel
119
+ # but is kept for now for backward compatibilty with training code
120
120
blocks = self ._blockifier .blockify (s , encoding = encoding ,
121
121
parse_callback = parse_callback )
122
-
123
122
return self .make_features_from_blocks (blocks , train ), blocks
124
123
125
124
@staticmethod
0 commit comments