-
Notifications
You must be signed in to change notification settings - Fork 0
/
feature.py
34 lines (25 loc) · 828 Bytes
/
feature.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# Neodym
#
# Copyright (C) by Andreas Zoglauer and contributors
# Please see the license file for more details.
#
# -----------------------------------------------------------------------------------
# Import external files
# Import neodym files
# -----------------------------------------------------------------------------------
class ZFeature():
def __init__(self):
self.mFeatureTag = ""
def apply(self, Article):
print("Applying feature")
def hasFeature(self, Article):
if self.mFeatureTag == "":
return False
else:
print("Count: " + str(Article.mBody.count(self.mFeatureTag)))
if Article.mBody.count(self.mFeatureTag) == 0:
return False
else:
return True
# -----------------------------------------------------------------------------------