Beispiel #1
0
    def setUp(self):

        for nlp in (nlp for nlp in get_nlps('en')
                    if nlp.meta['name'] == 'core_web_sm'):
            self.sm_nlp = nlp
            self.sm_rules_analyzer = RulesAnalyzerFactory().get_rules_analyzer(
                nlp)
Beispiel #2
0
    def setUp(self):

        warnings.filterwarnings("ignore",
                                message=r"\[W007\]",
                                category=UserWarning)

        nlps = get_nlps('en')
        for nlp in (nlp for nlp in nlps if nlp.meta['name'] == 'core_web_sm'):
            self.sm_nlp = nlp
        self.sm_rules_analyzer = RulesAnalyzerFactory().get_rules_analyzer(
            self.sm_nlp)
        sm_model_generator = ModelGenerator(self.sm_rules_analyzer,
                                            self.sm_nlp, self.sm_nlp)
        sm_doc = self.sm_nlp('Richard said he was entering the big house')
        self.sm_feature_table = sm_model_generator.generate_feature_table(
            [sm_doc])
        self.sm_tendencies_analyzer = TendenciesAnalyzer(
            self.sm_rules_analyzer, self.sm_nlp, self.sm_feature_table)

        for nlp in (nlp for nlp in nlps if nlp.meta['name'] == 'core_web_lg'):
            self.lg_nlp = nlp
        self.lg_rules_analyzer = RulesAnalyzerFactory().get_rules_analyzer(
            self.lg_nlp)
        lg_model_generator = ModelGenerator(self.lg_rules_analyzer,
                                            self.lg_nlp, self.lg_nlp)
        lg_doc = self.lg_nlp('Richard said he was entering the big house')
        self.lg_feature_table = lg_model_generator.generate_feature_table(
            [lg_doc])
        self.lg_tendencies_analyzer = TendenciesAnalyzer(
            self.lg_rules_analyzer, self.lg_nlp, self.lg_feature_table)
Beispiel #3
0
    def setUp(self):

        self.nlps = get_nlps('en')
        self.rules_analyzers = [RulesAnalyzerFactory().get_rules_analyzer(nlp) for
            nlp in self.nlps]
        self.sm_nlp = [nlp for nlp in self.nlps if nlp.meta['name'] == 'core_web_sm'][0]
        self.sm_rules_analyzer = RulesAnalyzerFactory().get_rules_analyzer(self.sm_nlp)
Beispiel #4
0
    def setUp(self):

        self.nlps = get_nlps('en')
        self.rules_analyzers = [
            RulesAnalyzerFactory.get_rules_analyzer(nlp) for nlp in self.nlps
        ]
    def setUp(self):

        self.nlps = get_nlps('en')
    def setUp(self):

        self.nlps = get_nlps('de')
Beispiel #7
0
    def setUp(self):

        self.nlps = get_nlps('pl')
 def setUp(self):
     nlps = get_nlps('en')
     for nlp in (nlp for nlp in nlps if nlp.meta['name'] == 'core_web_sm'):
         self.sm_nlp = nlp