Passed
Pull Request — master (#527)
by Osma
02:34
created

annif.analyzer.simple   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A SimpleAnalyzer.__init__() 0 3 1
A SimpleAnalyzer._normalize_word() 0 2 1
1
"""Simple analyzer for Annif. Only folds words to lower case."""
2
3
from . import analyzer
4
5
6
class SimpleAnalyzer(analyzer.Analyzer):
7
    name = "simple"
8
9
    def __init__(self, param, **kwargs):
10
        self.param = param
11
        super().__init__(**kwargs)
12
13
    def _normalize_word(self, word):
14
        return word.lower()
15