Update utils/conditional_classifier.py
Browse files
utils/conditional_classifier.py
CHANGED
@@ -71,7 +71,7 @@ def conditional_classification(haystack_doc:pd.DataFrame,
|
|
71 |
#df1 = haystack_doc[haystack_doc['PA_check'] == True]
|
72 |
#df = haystack_doc[haystack_doc['PA_check'] == False]
|
73 |
haystack_doc['cond_check'] = haystack_doc.apply(lambda x: True if (
|
74 |
-
(x['Target Label'] == 'TARGET') | (x['PA_check'] == True) else
|
75 |
False, axis=1)
|
76 |
# we apply Netzero to only paragraphs which are classified as 'Target' related
|
77 |
temp = haystack_doc[haystack_doc['cond_check'] == True]
|
|
|
71 |
#df1 = haystack_doc[haystack_doc['PA_check'] == True]
|
72 |
#df = haystack_doc[haystack_doc['PA_check'] == False]
|
73 |
haystack_doc['cond_check'] = haystack_doc.apply(lambda x: True if (
|
74 |
+
(x['Target Label'] == 'TARGET') | (x['PA_check'] == True)) else
|
75 |
False, axis=1)
|
76 |
# we apply Netzero to only paragraphs which are classified as 'Target' related
|
77 |
temp = haystack_doc[haystack_doc['cond_check'] == True]
|