コード例 #1
0
    def test_match(self):
        for word in self.VALID_WORDS:
            analyzer = PrepositionMorphologicalAnalyzer(word)
            matches = analyzer.match()

            assert matches is not None
            assert len(matches.span()) == 2
コード例 #2
0
    def test_match_empty(self):
        for word in self.INVALID_WORDS:
            analyzer = PrepositionMorphologicalAnalyzer(word)
            matches = analyzer.match()

            assert matches is None