Пример #1
0
 def initialize(self, alias_data):
     from detect.data.response import Response
     self.data_response = Response()
     self.data_response.open_connection()
     self.alias_data = alias_data
     self.param_extractor = ParamExtractor(self)
     self.path_extractor = PathExtractor(self)
     self.entity_factory = EntityFactory(self.alias_data)
     self.brute_detector = Detector(self.alias_data)
Пример #2
0
 def __init__(self, alias_data):
     self.POS_to_use = ["J", "N", "V", "R", "I"]
     self.extra_stop_words = ["show"]
     self.stopwords = stopwords.words('english')
     self.stopwords.extend(self.extra_stop_words)
     self.skip_words = [
         "all", "any", "anything", "display", "every", "everything", "find",
         "go", "like", "looking", "nice", "pair", "show", "some",
         "something", "want"
     ]
     self.stemmer = PorterStemmer()
     self.tokenizer = nltk.WordPunctTokenizer()
     self.alias_data = alias_data
     self.entity_factory = EntityFactory(self.alias_data)