annif.analyzer.simple.SimpleAnalyzer.__init__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
"""Simple analyzer for Annif. Only folds words to lower case."""
2
3
from __future__ import annotations
4
5
from . import analyzer
6
7
8
class SimpleAnalyzer(analyzer.Analyzer):
9
    name = "simple"
10
11
    def __init__(self, param: None, **kwargs) -> None:
12
        self.param = param
13
        super().__init__(**kwargs)
14
15
    def _normalize_word(self, word: str) -> str:
16
        return word.lower()
17